Rhtslib - install error
4
0
Entering edit mode
boboshaq • 0
@boboshaq-18015
Last seen 5.5 years ago

Hi!

I tried to install package: Rhtslib in my miniconda env, but I get error:

make[1]: Entering directory '/tmp/Rtmpmkgpv4/R.INSTALL78e3ccf441d/Rhtslib/src/htslib-1.7'
Makefile.Rhtslib:128: warning: overriding recipe for target '.c.o'
/cluster/bioinfo/mbon/miniconda/3/envs/R-3.5.1/lib/R/etc/Makeconf:160: warning: ignoring old recipe for target '.c.o'
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o kfunc.o kfunc.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o knetfile.o knetfile.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o kstring.o kstring.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -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>
          ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Rhtslib:128: bgzf.o] Error 1
make[1]: Leaving directory '/tmp/Rtmpmkgpv4/R.INSTALL78e3ccf441d/Rhtslib/src/htslib-1.7'
make: *** [Makevars.common:21: htslib] Error 2
ERROR: compilation failed for package ‘Rhtslib’

I using Bioconductor 3.7 (BiocInstaller 1.30.0)

What I can do, to install that package?

 
Rhtslib installation error zlib • 7.9k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 days ago
United States

Since you're using conda, are you installing Rhtslib using conda (rather than biocLite() / BiocManager::install() / install.packages())?

If you are using conda to install Rhtslib, then think this is ultimately a shortcoming of the conda recipe for Rhtslib, and a conda solution is required -- installing the appropriate conda container for libz. I don't know how to do that other than via google, which lead me to https://anaconda.org/anaconda/zlib

 

ADD COMMENT
0
Entering edit mode
boboshaq • 0
@boboshaq-18015
Last seen 5.5 years ago

Hi,

I using miniconda with installed R 3.5.1. First I want to install package: methylkit:

http://bioconductor.org/packages/release/bioc/html/methylKit.html

but during installation that error will show:

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>

          ^~~~

compilation terminated.

I tried those command:

1. BiocManager::install("methylKit", version = "3.8")

result: error shown above

2. conda install -c bioconda bioconductor-methylkit

   result error:

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - bioconductor-methylkit -> bioconductor-fastseg -> bioconductor-biobase[version='>=2.40.0,<2.42.0'] -> bioconductor-biocgenerics[version='>=0.26.0,<0.28.0'] -> r-base[version='>=3.5.1,<3.5.2.0a0'] -> _r-mutex[version='1.*,1.*',build=anacondar_1]
  - r-microsoftr

My installed packages are:

_r-mutex                  1.0.0                     mro_2

r-microsoftr              3.5.0.108              mro351_0

r-base - non installed

biocgenerics - non installed
biobase - non installed

htslib                    1.9                  hc238db4_4    bioconda

zlib                      1.2.11               hfbfcf68_1    anaconda

 

Why methylKit installatin script do not see zlib and htslib ?

ADD COMMENT
0
Entering edit mode

f you were not using conda, the standard method of installation would work or would be remedied by installing libz. You are using conda, so this is a conda error and needs to be reported to them.

The Bioconductor approach is not finding libz and headers, because they are installed in a location known to conda but not to R.

ADD REPLY
0
Entering edit mode
jiaobingke • 0
@jiaobingke-21688
Last seen 4.7 years ago

I also encountered the same error as you did. I also used miniconda to install R (for I don't have administrator permission). One of my friends help me to install Rhtslib package, and then I installed methylKit successfully. Here is the process of installing Rhtslib. Some steps maybe are not necessary, for he also tried several times.

  1. Wrote a shell script and source it.

    prefix=/yourpath/to/software/miniconda3/envs/R.3.6.0 export PATH=$prefix/bin:$PATH export MANPATH=$prefix/man:$MANPATH export LDLIBRARYPATH=$prefix/lib:$prefix/lib64:$LDLIBRARYPATH export CFLAGS="-I$prefix/include" export LDFLAGS="-L$prefix/lib"

    export CINCLUDEPATH=$CINCLUDEPATH:$prefix/include export CPLUSINCLUDEPATH=$CPLUSINCLUDEPATH:$prefix/include

  2. Download the Rhstlib package (wget https://bioconductor.org/packages/3.9/bioc/src/contrib/Rhtslib1.16.1.tar.gz ./ ) and tar -zxvf Rhtslib1.16.1.tar.gz.

  3. cd to Rhtslib. Add "-I/yourpath/to/software/miniconda3/envs/R.3.6.0/include/ -L/yourpath/to/software/miniconda3/envs/R.3.6.0/lib/" after " htslibdefaultlibs = -lz -lm -lbz2 -llzma" in several files, including Makefile.Rhtslib, Makefile. And in Makefile, add the same thing after "CC = gcc" .
  4. rm -f Rhtslib1.16.1.tar.gz. And tar -zcvf Rhtslib1.16.1.tar.gz Rhtslib
  5. Open R. Typing install.packages("Rhtslib_1.16.1.tar.gz"). Attention, this Rhtslib is the package you modified above.
  6. Rhtslib installed successfully.
  7. I typed BiocManager::install(methylKit) . plyr and ggplot2 are absent. So I installed these two packages. And again typing BiocManager::install(methylKit). The methylKit was installed successfully.
ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 20 hours 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/124836/ 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

Also please make sure that you have libbz2 + liblzma + header files on your system. On a Debian-based Linux system like Ubuntu these can be installed with sudo apt-get install libbz2-dev liblzma-dev.

Cheers,

H.

ADD REPLY

Login before adding your answer.

Traffic: 932 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