Error on Rhtslib package installation
2
0
Entering edit mode
@juandenciso14-21941
Last seen 5.3 years ago

Hi all, I have a problem when trying to install Rhtslib package on my computer. Apparently, the installer is unable to find the zlib.h header file. I have zlib installed and an independent installation of htslib is able to find a suitable header to use and works fine. Also, I'm able to locate the header file on my computer via the find command.

The command used to install Rhtslib is:

BiocManager::install(c("Rhtslib"))

Which results in the following output:

Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.1 (2019-07-05)
Installing package(s) 'Rhtslib'
trying URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/Rhtslib_1.16.1.tar.gz'
Content type 'application/x-gzip' length 1470655 bytes (1.4 MB)
==================================================
downloaded 1.4 MB
* installing *source* package ‘Rhtslib’ ...
** using non-staged installation via StagedInstall field
** libs
cd "htslib-1.7" && make -f "/home/juanenciso/anaconda3/envs/r_bioconductor/lib/R/etc/Makeconf" -f "Makefile.Rhtslib"
make[1]: Entering directory '/tmp/RtmpHYcN5n/R.INSTALL40d18c442c9/Rhtslib/src/htslib-1.7'
Makefile.Rhtslib:130: warning: overriding recipe for target '.c.o'
/home/juanenciso/anaconda3/envs/r_bioconductor/lib/R/etc/Makeconf:168: warning: ignoring old recipe for target '.c.o'
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -fpic -I.  -c -o kfunc.o kfunc.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -fpic -I.  -c -o knetfile.o knetfile.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -fpic -I.  -c -o kstring.o kstring.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -fpic -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -fpic -I.  -c -o bgzf.o bgzf.c
In file included from bgzf.c:39:0:
htslib/bgzf.h:35:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
               ^~~~~~~~

I'm attaching my session information:

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Manjaro Linux

Matrix products: default
BLAS/LAPACK: /home/juanenciso/anaconda3/envs/r_bioconductor/lib/R/lib/libRblas.so

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

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.4 compiler_3.6.1     tools_3.6.1
software error Rhtslib zlib.h • 2.3k views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 7 hours ago
EMBL Heidelberg

Can you install the Rhtslib package via conda and use the pre-built version on bioconda?

ADD COMMENT
0
Entering edit mode

Thank you, that worked!

ADD REPLY
1
Entering edit mode

Maybe worth pointing out that this solution is appropriate if you are already using conda, which is apparent from your sessionInfo(); I think the 'best practice' is, if you've chosen to use conda always use conda.

If you hadn't chosen to use conda, then likely Rhtslib would have installed without trouble, or if there were a problem then using conda for this package alone would not be the solution -- if you haven't chosen to use conda, don't use conda.

ADD REPLY
0
Entering edit mode

Yes, I should have elaborated in my answer that this falls under the 'If you install R with conda, install R packages with conda' paradigm.

I have seen instances of system libraries like zlib installed via conda, but then R built from source using these libraries, and I'm not sure if that falls under 'choosing to use conda' or 'not choosing to use conda'.

ADD REPLY
0
Entering edit mode
@herve-pages-1542
Last seen 4 days ago
Seattle, WA, United States

Hi,

This looks like the same problem as here https://support.bioconductor.org/p/112599/ or https://support.bioconductor.org/p/114457/ A fix is in the way (in Rhtslib 1.16.2). Rhtslib 1.16.2 should become available via BiocManager::install() in the next 24h or so.

Best,

H.

ADD COMMENT
0
Entering edit mode

Rhtslib 1.16.2 is now available: https://bioconductor.org/packages/3.9/Rhtslib

Cheers,

H.

ADD REPLY

Login before adding your answer.

Traffic: 516 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6