When compiling cram/cram_io.c
during installation of Rhtslib
, I recieved the following error:
cram/cram_io.c:57:19: fatal error: bzlib.h: No such file or directory
#include <bzlib.h>
Usually, I can resolve such compiler/linker errors (arising from install.packages
) using withr::with_makevars
to supplement the package's Makevars with an include or linking directive. In this case I tried
withr::with_makevars(c(CFLAGS="-I/some/dir/include"), biocLite("Rhtslib"), assignment="+=")
Unfortunately, this ended in the same error and the specified flag was not included in the compilation commands. Are BiocInstaller::biocLite and withr::with_makevars incompatible?
In the end, I was able to install Rhtslib
with
withr::with_makevars(c(CFLAGS="-I/some/dir/include"), devtools::install_bioc("Rhtslib"), assignment="+=")
I'm mainly just wondering if there is some additional syntax that is needed get with_makevars
working with biocLite
directly.
Session Info
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /admin/opt/common/CentOS_7/R/R-3.5.1/lib64/R/lib/libRblas.so
LAPACK: /admin/opt/common/CentOS_7/R/R-3.5.1/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.1 BiocInstaller_1.30.0 tools_3.5.1
[4] withr_2.1.2 memoise_1.1.0 knitr_1.20
[7] digest_0.6.16 devtools_1.13.6
On Mac OS X 10.13, there's a binary for Rhtslib
, but I was able to generate a similar include error by forcing installation from source - i.e., biocLite("Rhtslib", type="source")
- ending with clang
failing to find lzma.h
.
Good catch on the outdated
devtools::install_bioc
! I did think referencing the deprecated SVN was odd, but didn't check the version.I cloned the
Rhtslib
repo. First, just to confirm the issue is withRhtslib
and notbiocLite
, I attempted usingwith_makevars
oninstall.packages("local/Rhtslib", type="source", repos=NULL)
, which failed as above. Second, I added my include path toMakevars.Rhtslib
, as you suggested. Installing from source then works fine.BTW, I think you meant to link to the
devtools
issue you created.Hi,
This problem should be addressed in Rhtslib 1.17.5. See https://github.com/Bioconductor/Rhtslib/pull/8#issuecomment-531909522
If every goes well on tomorrow's build report ( https://bioconductor.org/checkResults/3.10/bioc-LATEST/ ), I'll port to the RELEASE310 branch.
Best,
H.
I backported the fix yesterday to Rhtslib 1.16.2. Rhtslib 1.16.2 should become available via
BiocManager::install()
in the next 24h or so.Best,
H.
Rhtslib 1.16.2 is now available: https://bioconductor.org/packages/3.9/Rhtslib
Cheers,
H.