Skip to content
Prev 7172 / 21307 Next

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

Hi,

Sorry for bothering you with another update on this matter. I changed 
the Makevars file to the following:

    SAMTOOLS_PATH=\
         `echo 'cat(system.file("usrlib", package="Rsamtools",
    mustWork=TRUE), .Platform[["r_arch"]], sep="/")' |\
             "${R_HOME}/bin/R" --vanilla --slave`
    SAMTOOLS_LIBS="$(SAMTOOLS_PATH)/libbam.a" "$(SAMTOOLS_PATH)/libbcf.a"\
         "$(SAMTOOLS_PATH)/libtabix.a" -lz -pthread
    SAMTOOLS_CPPFLAGS=-D_USE_KNETFILE -DBGZF_CACHE -D_FILE_OFFSET_BITS=64 \
         -D_LARGEFILE64_SOURCE

    PKG_LIBS=$(SAMTOOLS_LIBS)
    PKG_CPPFLAGS=$(SAMTOOLS_CPPFLAGS)

Note the ".Platform..." in the second line. As to be expected, now it 
works on R-devel 3.2.0. Is this a good approach to use? Should the 
documentation of Rsamtools be updated in that direction or is my R-devel 
wrongly putting the static libs in usrlib/x86_64?

The Windows problem I reported earlier today is more or less the same: 
the library objects are not found and therefore my package does not find 
call entries for the tabix API functions that I call from my package.

Any help is gratefully appreciated!

Best regards,
Ulrich
On 03/19/2015 06:11 PM, Nathaniel Hayden wrote: