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

Installation fails on R4.3.0 under Ubuntu #613

Closed
SMBaylis opened this issue Jun 19, 2023 · 3 comments
Closed

Installation fails on R4.3.0 under Ubuntu #613

SMBaylis opened this issue Jun 19, 2023 · 3 comments

Comments

@SMBaylis
Copy link

I've had an installation failure when installing from CRAN, with the following error message:

install.packages("cli")
Installing package into ‘/home/myname/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/cli_3.6.1.tar.gz'
Content type 'application/x-gzip' length 567293 bytes (553 KB)
==================================================
downloaded 553 KB

  • installing source package ‘cli’ ...
    ** package ‘cli’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C compiler: ‘gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0’
    gcc -I"/usr/share/R/include" -DNDEBUG -ggdb -O0 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-dIDxrQ/r-base-4.3.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c ansi.c -o ansi.o
    gcc -I"/usr/share/R/include" -DNDEBUG -ggdb -O0 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-dIDxrQ/r-base-4.3.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c cleancall.c -o cleancall.o
    gcc -I"/usr/share/R/include" -DNDEBUG -ggdb -O0 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-dIDxrQ/r-base-4.3.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c diff.c -o diff.o
    gcc -I"/usr/share/R/include" -DNDEBUG -ggdb -O0 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-dIDxrQ/r-base-4.3.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c errors.c -o errors.o
    gcc -I"/usr/share/R/include" -DNDEBUG -ggdb -O0 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-dIDxrQ/r-base-4.3.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c glue.c -o glue.o
    gcc -I"/usr/share/R/include" -DNDEBUG -ggdb -O0 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-dIDxrQ/r-base-4.3.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c init.c -o init.o
    gcc -I"/usr/share/R/include" -DNDEBUG -ggdb -O0 -fpic -g -O2 -fdebug-prefix-map=/build/r-base-dIDxrQ/r-base-4.3.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c inst.c -o inst.o
    inst.c:2:10: fatal error: cli/progress.h: No such file or directory
    2 | #include <cli/progress.h>
    | ^~~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [/usr/lib/R/etc/Makeconf:191: inst.o] Error 1
    ERROR: compilation failed for package ‘cli’
  • removing ‘/home/bay043/R/x86_64-pc-linux-gnu-library/4.3/cli’

The downloaded source packages are in
‘/tmp/RtmpgJZxId/downloaded_packages’
Warning message:
In install.packages("cli") :
installation of package ‘cli’ had non-zero exit status

I get the same error message for both the latest CRAN version (3.6.1, at the time of writing), and the latest cli-main (3.6.1.9000).

workaround:
The issue does not affect cli version 3.5.0, which I have successfully installed via R CMD build and R CMD INSTALL

@gaborcsardi
Copy link
Member

gaborcsardi commented Jun 19, 2023

I don't think this is a cli issue, but possibly you are overwriting CFLAGS or PKG_CFLAGS in your ~/.R/Makevars file?

@SMBaylis
Copy link
Author

Right you are. Thanks!

@gaborcsardi
Copy link
Member

Btw. if you want to add additional compiler flags, use the += form, e.g.

CFLAGS+= -Wall

That keeps the original flags as well.

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