I am unable to install ShortRead which I need for dada2
R version 3.4.3 (2017-11-30) biocLite(c("ShortRead")) ... checking for gzeof in -lz... no configure: error: zlib not found ERROR: configuration failed for package ‘ShortRead’
However, I do have libz available:
Sys.getenv() ... LD_LIBRARY_PATH /home/josephe/miniconda3/envs/dada2pipeline/lib/R/lib:/builddir/vendor/build/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.111.x86_64/jre/lib/amd64/server:/home/josephe/miniconda3/envs/dada2pipeline/lib ls -l ~/miniconda3/envs/dada2pipeline/lib/libz* -rw-rw-r-- 4 josephe josephe 153418 Jan 23 2017 /home/josephe/miniconda3/envs/dada2pipeline/lib/libz.a lrwxrwxrwx 2 josephe josephe 14 May 11 12:30 /home/josephe/miniconda3/envs/dada2pipeline/lib/libz.so -> libz.so.1.2.11 lrwxrwxrwx 2 josephe josephe 14 May 11 12:30 /home/josephe/miniconda3/envs/dada2pipeline/lib/libz.so.1 -> libz.so.1.2.11
You can see the command begin run (the stuff after the line
configure:2922:
) on the file echoed in the|
comment. I'd guess it is that the LD_LIBRARY_PATH is either incorrect or not forwarded to the process that does the compilation and installation. You could edit theconfigure.ac
file to echo what configure is seeingthen use autoconf and R CMD INSTALL; I have
If LD_LIBRARY_PATH is not correct, then I'm not really sure what to do -- I think it is really a conda problem.
I am also facing the same issue with R version 3.4.3 installed via anaconda3.5.2. Did you find any solution for this problem?
Thanks!
did you try to troubleshoot as above? what were the results?
Yes. No luck with that! Echoing LD_LIBRARY_PATH shows that anaconda lib is included. I am not sure why the package still can't find zlib.
checking for gzeof in -lz... no
configure: error: zlib not found
Hi Martin,
I have the same problem with the same versions etc. I tried your troubleshooting method, but it just gives the same error that I get in the R console, the one posted above. This is also using conda. Installing ShortRead via conda will unfortuately downgrade R and some other things as I guess they don't have the current version yet.
I finally figured out setting CPPFLAGS and LDFLAGS works:
CPPFLAGS='-I/home/till/miniconda2/envs/dada2/include' LDFLAGS='-L/home/till/miniconda2/miniconda2/envs/dada2/lib'
What does NOT work however is
R CMD INSTALL --configure-args='--with-zlib-include=home/till//miniconda2/envs/dada2/include --with-zlib-lib=/home/till/miniconda2/envs/dada2/lib' .
Thanks for working on this. It sounds like a bioconda issue (I guess -- is that what creates the 'miniconda2' directory?), and that somehow R should know to look in the paths you indicate for the include and lib files. Can you pursue this 'upstream' with the bioconda team?
Could you please tell us what exactly you did?
This didn't work for me.
Just add those lines at configure:2889
CPPFLAGS='-I/home/miniconda3/envs/yourenvname/include'
LDFLAGS='-L/home/miniconda3/envs/yourenvname/lib'
Have you taken this issue up with the upstream conda installation that you are using? It needs to be fixed there rather than through fragile hacks like this.
Thank you! Thank you! This saved me tons of time!