Closed qq80317453 closed 2 years ago
I have the exact same problem, but I am working on Ubuntu 20.04 Did you find a solution to your problem ?
@diegobardiaux I guess you are on a linux system and so not exactly the same problem :) For you the solution is to install the necessary system dependency. From https://github.com/Bioconductor/Rhtslib/issues/20#issuecomment-725714434 it looks like you need to use apt get
to install the package liblzma-dev
.
Hi mtmorgan,
It was exactly that, thank you very much :)
@qq80317453 Always install the Rhtslib binary on Windows. We don't support installing from source.
Hi ,everyone I got a problem in installing the package of "Rhtslib" ,here is the details:
*** arch - i386 cd "htslib-1.7" && /usr/bin/make -f "C:/PROGRA~1/R/R-40~1.2/etc/i386/Makeconf" -f "Makefile.Rhtslib.win" make[1]: Entering directory '/c/Users/dell/AppData/Local/Temp/RtmpsTRXyv/R.INSTALL24fc3c222fea/Rhtslib/src-i386/htslib-1.7' Makefile.Rhtslib.win:131: warning: overriding recipe for target '.c.o' C:/PROGRA~1/R/R-40~1.2/etc/i386/Makeconf:222: warning: ignoring old recipe for target '.c.o' "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o kfunc.o kfunc.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o knetfile.o knetfile.c knetfile.c: In function 'khttp_connect_file': knetfile.c:416:61: warning: unknown conversion type character 'l' in format [-Wformat=] if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset); ^ knetfile.c:416:45: warning: too many arguments for format [-Wformat-extra-args] if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset); ^
~~~~~~~ knetfile.c:416:61: warning: unknown conversion type character 'l' in format [-Wformat=] if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset); ^ knetfile.c:416:45: warning: too many arguments for format [-Wformat-extra-args] if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset); ^~~~~~~~ "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o kstring.o kstring.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o bcf_sr_sort.o bcf_sr_sort.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o bgzf.o bgzf.c In file included from htslib/hts.h:35, from bgzf.c:38: bgzf.c: In function 'bgzf_read': bgzf.c:888:31: warning: unknown conversion type character 'z' in format [-Wformat=] hts_log_error("Read block operation failed with error %d after %zd of %zu bytes", ret, bytes_read, length); ^~~~~~~~~~~~~~htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, __VA_ARGS__)
bgzf.c:888:31: warning: unknown conversion type character 'z' in format [-Wformat=] hts_log_error("Read block operation failed with error %d after %zd of %zu bytes", ret, bytes_read, length); ^
~~~~~~~~~~~~~htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, __VA_ARGS__)
bgzf.c:888:31: warning: too many arguments for format [-Wformat-extra-args] hts_log_error("Read block operation failed with error %d after %zd of %zu bytes", ret, bytes_read, length); ^
~~~~~~~~~~~~~htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, __VA_ARGS__)
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o errmod.o errmod.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o faidx.o faidx.c In file included from htslib/hts.h:35, from hts_internal.h:29, from faidx.c:43: faidx.c: In function 'fai_read': faidx.c:222:27: warning: unknown conversion type character 'z' in format [-Wformat=] hts_log_error("Could not understand FAI %s line %zd", fname, lnum); ^
~~~~~~~~~ htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, __VA_ARGS__)
faidx.c:222:27: warning: too many arguments for format [-Wformat-extra-args] hts_log_error("Could not understand FAI %s line %zd", fname, lnum); ^
~~~~~~~~~ htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, __VA_ARGS__)
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hfile.o hfile.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hfile_net.o hfile_net.c echo '#define HTS_VERSION "1.7"' > version.h "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hts.o hts.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hts_os.o hts_os.c hts_os.c: In function 'hts_srand48': hts_os.c:33:31: warning: implicit declaration of function 'srand48'; did you mean 'srand'? [-Wimplicit-function-declaration] void hts_srand48(long seed) { srand48(seed); } ^
~~ srand hts_os.c: In function 'hts_erand48': hts_os.c:34:54: warning: implicit declaration of function 'erand48'; did you mean 'srand'? [-Wimplicit-function-declaration] double hts_erand48(unsigned short xseed[3]) { return erand48(xseed); } ^~~ srand hts_os.c: In function 'hts_drand48': hts_os.c:35:35: warning: implicit declaration of function 'drand48'; did you mean 'srand'? [-Wimplicit-function-declaration] double hts_drand48(void) { return drand48(); } ^~~ srand hts_os.c: In function 'hts_lrand48': hts_os.c:36:35: warning: implicit declaration of function 'lrand48'; did you mean 'srand'? [-Wimplicit-function-declaration] double hts_lrand48(void) { return lrand48(); } ^~~ srand "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o md5.o md5.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o multipart.o multipart.c In file included from htslib/hts.h:35, from hts_internal.h:29, from multipart.c:33: multipart.c: In function 'multipart_read': multipart.c:81:27: warning: unknown conversion type character 'z' in format [-Wformat=] hts_log_debug("Opening part #%zu of %zu: \"%.120s%s\"", ^~~~~~~~~~~~ htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, __VA_ARGS__)
multipart.c:81:27: warning: unknown conversion type character 'z' in format [-Wformat=] hts_log_debug("Opening part #%zu of %zu: \"%.120s%s\"", ^
~~~~~~~~~~~ htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, __VA_ARGS__)
multipart.c:81:27: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] hts_log_debug("Opening part #%zu of %zu: \"%.120s%s\"", ^
~~~~~~~~~~~ fp->current+1, fp->nparts, p->url,htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'
define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, __VA_ARGS__)
multipart.c:81:27: warning: too many arguments for format [-Wformat-extra-args] hts_log_debug("Opening part #%zu of %zu: \"%.120s%s\"", ^
~~~~~~~~~~~ htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, __VA_ARGS__)
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o probaln.o probaln.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o realn.o realn.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o regidx.o regidx.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o sam.o sam.c In file included from htslib/hts.h:35, from htslib/sam.h:31, from sam.c:35: sam.c: In function 'sam_read1': sam.c:1439:29: warning: unknown conversion type character 'l' in format [-Wformat=] hts_log_warning("Parse error at line %lld", (long long)fp->lineno); ^
~~~~~htslib/hts_log.h:78:65: note: in definition of macro 'hts_log_warning'define hts_log_warning(...) hts_log(HTS_LOG_WARNING, func, __VA_ARGS__)
sam.c:1439:29: warning: too many arguments for format [-Wformat-extra-args] hts_log_warning("Parse error at line %lld", (long long)fp->lineno); ^
~~~~~htslib/hts_log.h:78:65: note: in definition of macro 'hts_log_warning'define hts_log_warning(...) hts_log(HTS_LOG_WARNING, func, __VA_ARGS__)
sam.c: In function 'bam_hdr_write': sam.c:233:5: warning: 'strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] strncpy(buf, "BAM\1", 4); ^
~~~~~~~ "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o synced_bcf_reader.o synced_bcf_reader.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o vcf_sweep.o vcf_sweep.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o tbx.o tbx.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o textutils.o textutils.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o thread_pool.o thread_pool.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o vcf.o vcf.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o vcfutils.o vcfutils.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_codecs.o cram/cram_codecs.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_decode.o cram/cram_decode.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_encode.o cram/cram_encode.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_external.o cram/cram_external.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_index.o cram/cram_index.c "C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_io.o cram/cram_io.c cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directoryinclude
compilation terminated. make[1]: [Makefile.Rhtslib.win:131: cram/cram_io.o] Error 1 make[1]: Leaving directory '/c/Users/dell/AppData/Local/Temp/RtmpsTRXyv/R.INSTALL24fc3c222fea/Rhtslib/src-i386/htslib-1.7' make: [Makevars.common:24: htslib] Error 2 ERROR: compilation failed for package 'Rhtslib'