[Bioc-devel] Linking to Rsamtools does not work on latest R-devel

Ulrich Bodenhofer bodenhofer at bioinf.jku.at
Fri Mar 20 10:09:49 CET 2015

Hi Nate,

Thanks for your quick and enlightening reply!

No, I was actually not aware that the suggested code for the Makevars 
file has changed. I updated that in my package and the problem persists: 
the statement in the Makevars file (also the updated one in the 
documentation you suggested) assumes the static libs to be in usrlib/, 
whereas my R-devel (I reverted to the same version as the one on which 
the BioC-devel build/check reports are currently based on) places them 
in usrlib/x86_64 when installing the Rsamtools package. Consequently, 
the problem with the VariantAnnotation package persists too (which is 
equally problematic for me, since my package also suggests 

Could it be possible that something is wrong with the way my R-devel was 
built? Below I am attaching the configure flags that we use to build 
R-devel. Could my problem be related to the r_arch variable? The target 
system is actually a Dell multi-core server running CentOS 6.6 (x86_64). 
If that is the problem, the question is probably off-topic on this 
mailing list. However, the same problem that the libraries cannot be 
located properly also appears on Windows (Win7 Pro). On both systems, I 
am using a recent R 3.2.0 devel with Bioconductor 3.1 and Rsamtools 1.19.45.

Thanks and best regards,


./configure \
         CC=gcc \
         CXX=g++ \
         F77=gfortran \
         FC=gfortran \
         F90=gfortran \
         OBJC=gcc \
         CFLAGS="-g -O3 -m64" \
         CXXFLAGS="-g -O3 -m64" \
         FFLAGS="-g -O3 -m64" \
         FCFLAGS="-g -O3 -m64" \
         LDFLAGS="${AMDLIB}" \
         r_arch=x86_64 \
         --prefix="${INSTDIR}" \
         --enable-memory-profiling \
         --enable-R-profiling \
         --enable-R-shlib \
         --enable-shared \
         --with-tcltk \
         --with-libpng \
         --with-jpeglib \

The variable INSTDIR of course points to the directory where we install 
R-devel. AMDLIB points to the acml4.4.0 numeric library.

On 03/19/2015 06:11 PM, Nathaniel Hayden wrote:
> Hi, Ulrich. I just built R-devel (on Ubuntu) from trunk and installed 
> Rsamtools using biocLite; the libraries ended up where I expect them:
> > dir(system.file(package="Rsamtools", "usrlib"))
> [1] "libbam.a"   "libbcf.a"   "libtabix.a"
> > sessionInfo()
> R Under development (unstable) (2015-03-19 r68032)
> Platform: x86_64-unknown-linux-gnu (64-bit)
> Running under: Ubuntu 14.04.2 LTS
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> attached base packages:
> [1] parallel  stats4    stats     graphics  grDevices utils datasets
> [8] methods   base
> other attached packages:
> [1] Rsamtools_1.19.44     Biostrings_2.35.11    XVector_0.7.4
> [4] GenomicRanges_1.19.46 GenomeInfoDb_1.3.14   IRanges_2.1.43
> [7] S4Vectors_0.5.22      BiocGenerics_0.13.7
> loaded via a namespace (and not attached):
> [1] zlibbioc_1.13.2 bitops_1.0-6
> Have you seen the updated recommendations for linking to the libraries 
> in the Rsamtools Using samtools C libraries vignette? 
> http://bioconductor.org/packages/devel/bioc/vignettes/Rsamtools/inst/doc/Rsamtools-UsingCLibraries.pdf
> It was a breaking change in how Rsamtools reverse dependencies are 
> supposed to find the libraries prompted by the new R CMD check 
> warnings re: GNU make-specific extensions in non-Windows Makevars.
> On 03/19/2015 07:59 AM, Ulrich Bodenhofer wrote:
>> Hi,
>> I am currently finishing a package for submission to Bioconductor 3.1
>> and, therefore, I am trying to make everything work on the latest
>> R-devel, but I have an issue with linking to Rsamtools. It seems that
>> Rsamtools installs the libraries libbam, libbcf, and libtabix to the
>> usrlib/x86_64/ directory in its package directory, but packages linking
>> to Rsamtools seem to expect the libraries in usrlib/. Because of this
>> problem, neither my package nor other packages relying on Rsamtools,
>> e.g. VariantAnnotation, can be installed. The check results on
>> http://bioconductor.org/checkResults/3.1/bioc-LATEST/ tell me that there
>> is no such issue on the BioC build servers, but the R-devel used on
>> these machines is much older than mine. Any clues?
>> I am using "R Under development (unstable) (2015-03-18 r68019)" on
>> 64-bit Linux which I installed today. However, the problem already
>> occured on last week's R-devel. The problem is really serious for me
>> because I cannot test my package as long as it cannot link to Rsamtools.
>> I want to emphasize that my package passes
>> all checks without any errors or warnings on R 3.1.2 and Bioconductor
>> 3.1. So I do not think I am doing anything wrong (and the developers of
>> VariantAnnotation neither).
>> Any help is gratefully appreciated.
>> Thanks,
>> Ulrich
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel

More information about the Bioc-devel mailing list