Closed lucasnell closed 5 years ago
The issue seems to stem from the lzma_...
functions defined in os/lzma_stub.h
not being present in the shared library for some reason. I made a much simpler package here that only includes the bgzf.h
header to bgzip-compress an input file. This reproduces the same R CMD check
warnings.
I manually added the lzma_...
functions defined in os/lzma_stub.h
on a fork of Rhtslib, and this fixes the issue for me. You can find the changes here.
I think the problem instead is that your package uses liblzma and that needs to be available on travis. It would seem also that simply loading Rhtslib on your travis builder would generate this problem?
You're right that a package that simply loads Rhtslib (on my local Mac) causes this problem. I tried installing xz
on travis and on my local machine (per this comment) to check my package, and in neither case is the problem gone.
Next I ran R CMD check
on a clone of the most recent version of Rhtslib on my Mac, and the checks produce the same warnings.
It seems like maybe it's weirdness with how xz
(which contains the lzma
library on macOS) links to the lzma
library? There are some other issues in other programs that seem related to this, such as this.
I tried doing R CMD check on Rhtslib on osx on travis, and that fails in the same way (link here).
I next changed line 14 of Rhtslib's Makevars
to the following:
PKG_LIBS="${USRLIB_DIR}/libhts.a" "/usr/local/lib/liblzma.a"
This fixes the problem when checking Rhtslib (link here), although I'm guessing that there's a more robust way of implementing this. It also fixes it for linking packages on my local machine (as long as those packages also have PKG_LIBS=/usr/local/lib/liblzma.a
added to their Makevars
).
Hi,
Don't run R CMD check
on Rhtslib and just install the binary. The binary is statically linked to lzma so will load on any system. See https://bioconductor.org/packages/Rhtslib for the details (in particular on how to install the package).
We put a lot of effort in producing Windows and Mac binaries for all Bioconductor packages and most of them are statically linked to avoid the kind of problems you're encountering.
H.
Okay, thanks for the sanity check. I fixed the problem by no longer importing Rhtslib
, just zlibbioc
and linking the package to the static lzma library. Thanks again for your help.
Hello,
Thanks for this great package. It's saved me a bunch of headaches.
I'm using it for an R package I'm developing (link to relevant branch here), which is working well on Linux and Windows. On Mac, it's building fine on my local computer, but when I run
R CMD check
locally or on Travis-CI (link here), I get the following output:Any ideas on how to fix this? Thanks!