Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error during STITCH installation related to zlib.h #88

Open
jamonterotena opened this issue Oct 30, 2023 · 2 comments
Open

Fatal error during STITCH installation related to zlib.h #88

jamonterotena opened this issue Oct 30, 2023 · 2 comments

Comments

@jamonterotena
Copy link

jamonterotena commented Oct 30, 2023

I'm trying to install STITCH using the method explained here:

R CMD INSTALL STITCH_1.6.10.tar.gz

However, it doesn't work and gives the following error:

(zlib) jmontero@lummerland:/vol/agcpgl/jmontero/RILs/Programs/STITCH/releases$ /vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/bin/R CMD INSTALL STITCH_1.6.10.tar.gz
* installing to library ‘/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/library’
* installing *source* package ‘STITCH’ ...
** using staged installation
** libs
using C++ compiler: ‘g++ (crosstool-NG 1.24.0.133_b0863d8_dirty) 7.5.0’
using C++11
g++ -std=gnu++11 -I"/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/include" -DNDEBUG -I./SeqLib// -I./SeqLib//htslib/ -I'/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/library/Rcpp/include' -I'/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/library/RcppArmadillo/include' -I/usr/local/include    -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/include" -DNDEBUG -I./SeqLib// -I./SeqLib//htslib/ -I'/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/library/Rcpp/include' -I'/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/library/RcppArmadillo/include' -I/usr/local/include    -fpic  -g -O2  -c bam_access.cpp -o bam_access.o
In file included from ./SeqLib//SeqLib/GenomicRegionCollection.h:349:0,
                 from ./SeqLib//SeqLib/ReadFilter.h:13,
                 from ./SeqLib//SeqLib/BamReader.h:5,
                 from bam_access.cpp:3:
./SeqLib//SeqLib/GenomicRegionCollection.cpp:10:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
make: *** [/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/etc/Makeconf:200: bam_access.o] Error 1
ERROR: compilation failed for package ‘STITCH’
* removing ‘/vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/library/STITCH’

I tried to install zlib through miniconda and activated the environment before running the command but it keeps printing the same error message. I tried installing STITCH through conda but didn't work either.

What should I try?

Here is some info about the R session in case it helps:

> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/lib/libRblas.so
LAPACK: /vol/agcpgl/jmontero/RILs/Programs/R-4.3.1/lib/R/lib/libRlapack.so;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8    LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8       LC_NAME=C
 [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

time zone: Europe/Berlin
tzcode source: system (glibc)

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

loaded via a namespace (and not attached):
[1] compiler_4.3.1

Any help is appreciated.

@jamonterotena jamonterotena changed the title Fatal error related to zlib.h Fatal error during STITCH installation related to zlib.h Oct 30, 2023
@Zilong-Li
Copy link
Collaborator

Hi,

I may suggest trying to

  1. ask the system admin to install zlib header files
  2. put the following in your $HOME/.bashrc if you install zlib through conda:
    export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:$HOME/miniconda3/include"
    export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$HOME/miniconda3/lib/pkgconfig"

@rwdavies
Copy link
Owner

Thanks for the info re: STITCH through conda, that shouldn't happen. I'll try to have a look later this week about this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants