Hi, Vero,
Your Fedora is using GCC version 10, which is newer and may have
changed options. Just to help you with reading the config.log, this
is the part that matters here.
#--- The following line is the command that configure is actually running
configure:3006: g++ -m64 -std=gnu++11 -o conftest
-I/usr/local/include -DPROJ_H_API -Wl,-z,relro -Wl,--as-needed
-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld conftest.cpp
-lproj -L/usr/lib64 -lgdal >&5/usr/bin/ld: /home/veroandreo
#--- This is the error that it generated
/tmp/ccNranTE.o: relocation R_X86_64_32 against `.rodata' can not be
used when making a PIE object; recompile with -fPIE
#--- This is configure telling you that an error occured, but not what it
is
collect2: error: ld returned 1 exit status
#--- If the g++ command had succeeded, there would be a program file
called 'conftest' that it could run
configure:3017: ./conftest
configure: line 3019: ./conftest: No such file or directory
I will take a wild stab in the dark and suggest you try
install.packages('rgdal', configure.vars=c("CXXFLAGS=-no-pie"))
On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <veroandreo at gmail.com>
wrote:
Dear Roger,
Thanks for the answer.
R is installed from Fedora repos and no, I do not have any issues with
sf. It installs and loads just fine.
I downloaded the new rgdal tar.gz from R-forge, but I get the same error
that was reported yesterday; config.log file attached. The first error I
see there is in line 98-99 about a -V not recognized and then another one
for -qversion. Are those relevant?
Vero
---
install.packages("~/Downloads/rgdal_1.5-13.tar.gz", repos = NULL, type =
?/home/veroandreo/R/x86_64-redhat-linux-gnu-library/3.6?
(as ?lib? is unspecified)
* installing *source* package ?rgdal? ...
** using staged installation
configure: R_HOME: /usr/lib64/R
configure: CC: gcc -m64
configure: CXX: g++ -m64 -std=gnu++11
configure: CFLAGS: -O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
-fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
configure: CPPFLAGS: -I/usr/local/include
configure: LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld
loadflags: yes
configure: LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld
configure: CXX11 is: g++ -m64, CXX11STD is: -std=gnu++11
configure: CXX is: g++ -m64 -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-13
checking for /usr/bin/svnversion... yes
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision:
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.0.4
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking GDAL: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /usr/share/gdal/stateplane.csv readable... yes
configure: pkg-config proj exists, will use it
configure: PROJ version: 6.3.2
configure: PROJ CPP flags: -DPROJ_H_API
configure: PROJ LIBS: -lproj
checking PROJ header API:... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in
`/home/veroandreo/tmp/Rtmp9DsGuk/R.INSTALL16352f5a74a/rgdal':
configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
ERROR: configuration failed for package ?rgdal?
* removing ?/home/veroandreo/R/x86_64-redhat-linux-gnu-library/3.6/rgdal?
Warning in install.packages :
installation of package
?/home/veroandreo/Downloads/rgdal_1.5-13.tar.gz? had non-zero exit status
El dom., 28 jun. 2020 a las 14:44, Roger Bivand (<Roger.Bivand at nhh.no>)
On Sun, 28 Jun 2020, Roger Bivand wrote:
Vero,
On Sat, 27 Jun 2020, Veronica Andreo wrote:
See the attached config.log file
LDFLAGS needs unsetting. Revision 1020 on R-Forge
https://r-forge.r-project.org/R/?group_id=884
includes a new configure argument --disable-loadflags to assist in
unsetting the very specific R rpm LDFLAGS. Please report if this fixes
El s?b., 27 jun. 2020 a las 21:29, Veronica Andreo
(<veroandreo at gmail.com>)
escribi?:
Hello everyone
I have just updated my system to fedora 32 (which fetched GDAL 3
6) and when updating my R packages, I get the following error for
Can someone help me out here? What does it mean that it cannot run
compiled programs? And do I want to crosscompile?
Thanks much in advance
Vero
---
install.packages("rgdal")
Installing package into
?/home/veroandreo/R/x86_64-redhat-linux-gnu-library/3.6?
(as ?lib? is unspecified)
trying URL '
Content type 'application/x-gzip' length 2302403 bytes (2.2 MB)
==================================================
downloaded 2.2 MB
* installing *source* package ?rgdal? ...
** package ?rgdal? successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /usr/lib64/R
configure: CC: gcc -m64
configure: CXX: g++ -m64 -std=gnu++11
configure: CXX11 is: g++ -m64, CXX11STD is: -std=gnu++11
configure: CXX is: g++ -m64 -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-12
checking for /usr/bin/svnversion... yes
configure: svn revision: 1018
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.0.4
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking GDAL: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /usr/share/gdal/stateplane.csv readable... yes
configure: pkg-config proj exists, will use it
configure: PROJ version: 6.3.2
configure: PROJ CPP flags: -DPROJ_H_API
configure: PROJ LIBS: -lproj
checking PROJ header API:... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in
`/home/veroandreo/tmp/Rtmpo7AtPr/R.INSTALL12cc66f8f895/rgdal':
configure: error: cannot run C++ compiled programs. <<<<--- here
If you meant to cross compile, use `--host'.
See `config.log' for more details
ERROR: configuration failed for package ?rgdal?
* removing
?/home/veroandreo/R/x86_64-redhat-linux-gnu-library/3.6/rgdal?
* restoring previous
?/home/veroandreo/R/x86_64-redhat-linux-gnu-library/3.6/rgdal?
Warning in install.packages :
installation of package ?rgdal? had non-zero exit status
---
sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 32 (Thirty Two)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.9.so
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] 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
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3