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

Can no longer install 'readxl': ERROR: compilation failed for package ‘readxl’ #745

Closed
arne-henningsen opened this issue May 2, 2024 · 3 comments

Comments

@arne-henningsen
Copy link

I can no longer install 'readxl' after I upgrade from R 4.3.3 to R 4.4.0 on Ubuntu 22.04.4 LTS because ERROR: compilation failed for package ‘readxl’. (Well, perhaps upgrading R is not the primary reason for the problem as other things may have changed as well.) I have pasted the outputs of sessionInfo() and install.packages( "readxl" ) below.

sessionInfo()

R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS

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

locale:
 [1] LC_CTYPE=en_DK.UTF-8       LC_NUMERIC=C               LC_TIME=en_DK.UTF-8        LC_COLLATE=en_DK.UTF-8     LC_MONETARY=en_DK.UTF-8   
 [6] LC_MESSAGES=en_DK.UTF-8    LC_PAPER=en_DK.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_DK.UTF-8 LC_IDENTIFICATION=C       

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

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

other attached packages:
[1] countrycode_1.6.0

loaded via a namespace (and not attached):
[1] compiler_4.4.0  tools_4.4.0     rstudioapi_0.13
install.packages( "readxl" )
Installing package into ‘/home/<my_user_name>/R/x86_64-pc-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/readxl_1.4.3.tar.gz'
Content type 'application/x-gzip' length 2093488 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

* installing *source* package ‘readxl’ ...
** package ‘readxl’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -Iunix -I. -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/progress/include'    -fvisibility=hidden -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 cpp11.cpp -o cpp11.o
In file included from /usr/lib/R/site-library/cpp11/include/cpp11/as.hpp:11,
                 from /usr/lib/R/site-library/cpp11/include/cpp11.hpp:5,
                 from /usr/lib/R/site-library/cpp11/include/cpp11/declarations.hpp:8,
                 from cpp11.cpp:5:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp: In member function ‘void cpp11::<unnamed struct>::print()’:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:18: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                 ~^                             ~~~~
      |                  |                             |
      |                  unsigned int                  SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:26: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                         ~^                           ~~~~~~~~~
      |                          |                              |
      |                          unsigned int                   SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:34: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                 ~^                              ~~~~~~~~~
      |                                  |                                 |
      |                                  unsigned int                      SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:42: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                         ~^                                 ~~~~~~~~~
      |                                          |                                    |
      |                                          unsigned int                         SEXP {aka SEXPREC*}
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -Iunix -I. -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/progress/include'    -fvisibility=hidden -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 XlsWorkBook.cpp -o XlsWorkBook.o
In file included from utils.h:3,
                 from ColSpec.h:3,
                 from XlsWorkBook.h:3,
                 from XlsWorkBook.cpp:1:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp: In member function ‘void cpp11::<unnamed struct>::print()’:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:18: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                 ~^                             ~~~~
      |                  |                             |
      |                  unsigned int                  SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:26: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                         ~^                           ~~~~~~~~~
      |                          |                              |
      |                          unsigned int                   SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:34: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                 ~^                              ~~~~~~~~~
      |                                  |                                 |
      |                                  unsigned int                      SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:42: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                         ~^                                 ~~~~~~~~~
      |                                          |                                    |
      |                                          unsigned int                         SEXP {aka SEXPREC*}
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -Iunix -I. -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/progress/include'    -fvisibility=hidden -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 XlsxWorkBook.cpp -o XlsxWorkBook.o
In file included from utils.h:3,
                 from ColSpec.h:3,
                 from XlsxWorkBook.h:3,
                 from XlsxWorkBook.cpp:1:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp: In member function ‘void cpp11::<unnamed struct>::print()’:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:18: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                 ~^                             ~~~~
      |                  |                             |
      |                  unsigned int                  SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:26: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                         ~^                           ~~~~~~~~~
      |                          |                              |
      |                          unsigned int                   SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:34: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                 ~^                              ~~~~~~~~~
      |                                  |                                 |
      |                                  unsigned int                      SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:42: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                         ~^                                 ~~~~~~~~~
      |                                          |                                    |
      |                                          unsigned int                         SEXP {aka SEXPREC*}
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -Iunix -I. -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/progress/include'    -fvisibility=hidden -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 zip.cpp -o zip.o
In file included from /usr/lib/R/site-library/cpp11/include/cpp11/as.hpp:11,
                 from /usr/lib/R/site-library/cpp11/include/cpp11/function.hpp:10,
                 from zip.cpp:5:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp: In member function ‘void cpp11::<unnamed struct>::print()’:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:18: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                 ~^                             ~~~~
      |                  |                             |
      |                  unsigned int                  SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:26: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                         ~^                           ~~~~~~~~~
      |                          |                              |
      |                          unsigned int                   SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:34: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                 ~^                              ~~~~~~~~~
      |                                  |                                 |
      |                                  unsigned int                      SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:42: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                         ~^                                 ~~~~~~~~~
      |                                          |                                    |
      |                                          unsigned int                         SEXP {aka SEXPREC*}
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -Iunix -I. -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/progress/include'    -fvisibility=hidden -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 Read.cpp -o Read.o
In file included from utils.h:3,
                 from ColSpec.h:3,
                 from XlsCell.h:3,
                 from CellLimits.h:3,
                 from SheetView.h:4,
                 from Read.cpp:1:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp: In member function ‘void cpp11::<unnamed struct>::print()’:
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:18: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                 ~^                             ~~~~
      |                  |                             |
      |                  unsigned int                  SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:26: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                         ~^                           ~~~~~~~~~
      |                          |                              |
      |                          unsigned int                   SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:34: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                 ~^                              ~~~~~~~~~
      |                                  |                                 |
      |                                  unsigned int                      SEXP {aka SEXPREC*}
