Installation error if message implemented in .Rprofile
1
1
Entering edit mode
Jeremy ▴ 10
@78d55e95
Last seen 3.6 years ago
United Kingdom

Rsamtools fails to install if a message is printed from .Rprofile. (I had print("JDEnvironment loaded") in my .Rprofile)

Bioconductor version 3.12 (BiocManager 1.30.12), R 4.0.3 (2020-10-10)
Installing package(s) 'Rsamtools'
trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/Rsamtools_2.6.0.tar.gz'
Content type 'application/x-gzip' length 2906572 bytes (2.8 MB)
==================================================
downloaded 2.8 MB
[1] "JDEnvironment loaded"
* installing *source* package ‘Rsamtools’ ...
** using staged installation
** libs
gcc -std=c99 -I"/usr/local/Cluster-Apps/R/R.4.0.3/include" -DNDEBUG [1] "JDEnvironment loaded" -D_FILE_OFFSET_BITS=64 -[...]
gcc: error: [1]: No such file or directory

Obviously, this message is passed on to gcc as debug message without correct quotation. Installation works fine after removing this message.

Perhaps it is bad practice to print from .Rprofile; however, I have yet not encountered another package having difficulties being installed with this.

Rsamtools • 1.1k views
ADD COMMENT
1
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 3 hours ago
EMBL Heidelberg

A similar issue has been reported recently for rhdf5filters (https://github.com/grimbough/rhdf5filters/issues/11) and rhdf5 (https://github.com/grimbough/rhdf5/issues/81). They all use the same mechanism for extracting the flags used during compilation, and fall over when .Rprofile leads to some printing.

Out of interest, are the messages printed using cat() or message() (or something else)?

I wonder if something something has changed recently, as this code has been stable for a few years and I've never seen the issue reported before. Now there's been a flurry of reports across different packages and users in the space of a few weeks.

I'd suggest opening an issue on the Rsamtools GitHub page (https://github.com/Bioconductor/Rsamtools/issues/). I asked for some guidance on the developers mailing list here and came up with hopefully a workable solution, feel free to include that in the issue.

ADD COMMENT

Login before adding your answer.

Traffic: 951 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