Is BiocInstaller::biocLite incompatible with withr::with_makevars?
1
0
Entering edit mode
merv ▴ 140
@mmfansler-13248
Last seen 6 weeks ago
MSKCC | New York, NY

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.

biocLite package installation withr biocinstaller rhtslib • 2.5k views
ADD COMMENT
2
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

When I use devtools::install_bioc() I get a very old version of Rhtslib -- it does a checkout from (our no longer current) svn and installs

> packageVersion("Rhtslib")
[1] '1.9.2'

whereas the current version of Rhtslib (from https://bioconductor.org/packages/Rhtslib) is 1.12.1. I reported this to the devtools repository https://github.com/r-lib/devtools/issues/1858 ; it seems like some problem with the devtools release management, since the problem has been addressed in source for some time.

The underlying problem is that the current Rhtslib doesn't support user-specified flags; I reported this to the Rhtslib git repository https://github.com/Bioconductor/Rhtslib/issues/3

I think you would need to download the source for the package and manually edit src/htslib/Makevars.Rhtslib to correct this in the current version.

ADD COMMENT
0
Entering edit mode

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 with Rhtslib and not biocLite, I attempted using with_makevars on install.packages("local/Rhtslib", type="source", repos=NULL), which failed as above. Second, I added my include path to Makevars.Rhtslib, as you suggested. Installing from source then works fine.

BTW, I think you meant to link to the devtools issue you created.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

Rhtslib 1.16.2 is now available: https://bioconductor.org/packages/3.9/Rhtslib

Cheers,

H.

ADD REPLY

Login before adding your answer.

Traffic: 574 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6