Bioconductor / Rhtslib

HTSlib high-throughput sequencing library as an R package
https://bioconductor.org/packages/Rhtslib
11 stars 12 forks source link

error with R-devel: R_init_Rhtslib.c:2:17: fatal error: hts.h: No such file or directory #1

Closed lucidif closed 6 years ago

lucidif commented 6 years ago

Hi, I have problems with installation of this package

when I try to install it i have this report

`> biocLite("Rhtslib")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.7 (BiocInstaller 1.29.4), R Under development (unstable) (2018-01-18
  r74132).
Installing package(s) ‘Rhtslib’
provo con l'URL 'https://bioconductor.org/packages/3.7/bioc/src/contrib/Rhtslib_1.11.3.tar.gz'
Content type 'application/x-gzip' length 1424580 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
5: Setting LC_PAPER failed, using "C" 
6: Setting LC_MEASUREMENT failed, using "C" 
* installing *source* package 'Rhtslib' ...
** libs
cd "htslib-1.7" && make -j4 -f "/usr/local/lib/R-devel/lib/R/etc/Makeconf" -f "Makefile.Rhtslib"
mkdir -p "/media/lucio/FastData/2.R/1.Library/x86_64-pc-linux-gnu-library/3.5/Rhtslib/usrlib"
mkdir -p "/media/lucio/FastData/2.R/1.Library/x86_64-pc-linux-gnu-library/3.5/Rhtslib/include"
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I"/media/lucio/FastData/2.R/1.Library/x86_64-pc-linux-gnu-library/3.5/Rhtslib/include" -I"/media/lucio/FastData/2.R/1.Library/x86_64-pc-linux-gnu-library/3.5/zlibbioc/include" -I/usr/local/include   -fpic  -ggdb -pipe -std=gnu99 -Wall -pedantic  -c R_init_Rhtslib.c -o R_init_Rhtslib.o
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make[1]: Entering directory '/tmp/RtmpdXchva/R.INSTALLe38505902dc/Rhtslib/src/htslib-1.7'
Makefile.Rhtslib:128: warning: overriding recipe for target '.c.o'
/usr/local/lib/R-devel/lib/R/etc/Makeconf:159: warning: ignoring old recipe for target '.c.o'
ccache gcc -g -Wall -O2 -I.  -c -o kfunc.o kfunc.c
ccache gcc -g -Wall -O2 -I.  -c -o knetfile.o knetfile.c
ccache gcc -g -Wall -O2 -I.  -c -o kstring.o kstring.c
ccache gcc -g -Wall -O2 -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
ccache gcc -g -Wall -O2 -I.  -c -o bgzf.o bgzf.c
ccache gcc -g -Wall -O2 -I.  -c -o errmod.o errmod.c
ccache gcc -g -Wall -O2 -I.  -c -o faidx.o faidx.c
ccache gcc -g -Wall -O2 -I.  -c -o hfile.o hfile.c
ccache gcc -g -Wall -O2 -I.  -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.7"' > version.h
ccache gcc -g -Wall -O2 -I.  -c -o hts_os.o hts_os.c
ccache gcc -g -Wall -O2 -I.  -c -o md5.o md5.c
ccache gcc -g -Wall -O2 -I.  -c -o multipart.o multipart.c
ccache gcc -g -Wall -O2 -I.  -c -o probaln.o probaln.c
ccache gcc -g -Wall -O2 -I.  -c -o realn.o realn.c
ccache gcc -g -Wall -O2 -I.  -c -o regidx.o regidx.c
ccache gcc -g -Wall -O2 -I.  -c -o sam.o sam.c
ccache gcc -g -Wall -O2 -I.  -c -o synced_bcf_reader.o synced_bcf_reader.c
ccache gcc -g -Wall -O2 -I.  -c -o vcf_sweep.o vcf_sweep.c
ccache gcc -g -Wall -O2 -I.  -c -o tbx.o tbx.c
ccache gcc -g -Wall -O2 -I.  -c -o textutils.o textutils.c
ccache gcc -g -Wall -O2 -I.  -c -o thread_pool.o thread_pool.c
ccache gcc -g -Wall -O2 -I.  -c -o vcf.o vcf.c
ccache gcc -g -Wall -O2 -I.  -c -o vcfutils.o vcfutils.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_codecs.o cram/cram_codecs.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_decode.o cram/cram_decode.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_encode.o cram/cram_encode.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_external.o cram/cram_external.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_index.o cram/cram_index.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_io.o cram/cram_io.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_samtools.o cram/cram_samtools.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/cram_stats.o cram/cram_stats.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/files.o cram/files.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/mFILE.o cram/mFILE.c
R_init_Rhtslib.c:2:17: fatal error: hts.h: No such file or directory
compilation terminated.
ccache gcc -g -Wall -O2 -I.  -c -o cram/open_trace_file.o cram/open_trace_file.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/pooled_alloc.o cram/pooled_alloc.c
/usr/local/lib/R-devel/lib/R/etc/Makeconf:159: recipe for target 'R_init_Rhtslib.o' failed
make: *** [R_init_Rhtslib.o] Error 1
make: *** Waiting for unfinished jobs....
ccache gcc -g -Wall -O2 -I.  -c -o cram/rANS_static.o cram/rANS_static.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/sam_header.o cram/sam_header.c
ccache gcc -g -Wall -O2 -I.  -c -o cram/string_alloc.o cram/string_alloc.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o kfunc.pico kfunc.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o knetfile.pico knetfile.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o kstring.pico kstring.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o bcf_sr_sort.pico bcf_sr_sort.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o bgzf.pico bgzf.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o errmod.pico errmod.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o faidx.pico faidx.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o hfile.pico hfile.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o hfile_net.pico hfile_net.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o hts.pico hts.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o hts_os.pico hts_os.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o md5.pico md5.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o multipart.pico multipart.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o probaln.pico probaln.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o realn.pico realn.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o regidx.pico regidx.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o sam.pico sam.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o synced_bcf_reader.pico synced_bcf_reader.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o vcf_sweep.pico vcf_sweep.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o tbx.pico tbx.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o textutils.pico textutils.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o thread_pool.pico thread_pool.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o vcf.pico vcf.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o vcfutils.pico vcfutils.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_codecs.pico cram/cram_codecs.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_decode.pico cram/cram_decode.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_encode.pico cram/cram_encode.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_external.pico cram/cram_external.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_index.pico cram/cram_index.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_io.pico cram/cram_io.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_samtools.pico cram/cram_samtools.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/cram_stats.pico cram/cram_stats.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/files.pico cram/files.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/mFILE.pico cram/mFILE.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/open_trace_file.pico cram/open_trace_file.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/pooled_alloc.pico cram/pooled_alloc.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/rANS_static.pico cram/rANS_static.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/sam_header.pico cram/sam_header.c
ccache gcc -g -Wall -O2 -I.  -fpic -c -o cram/string_alloc.pico cram/string_alloc.c
ccache gcc -g -Wall -O2 -I.  -c -o bgzip.o bgzip.c
ccache gcc -g -Wall -O2 -I.  -c -o htsfile.o htsfile.c
ccache gcc -g -Wall -O2 -I.  -c -o tabix.o tabix.c
ccache gcc -g -Wall -O2 -I.  -c -o test/hts_endian.o test/hts_endian.c
ccache gcc -g -Wall -O2 -I.  -c -o test/fieldarith.o test/fieldarith.c
ccache gcc -g -Wall -O2 -I.  -c -o test/hfile.o test/hfile.c
ccache gcc -g -Wall -O2 -I.  -c -o test/sam.o test/sam.c
ccache gcc -g -Wall -O2 -I.  -c -o test/test_bgzf.o test/test_bgzf.c
ccache gcc -g -Wall -O2 -I.  -c -o test/test-regidx.o test/test-regidx.c
ccache gcc -g -Wall -O2 -I.  -c -o test/test_view.o test/test_view.c
ccache gcc -g -Wall -O2 -I.  -c -o test/test-vcf-api.o test/test-vcf-api.c
ccache gcc -g -Wall -O2 -I.  -c -o test/test-vcf-sweep.o test/test-vcf-sweep.c
ccache gcc -g -Wall -O2 -I.  -c -o test/test-bcf-sr.o test/test-bcf-sr.c
ccache gcc -g -Wall -O2 -I.  -c -o test/test-bcf-translate.o test/test-bcf-translate.c
ccache gcc -g -Wall -O2 -I.  -c -o hts.o hts.c
ccache gcc -shared -Wl,-soname,libhts.so.2  -o libhts.so kfunc.pico knetfile.pico kstring.pico bcf_sr_sort.pico bgzf.pico errmod.pico faidx.pico hfile.pico hfile_net.pico hts.pico hts_os.pico md5.pico multipart.pico probaln.pico realn.pico regidx.pico sam.pico synced_bcf_reader.pico vcf_sweep.pico tbx.pico textutils.pico thread_pool.pico vcf.pico vcfutils.pico cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico cram/cram_external.pico cram/cram_index.pico cram/cram_io.pico cram/cram_samtools.pico cram/cram_stats.pico cram/files.pico cram/mFILE.pico cram/open_trace_file.pico cram/pooled_alloc.pico cram/rANS_static.pico cram/sam_header.pico cram/string_alloc.pico -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/hts_endian test/hts_endian.o -lz -lm -lbz2 -llzma
ar -rc libhts.a kfunc.o knetfile.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o hfile.o hfile_net.o hts.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o
ranlib libhts.a
ccache gcc  -o bgzip bgzip.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o htsfile htsfile.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o tabix tabix.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ln -sf libhts.so libhts.so.2
ccache gcc  -o test/fieldarith test/fieldarith.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/hfile test/hfile.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/sam test/sam.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/test_bgzf test/test_bgzf.o libhts.a -lz -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/test-regidx test/test-regidx.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/test_view test/test_view.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/test-vcf-api test/test-vcf-api.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/test-vcf-sweep test/test-vcf-sweep.o libhts.a -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/test-bcf-sr test/test-bcf-sr.o libhts.a -lz -lz -lm -lbz2 -llzma -lpthread
ccache gcc  -o test/test-bcf-translate test/test-bcf-translate.o libhts.a -lz -lz -lm -lbz2 -llzma -lpthread
make[1]: Leaving directory '/tmp/RtmpdXchva/R.INSTALLe38505902dc/Rhtslib/src/htslib-1.7'
ERROR: compilation failed for package 'Rhtslib'
* removing '/media/lucio/FastData/2.R/1.Library/x86_64-pc-linux-gnu-library/3.5/Rhtslib'

The downloaded source packages are in
    ‘/tmp/RtmpBdSOKS/downloaded_packages’
Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘Rhtslib’ had non-zero exit status

Lucio

hpages commented 6 years ago

Hi,

You seem to have the environment variable MAKE set to make -j4 which enables parallel make. Rhtslib was updated a few days ago with its compilation mechanism revisited but the new mechanism was not tested in the context of parallel execution. Can you turn off parallel execution (by not defining MAKE, or by setting it to make or make -j1) and try again? Please let me know how this goes.

Also please provide the output of sessionInfo().

Thanks, H.

hpages commented 6 years ago

I've committed something: https://github.com/Bioconductor/Rhtslib/commit/fc1ac7c303b3292603193902925decc11e08471b Let me know if that fixes it. Cheers, H.

LiNk-NY commented 6 years ago

Hi Hervé, @hpages

I've installed from GitHub using MAKE="make -j8" in my ~/.Renviron and BiocInstaller::biocLite("Bioconductor/Rhtslib"). It works for me!

Regards, Marcel

hpages commented 6 years ago

Thx Marcel, @LiNk-NY !

lucidif commented 6 years ago

OK it's work when I use make -j8 in /src/htslib-1.7/ folder and after

BiocInstaller::biocLite("Bioconductor/Rhtslib")

thanks!

hpages commented 6 years ago

Thanks @lucidif for confirming.

H.