/usr/lib/R/site-library/cpp11/include/cpp11/protect.hpp:337:42: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘SEXP’ {aka ‘SEXPREC*’} [-Wformat=]
  337 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head));
      |                                         ~^                                 ~~~~~~~~~
      |                                          |                                    |
      |                                          unsigned int                         SEXP {aka SEXPREC*}
In file included from Spinner.h:3,
                 from XlsCellSet.h:4,
                 from SheetView.h:8,
                 from Read.cpp:1:
/usr/lib/R/site-library/progress/include/RProgress.h: In member function ‘void RProgress::RProgress::render()’:
/usr/lib/R/site-library/progress/include/RProgress.h:229:17: error: format not a string literal and no format arguments [-Werror=format-security]
  229 |         REprintf(str.c_str());
      |         ~~~~~~~~^~~~~~~~~~~~~
/usr/lib/R/site-library/progress/include/RProgress.h:231:16: error: format not a string literal and no format arguments [-Werror=format-security]
  231 |         Rprintf(str.c_str());
      |         ~~~~~~~^~~~~~~~~~~~~
/usr/lib/R/site-library/progress/include/RProgress.h: In member function ‘void RProgress::RProgress::clear_line(bool, int)’:
/usr/lib/R/site-library/progress/include/RProgress.h:272:15: error: format not a string literal and no format arguments [-Werror=format-security]
  272 |       REprintf(spaces);
      |       ~~~~~~~~^~~~~~~~
/usr/lib/R/site-library/progress/include/RProgress.h:274:14: error: format not a string literal and no format arguments [-Werror=format-security]
  274 |       Rprintf(spaces);
      |       ~~~~~~~^~~~~~~~
cc1plus: some warnings being treated as errors
make: *** [/usr/lib/R/etc/Makeconf:204: Read.o] Error 1
ERROR: compilation failed for package ‘readxl’
* removing ‘/home/<my_user_name>/R/x86_64-pc-linux-gnu-library/4.4/readxl’
Warning in install.packages :
  installation of package ‘readxl’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/Rtmp7YAXwi/downloaded_packages’
@jennybc
Copy link
Member

jennybc commented May 2, 2024

I suspect what you're experiencing and the fix is what you see here in this vroom thread: tidyverse/vroom#538. Certainly worth a try! If not, please report back.

@arne-henningsen
Copy link
Author

Thanks a lot, @jennybc, for your quick and very helpful response! Indeed, just installing the "progress" package solved the problem...

@arne-henningsen
Copy link
Author

Installing the "progress" package solved the problem (see tidyverse/vroom#538).

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

2 participants