const-ae / einsum

Einstein Summation for Arrays in R
https://const-ae.github.io/einsum/
Other
10 stars 1 forks source link

einsum install fails on R 4.4. #5

Closed DanielBonnery closed 5 months ago

DanielBonnery commented 5 months ago

My system:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

R version


R version 4.4.0 (2024-04-24) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

Install via git:


> devtools::install_github("const-ae/einsum")
Downloading GitHub repo const-ae/einsum@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                           
2: CRAN packages only            
3: None                          
4: Rcpp (1.0.11 -> 1.0.12) [CRAN]
5: glue (1.6.2  -> 1.7.0 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpgHcp6K/remotes9dead744e35d7/const-ae-einsum-94b88ba/DESCRIPTION’ ...
─  preparing ‘einsum’:
✔  checking DESCRIPTION meta-information
─  cleaning src
─  installing the package to process help pages
         -----------------------------------
─  installing *source* package ‘einsum’ ...
   ** using staged installation
   ** libs
   using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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=/build/r-base-H8urij/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -Wall -pedantic -fdiagnostics-color=always  -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:n 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: eld precision specifier ‘.*expects argument of type ‘int but argument 2 has type ‘std::streamsize{aka ‘long int-Wformat=
      53 |         Rprintf("%.*s num
         |                  ~~^~ ~~~
         |                    |  |
         |                    intstd::streamsize {aka long int}
   /usr/local/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:n 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: eld precision specifier ‘.*expects argument of type ‘int but argument 2 has type ‘std::streamsize{aka ‘long int-Wformat=
      57 |         REprintf("%.*s num
         |                   ~~^~ ~~~
         |                     |  |
         |                     intstd::streamsize {aka long int}
   In file included from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:181
                    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/print.h:n function ‘void Rcpp::warningcall(SEXP, const string&)
   /usr/local/lib/R/site-library/Rcpp/include/Rcpp/print.h:30:19:error: t 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] Erreur 1
   ERROR: compilation failed for package ‘einsum’
─  removing ‘/tmp/RtmpysaWUa/Rinst9e34d776f714d/einsum’
         -----------------------------------
   ERROR: package installation failed
Erreur : Failed to install 'einsum' from GitHub:
  ! System command 'R' failed

Install via cran


  > install.packages('einsum')
Installation du package dans ‘/home/dbonnery/R/x86_64-pc-linux-gnu-library/4.4’
(car ‘lib’ n'est pas spécifié)
essai de l'URL 'https://cloud.r-project.org/src/contrib/einsum_0.1.2.tar.gz'
Content type 'application/x-gzip' length 134349 bytes (131 KB)
==================================================
downloaded 131 KB

* installing *source* package ‘einsum’ ...
** package ‘einsum’ correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs
using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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=/build/r-base-H8urij/r-base-4.4.0=. -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,
                 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/print.h: In function ‘void Rcpp::warningcall(SEXP, const 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] Erreur 1
ERROR: compilation failed for package ‘einsum’
* removing ‘/home/dbonnery/R/x86_64-pc-linux-gnu-library/4.4/einsum’

Les packages source téléchargés sont dans
    ‘/tmp/RtmpsLzvdD/downloaded_packages’
Message d'avis :
Dans install.packages("einsum") :
  l'installation du package ‘einsum’ a eu un statut de sortie non nul
const-ae commented 5 months ago

I think updating the Rcpp version to 1.0.12 should fix the issue (https://github.com/const-ae/sparseMatrixStats/issues/28).

Please let me know if that works for you.

DanielBonnery commented 5 months ago

Thank you for your speed of light reply.

It solved the issue

Details below

`> sapply(c("Rcpp"), packageVersion) $Rcpp [1] 1 0 11

install.packages("Rcpp") Installation du package dans ‘/home/dbonnery/R/x86_64-pc-linux-gnu-library/4.4’ (car ‘lib’ n'est pas spécifié) essai de l'URL 'https://cloud.r-project.org/src/contrib/Rcpp_1.0.12.tar.gz' Content type 'application/x-gzip' length 3430494 bytes (3.3 MB)

downloaded 3.3 MB

Les packages source téléchargés sont dans ‘/tmp/RtmpDfesc7/downloaded_packages’

install.packages("einsum") Installation du package dans ‘/home/dbonnery/R/x86_64-pc-linux-gnu-library/4.4’ (car ‘lib’ n'est pas spécifié) essai de l'URL 'https://cloud.r-project.org/src/contrib/einsum_0.1.2.tar.gz' Content type 'application/x-gzip' length 134349 bytes (131 KB)

downloaded 131 KB

Les packages source téléchargés sont dans ‘/tmp/RtmpDfesc7/downloaded_packages’

`