Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install Rhtslib using mran 4.0.2 #119

Open
ckrushton opened this issue Oct 15, 2020 · 3 comments
Open

Unable to install Rhtslib using mran 4.0.2 #119

ckrushton opened this issue Oct 15, 2020 · 3 comments

Comments

@ckrushton
Copy link

Hello,

When trying to install the package "Rhtslib" from Bioconductor, I encounter the following error when the package tries to load:


** installing vignettes
** testing if installed package can be loaded
Microsoft R Open 4.0.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2020 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 16 cores).

Default CRAN mirror snapshot taken on 2020-07-16.
See: https://mran.microsoft.com/.

Error: package or namespace load failed for ‘Rhtslib’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/libs/Rhtslib.so':
  /mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/libs/Rhtslib.so: undefined symbol: lzma_stream_buffer_bound


After some digging, it appears this is related to the version of liblzma (V5.2.5) and xz (V5.2.5) which conflicts with mran V4.0.2 somehow on my system (Ubuntu 20.04.1).

I managed to successfully installed "Rhtslib" in a separate conda environment containing vanilla (non-mran) R V4.0.2 on the same system, which contains liblzma and xz V5.2.5 in the same environment. However, copying that Rhtslib install over to my mran library yielded a similar error: "undefined symbol: lzma_easy_buffer_encode". I have tried reinstalling mran, installing the package using root, and installing Rhtslib on the command line from github using "R CMD INSTALL", with no success.

I managed to somewhat reproduce this error on another system of mine (Ubuntu 18.04.5 LTS) with a fresh install of mran:

** installing vignettes
** testing if installed package can be loaded
Microsoft R Open 4.0.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2020 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 6 cores).

Default CRAN mirror snapshot taken on 2020-07-16.
See: https://mran.microsoft.com/.

Error: package or namespace load failed for ‘Rhtslib’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/libs/Rhtslib.so':
  /home/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/libs/Rhtslib.so: undefined symbol: lzma_easy_buffer_encode

Here is the full install log from the Ubuntu 20.04 system:

(base) crushton@thanos:~$ R

R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Microsoft R Open 4.0.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2020 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 16 cores).

Default CRAN mirror snapshot taken on 2020-07-16.
See: https://mran.microsoft.com/.

> BiocManager::install("Rhtslib")
Bioconductor version 3.11 (BiocManager 1.30.10), R 4.0.2 (2020-06-22)
Installing package(s) 'Rhtslib'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1437k  100 1437k    0     0  6532k      0 --:--:-- --:--:-- --:--:-- 6502k
Microsoft R Open 4.0.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2020 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 16 cores).

Default CRAN mirror snapshot taken on 2020-07-16.
See: https://mran.microsoft.com/.

* installing *source* package ‘Rhtslib’ ...
** using non-staged installation via StagedInstall field
** libs
cd "htslib-1.7" && make -f "/opt/microsoft/ropen/4.0.2/lib64/R/etc/Makeconf" -f "Makefile.Rhtslib"
make[1]: Entering directory '/tmp/RtmpWQhDZe/R.INSTALL1d9ffb408dd770/Rhtslib/src/htslib-1.7'
Makefile.Rhtslib:128: warning: overriding recipe for target '.c.o'
/opt/microsoft/ropen/4.0.2/lib64/R/etc/Makeconf:159: warning: ignoring old recipe for target '.c.o'
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o kfunc.o kfunc.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o knetfile.o knetfile.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o kstring.o kstring.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o bcf_sr_sort.o bcf_sr_sort.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o bgzf.o bgzf.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o errmod.o errmod.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o faidx.o faidx.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o hfile.o hfile.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.7"' > version.h
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o hts.o hts.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o hts_os.o hts_os.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o md5.o md5.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o multipart.o multipart.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o probaln.o probaln.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o realn.o realn.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o regidx.o regidx.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o sam.o sam.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o synced_bcf_reader.o synced_bcf_reader.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o vcf_sweep.o vcf_sweep.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o tbx.o tbx.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o textutils.o textutils.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o thread_pool.o thread_pool.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o vcf.o vcf.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o vcfutils.o vcfutils.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_codecs.o cram/cram_codecs.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_decode.o cram/cram_decode.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_encode.o cram/cram_encode.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_external.o cram/cram_external.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_index.o cram/cram_index.c
In file included from /usr/include/string.h:495,
                 from cram/cram_index.c:57:
In function ‘memcpy’,
    inlined from ‘kputsn’ at ./htslib/kstring.h:148:2,
    inlined from ‘kputs’ at ./htslib/kstring.h:156:9,
    inlined from ‘cram_index_build’ at cram/cram_index.c:571:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin_memcpy’ specified bound 18446744073709551614 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_io.o cram/cram_io.c
cram/cram_io.c: In function ‘cram_populate_ref’:
cram/cram_io.c:2178:27: warning: ‘.tmp_’ directive writing 5 bytes into a region of size between 1 and 4096 [-Wformat-overflow=]
 2178 |      sprintf(path_tmp, "%s.tmp_%d_%u_%u", path, pid, thrid, t);
      |                           ^~~~~
cram/cram_io.c:2178:24: note: using the range [0, 4294967295] for directive argument
 2178 |      sprintf(path_tmp, "%s.tmp_%d_%u_%u", path, pid, thrid, t);
      |                        ^~~~~~~~~~~~~~~~~
cram/cram_io.c:2178:24: note: using the range [0, 4294967295] for directive argument
In file included from /usr/include/stdio.h:867,
                 from cram/cram_io.c:49:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 4134 bytes into a destination of size 4096
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_samtools.o cram/cram_samtools.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/cram_stats.o cram/cram_stats.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/files.o cram/files.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/mFILE.o cram/mFILE.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/open_trace_file.o cram/open_trace_file.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/pooled_alloc.o cram/pooled_alloc.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/rANS_static.o cram/rANS_static.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/sam_header.o cram/sam_header.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o cram/string_alloc.o cram/string_alloc.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64 -c -o hfile_libcurl.o hfile_libcurl.c
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 hfile_libcurl.o
ranlib libhts.a
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o kfunc.pico kfunc.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o knetfile.pico knetfile.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o kstring.pico kstring.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o bcf_sr_sort.pico bcf_sr_sort.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o bgzf.pico bgzf.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o errmod.pico errmod.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o faidx.pico faidx.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o hfile.pico hfile.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o hfile_net.pico hfile_net.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o hts.pico hts.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o hts_os.pico hts_os.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o md5.pico md5.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o multipart.pico multipart.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o probaln.pico probaln.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o realn.pico realn.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o regidx.pico regidx.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o sam.pico sam.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o synced_bcf_reader.pico synced_bcf_reader.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o vcf_sweep.pico vcf_sweep.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o tbx.pico tbx.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o textutils.pico textutils.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o thread_pool.pico thread_pool.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o vcf.pico vcf.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o vcfutils.pico vcfutils.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_codecs.pico cram/cram_codecs.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_decode.pico cram/cram_decode.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_encode.pico cram/cram_encode.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_external.pico cram/cram_external.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_index.pico cram/cram_index.c
In file included from /usr/include/string.h:495,
                 from cram/cram_index.c:57:
In function ‘memcpy’,
    inlined from ‘kputsn’ at ./htslib/kstring.h:148:2,
    inlined from ‘kputs’ at ./htslib/kstring.h:156:9,
    inlined from ‘cram_index_build’ at cram/cram_index.c:571:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: ‘__builtin_memcpy’ specified bound 18446744073709551614 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_io.pico cram/cram_io.c
cram/cram_io.c: In function ‘cram_populate_ref’:
cram/cram_io.c:2178:27: warning: ‘.tmp_’ directive writing 5 bytes into a region of size between 1 and 4096 [-Wformat-overflow=]
 2178 |      sprintf(path_tmp, "%s.tmp_%d_%u_%u", path, pid, thrid, t);
      |                           ^~~~~
cram/cram_io.c:2178:24: note: using the range [0, 4294967295] for directive argument
 2178 |      sprintf(path_tmp, "%s.tmp_%d_%u_%u", path, pid, thrid, t);
      |                        ^~~~~~~~~~~~~~~~~
