# Error when installing "seqminer"

**URL:** <https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378>\
**Category:** R\
**Created:** [May 3, 2021, 4:26am UTC](https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378 "2021-05-03T04:26:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![engie](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@engie](https://hpc-discourse.usc.edu/u/engie)\
**Post date:** [May 3, 2021, 4:26am UTC](https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378/1 "2021-05-03T04:26:29Z")

</div>

Hello all,

I am running r/4.0.3 and trying to install “seqminer”. For this and other packages, I currently have loaded these modules: findutils tmux libx11 bzip2 curl r/4.0.3 gcc perl-xml-regexp/0.4 zlib

I should be installing seqMINER 8.0, which says it requires “C++11, zlib headers and libraries, GNU make, optionally also bzip2 and POSIX-compliant regex functions.” However, when compiling, R seems to think bzip2 is missing.

Any ideas?

```
trying URL 'https://cloud.r-project.org/src/contrib/seqminer_8.0.tar.gz'
Content type 'application/x-gzip' length 4055251 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

* installing *source* package 'seqminer' ...
** package 'seqminer' successfully unpacked and MD5 sums checked
** using staged installation
configure: CC = /spack/apps/gcc/8.3.0/bin/gcc
configure: CFLAGS = -g -O2
configure: CXX = /spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11
configure: CXXFLAGS = -g -O2
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... /spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for BZ2_bzDecompressInit in -lbz2... no
checking for ZSTD_compress in -lzstd... no
configure: Will build zstd library from the package
checking for sqlite3_open in -lsqlite... no
configure: Will build sqlite library from the package
checking for regcomp in -lc... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for working REG_STARTEND... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/config.h
** libs
do not have bzip2
/spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11 -I"/spack/apps/linux-centos7-x86_64/gcc-8.3.0/r-4.0.3-hygoervdlb6qrpvunyflvt3sp54v32bm/rlib/R/include" -DNDEBUG -D_USE_KNETFILE -I. -g -O2 -I. -DRSQLITE_USE_BUNDLED_SQLITE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_STAT4 -DSQLITE_SOUNDEX -Izstd/lib -Izstd/lib/common -DXXH_NAMESPACE=ZSTD_ -Izstd/lib/legacy -DZSTD_LEGACY_SUPPORT=5 -I/usr/local/include -fpic -g -O2 -c BCFReader.cpp -o BCFReader.o
In file included from BCFReader.h:4,
                 from BCFReader.cpp:1:
bcf.h:34:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^ ~~~~~~~
compilation terminated.
make: *** [BCFReader.o] Error 1
ERROR: compilation failed for package 'seqminer'
* removing '/panfs/qcb-panasas/engie/software/seqminer'

The downloaded source packages are in
        '/tmp/RtmpUYKFxp/downloaded_packages'
Warning message:
In install.packages("seqminer") :
  installation of package 'seqminer' had non-zero exit status
```

---

<div class="post-metadata">

**Author:** ![dstrong](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@dstrong](https://hpc-discourse.usc.edu/u/dstrong)\
**Post date:** [May 3, 2021, 7:22pm UTC](https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378/2 "2021-05-03T19:22:56Z")

</div>

@engie Because these modules are installed in non-standard locations, we have to tell R where to find them in those locations. There are a few different ways to do this. These are common modules used by many R packages, so try creating an `~/.R/Makevars` file containing the following:

```auto
CPPFLAGS = "-I${ZLIB_ROOT}/include -I${BZIP2_ROOT}/include -I${CURL_ROOT}/include"
LDFLAGS = "-L${ZLIB_ROOT}/lib -L${BZIP2_ROOT}/lib -L${CURL_ROOT}/lib"

```

Then try installing `seqminer` again.

---

<div class="post-metadata">

**Author:** ![engie](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@engie](https://hpc-discourse.usc.edu/u/engie)\
**Post date:** [May 4, 2021, 5:26am UTC](https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378/4 "2021-05-04T05:26:42Z")

</div>

Thanks for the response. I made a `.R` directory in my home and used nano to write a Makevars file:

 ![image](https://hpc-discourse.usc.edu/uploads/default/original/1X/d1835c0630135cb9c5562be626529715ebed623e.png)

Then I’ve loaded my modules: `module load findutils tmux libx11 bzip2 curl r/4.0.3 zlib`

However I’m still getting the same error

```
install.packages("seqminer")
Installing package into '/panfs/qcb-panasas/engie/software'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
Selection: 1
trying URL 'https://cloud.r-project.org/src/contrib/seqminer_8.0.tar.gz'
Content type 'application/x-gzip' length 4055251 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

* installing *source* package 'seqminer' ...
** package 'seqminer' successfully unpacked and MD5 sums checked
** using staged installation
configure: CC = /spack/apps/gcc/8.3.0/bin/gcc
configure: CFLAGS = -g -O2
configure: CXX = /spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11
configure: CXXFLAGS = -g -O2
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... /spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for BZ2_bzDecompressInit in -lbz2... no
checking for ZSTD_compress in -lzstd... no
configure: Will build zstd library from the package
checking for sqlite3_open in -lsqlite... no
configure: Will build sqlite library from the package
checking for regcomp in -lc... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for working REG_STARTEND... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/config.h
** libs
do not have bzip2
/spack/apps/gcc/8.3.0/bin/g++ -std=gnu++11 -I"/spack/apps/linux-centos7-x86_64/gcc-8.3.0/r-4.0.3-hygoervdlb6qrpvunyflvt3sp54v32bm/rlib/R/include" -DNDEBUG -D_USE_KNETFILE -I. -g -O2 -I. -DRSQLITE_USE_BUNDLED_SQLITE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_STAT4 -DSQLITE_SOUNDEX -Izstd/lib -Izstd/lib/common -DXXH_NAMESPACE=ZSTD_ -Izstd/lib/legacy -DZSTD_LEGACY_SUPPORT=5 "-I/spack/apps/linux-centos7-x86_64/gcc-8.3.0/zlib-1.2.11-dp3wfr26pumq5x4dltujahr4qse4agnk/include -I/spack/apps/linux-centos7-x86_64/gcc-8.3.0/bzip2-1.0.8-b65almiioh2l4xgr3ulcr7bftjvo5m2u/include -I/spack/apps/linux-centos7-x86_64/gcc-8.3.0/curl-7.68.0-txmpdwwz3thgzsgxo6oule63b5lnybga/include" -fpic -g -O2 -c BCFReader.cpp -o BCFReader.o
In file included from BCFReader.h:4,
                 from BCFReader.cpp:1:
bcf.h:34:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^ ~~~~~~~
compilation terminated.
make: *** [BCFReader.o] Error 1
ERROR: compilation failed for package 'seqminer'
* removing '/panfs/qcb-panasas/engie/software/seqminer'

The downloaded source packages are in
        '/tmp/RtmpJ9iurr/downloaded_packages'
Warning message:
In install.packages("seqminer") :
  installation of package 'seqminer' had non-zero exit status
>
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /spack/apps/linux-centos7-x86_64/gcc-8.3.0/openblas-0.3.8-2no6mfziiclwxb7lstxoos335gnhjpes/lib/libopenblasp-r0.3.8.so

locale:
[1] C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3 tcltk_4.0.3
```

---

<div class="post-metadata">

**Author:** ![dstrong](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@dstrong](https://hpc-discourse.usc.edu/u/dstrong)\
**Post date:** [May 4, 2021, 5:13pm UTC](https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378/5 "2021-05-04T17:13:28Z")

</div>

Oops, we need to leave out the quotation marks:

```auto
CPPFLAGS = -I${ZLIB_ROOT}/include -I${BZIP2_ROOT}/include -I${CURL_ROOT}/include
LDFLAGS = -L${ZLIB_ROOT}/lib -L${BZIP2_ROOT}/lib -L${CURL_ROOT}/lib

```

This is working for me on endeavour1.

---

<div class="post-metadata">

**Author:** ![engie](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@engie](https://hpc-discourse.usc.edu/u/engie)\
**Post date:** [May 4, 2021, 7:52pm UTC](https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378/6 "2021-05-04T19:52:04Z")

</div>

Yes, I am able to install now. Thanks!

---

<div class="post-metadata">

**Author:** ![dstrong](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@dstrong](https://hpc-discourse.usc.edu/u/dstrong)\
**Post date:** [June 7, 2024, 12:02am UTC](https://hpc-discourse.usc.edu/t/error-when-installing-seqminer/378/7 "2024-06-07T00:02:53Z")

</div>

Closed on June 7, 2024, 12:02am UTC


