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 from CRAN failed on Fedora 30 #380

Closed
guivivi opened this issue Nov 30, 2023 · 6 comments
Closed

Installation from CRAN failed on Fedora 30 #380

guivivi opened this issue Nov 30, 2023 · 6 comments

Comments

@guivivi
Copy link

guivivi commented Nov 30, 2023

Hi, I have some trouble updating processx on Fedora 30. I already have the processx 3.4.1 version but I need to update it to be able to update the callr package (R is asking me for an updated version of callr to be able to republish a shiny app). However, I get this error:

> install.packages("processx")
/usr/bin/ld: /tmp/cci4NPhZ.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making un objeto PIE; recompile con -fPIC
/usr/bin/ld: falló el enlace final: nonrepresentable section on output
collect2: error: ld devolvió el estado de salida 1
make: *** [Makevars:14: tools/px] Error 1
ERROR: compilation failed for package ‘processx’

My info is:

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 30 (Workstation Edition)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=es_ES.UTF-8       LC_NUMERIC=C               LC_TIME=es_ES.UTF-8        LC_COLLATE=es_ES.UTF-8    
 [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=es_ES.UTF-8    LC_PAPER=es_ES.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] compiler_3.6.3    tools_3.6.3       rstudioapi_0.15.0

Could you please help me? Many thanks.

@gaborcsardi
Copy link
Member

That does not seem like an error with processx, but a broken or misconfigured R installation or system, possibly. Can you compile other packages from source?

In any case, it seems to work fine OOTB on Fedora 30 (unsupported for more than 3 years now, btw.), with the same R version. Example Dockerfile:

FROM fedora:30
RUN yum install -y R
RUN R -q -e 'install.packages("ps", repos = "https://cloud.r-project.org")'
RUN R -q -e 'install.packages("processx", repos = "https://cloud.r-project.org")'
RUN R -q -e 'processx::run("true")'
docker build -t fedora:processx .
docker run fedora:processx R -q -e 'processx::run("true")'
> processx::run("true")
$status
[1] 0

$stdout
[1] ""

$stderr
[1] ""

$timeout
[1] FALSE

@guivivi
Copy link
Author

guivivi commented Nov 30, 2023

Many thanks for the quick response. I have tried for example to install the stringi package from the source and it was successfully installed. I just ran the following:

> install.packages("stringi_1.8.2.tar.gz", repos = NULL, type = "source")

However, I tried the following both without success (the same error that I indicated in the first message appears):

install.packages("processx_3.8.2.tar.gz", repos = NULL, type = "source")
install.packages("processx", repos = "https://cloud.r-project.org")

Would you have any insight about that possible R misconfiguration?

@gaborcsardi
Copy link
Member

I don't have a lot of ideas, unfortunately. Do you have an ~/.R/Makevars file? If yes, then try it without that file.

@guivivi
Copy link
Author

guivivi commented Nov 30, 2023

Yes, I have it. This is its content:

# Settings from /etc/R/Makeconf with "non-portable flag(s):"
# ‘-Wdate-time’ ‘-Werror=format-security’ ‘-Wformat’ replaced by -Wall -pedantic
# and without -fdebug-prefix-map=... 
CFLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(LTO)
CXXFLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(LTO)
CXX98FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2
CXX11FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2
CXX14FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2

How can I try without that file? Do I have to remove it?

@gaborcsardi
Copy link
Member

It seems harmless, so I don't think this is the problem, but it is worth a try:

mv ~/.R/Makevars ~/.R/Makevars.bak

You can move it back later if you want to:

mv ~/.R/Makevars.bak ~/.R/Makevars

@guivivi
Copy link
Author

guivivi commented Nov 30, 2023

By running mv ~/.R/Makevars ~/.R/Makevars.bak in the terminal, indeed I have been able to install processx, then callr and finally to update my shiny app in the server.
Many thanks for your help.

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