cram/cram_io.c:2178:24: note: using the range [0, 4294967295] for directive argument
In file included from /usr/include/stdio.h:867,
                 from cram/cram_io.c:49:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 4134 bytes into a destination of size 4096
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_samtools.pico cram/cram_samtools.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/cram_stats.pico cram/cram_stats.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/files.pico cram/files.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/mFILE.pico cram/mFILE.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/open_trace_file.pico cram/open_trace_file.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/pooled_alloc.pico cram/pooled_alloc.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/rANS_static.pico cram/rANS_static.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/sam_header.pico cram/sam_header.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o cram/string_alloc.pico cram/string_alloc.c
gcc -std=gnu99 -DU_STATIC_IMPLEMENTATION -O2 -g  -fpic -I. -DU_STATIC_IMPLEMENTATION -D_FILE_OFFSET_BITS=64  -c -o hfile_libcurl.pico hfile_libcurl.c
gcc -std=gnu99 -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 hfile_libcurl.pico -lz -lm -lbz2 -llzma -lcurl -lpthread
ln -sf libhts.so libhts.so.2
make[1]: Leaving directory '/tmp/RtmpWQhDZe/R.INSTALL1d9ffb408dd770/Rhtslib/src/htslib-1.7'
mkdir -p "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/include/htslib"
cd "htslib-1.7/htslib" && cp * "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/include/htslib" && cd .. && cp textutils_internal.h hts_internal.h "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/include"gcc -std=gnu99 -I/opt/microsoft/ropen/4.0.2/lib64/R/include -DNDEBUG -D_FILE_OFFSET_BITS=64 -I"/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/include" -I'/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/zlibbioc/include' -DU_STATIC_IMPLEMENTATION   -fpic  -DU_STATIC_IMPLEMENTATION -O2 -g  -c R_init_Rhtslib.c -o R_init_Rhtslib.o
mkdir -p "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/usrlib"
cd "htslib-1.7" && cp libhts.so libhts.a "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/usrlib"
cd "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/usrlib" && ln -s libhts.so libhts.so.2
gcc -std=gnu99 -shared -L/opt/microsoft/ropen/4.0.2/lib64/R/lib -o Rhtslib.so R_init_Rhtslib.o /mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/usrlib/libhts.a -lcurl -L/opt/microsoft/ropen/4.0.2/lib64/R/lib -lR
mkdir -p "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/testdata/tabix"
cd "htslib-1.7/test" && (cp *.sam *.bam *.vcf *.bcf *.cram *.fa *.fa.fai *.gff *.bed "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/testdata" 2>/dev/null || true) && cd tabix && (cp *.sam *.bam *.vcf *.bcf *.cram *.fa *.fa.fai *.gff *.bed "/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/testdata/tabix" 2>/dev/null || true)
installing to /mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Microsoft R Open 4.0.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2020 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 16 cores).

Default CRAN mirror snapshot taken on 2020-07-16.
See: https://mran.microsoft.com/.

** help
*** installing help indices
** building package indices
Microsoft R Open 4.0.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2020 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 16 cores).

Default CRAN mirror snapshot taken on 2020-07-16.
See: https://mran.microsoft.com/.

** installing vignettes
** testing if installed package can be loaded
Microsoft R Open 4.0.2
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2020 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 16 cores).

Default CRAN mirror snapshot taken on 2020-07-16.
See: https://mran.microsoft.com/.

Error: package or namespace load failed for ‘Rhtslib’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/libs/Rhtslib.so':
  /mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib/libs/Rhtslib.so: undefined symbol: lzma_stream_buffer_bound
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib’
* restoring previous ‘/mnt/thanos_lv/crushton/R/x86_64-pc-linux-gnu-library/4.0/Rhtslib’

The downloaded source packages are in
        ‘/tmp/RtmplSXT2k/downloaded_packages’
Installation path not writeable, unable to update packages: checkpoint, curl,
  doParallel, iterators, jsonlite, MASS, R6, RUnit
Warning message:
In install.packages(...) :
  installation of package ‘Rhtslib’ had non-zero exit status

Any help or suggestions would be greately appreciated

@HUNNNGRY
Copy link

just met the same problem, any ideas on this ?

@ckrushton
Copy link
Author

I was unable to find a workaround, and just ended installing a vanilla version of R instead.

@zhangge-uc
Copy link

A workaround: add PKG_LIBS+=-llzma in your ~/.R/Makevars file. You can create one if the Makevars file does not exist. If you try to install the package as root, then the path should be /root/.R/Makevars.

Make sure that you have the lzma devel package installed on your system. Mine is xz-devel (fedora).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants