Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails for package ‘reshape2’ on Debian 12 #95

Open
bathyscapher opened this issue Jul 4, 2024 · 0 comments
Open

Compilation fails for package ‘reshape2’ on Debian 12 #95

bathyscapher opened this issue Jul 4, 2024 · 0 comments

Comments

@bathyscapher
Copy link

Hello everyone,

when trying to install the Bioconductor package DADA2, which depends on reshape2, on Debian 12 in R 4.4.1 it runs into an error due to missing dependencies.
So, I tried to install reshape2 first (with and without dependencies = TRUE, but received this error:

> install.packages("reshape2", dependencies = TRUE)
Installing package into ‘/home/r/R/x86_64-pc-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/reshape2_1.4.4.tar.gz'
Content type 'application/x-gzip' length 37307 bytes (36 KB)
==================================================
downloaded 36 KB

* installing *source* package ‘reshape2’ ...
** package ‘reshape2’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (Debian 12.2.0-14) 12.2.0’
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/Rcpp/include'     -fpic  -g -O2 -ffile-prefix-map=/home/jranke/git/r-backports/bookworm/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -c RcppExports.cpp -o RcppExports.o
In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp/routines.h:26,
                 from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:128,
                 from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:27,
                 from RcppExports.cpp:4:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = true; std::streamsize = long int]’:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:53:20: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   53 |         Rprintf("%.*s", num, s);
      |                  ~~^~   ~~~
      |                    |    |
      |                    int  std::streamsize {aka long int}
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = false; std::streamsize = long int]’:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:57:21: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   57 |         REprintf("%.*s", num, s);
      |                   ~~^~   ~~~
      |                     |    |
      |                     int  std::streamsize {aka long int}
In file included from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:181:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/print.h: In function ‘void Rcpp::warningcall(SEXP, const std::string&)’:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/print.h:30:19: error: format not a string literal and no format arguments [-Werror=format-security]
   30 |     Rf_warningcall(call, s.c_str());
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make: *** [/usr/lib/R/etc/Makeconf:204: RcppExports.o] Error 1
ERROR: compilation failed for package ‘reshape2’
* removing ‘/home/r/R/x86_64-pc-linux-gnu-library/4.4/reshape2’
Warning in install.packages :
  installation of package ‘reshape2’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpFOHd13/downloaded_packages’

I am a bit confused, because I was unable to find anything related to the error (especially /usr/local/lib/R/site-library/Rcpp/include/Rcpp/print.h:30:19: error: format not a string literal and no format arguments [-Werror=format-security]) in the internet.
Especially, as both, reshape2 itself and dada2 are widely used packages.
So, I guess the error must be related to my setup.
I completely removed and reinstalled R without any change.
Now I hope that this error seems familiar to any of you (?).

Thank you in advance,
bathyscapher

> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Debian GNU/Linux 12 (bookworm)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               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    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Vienna
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] BiocManager_1.30.23     httr_1.4.3              zlibbioc_1.50.0         compiler_4.4.1         
 [5] R6_2.5.1                IRanges_2.38.0          XVector_0.44.0          tools_4.4.1            
 [9] GenomeInfoDbData_1.2.12 crayon_1.5.1            Biostrings_2.72.1       UCSC.utils_1.0.0       
[13] S4Vectors_0.42.0        jsonlite_1.8.8          BiocGenerics_0.50.0     GenomeInfoDb_1.40.1    
[17] stats4_4.4.1   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant