Skip to content
Prev 28219 / 29559 Next

cannot install rgdal after updating to fedora32

On Sun, 28 Jun 2020, Ista Zahn wrote:

            
The error is in the RPM propagating its LDFLAGS which are  not needed (or 
cause no havoc) in simple tests for C compiler functionality in 
./configure. For the arguably broken R rpm, use either LDFLAGS="" or the 
svn rev. 1020 configure argument --disable-loadflags. The load flags are 
far more than is sensibly needed to check whether the compile train works. 
I have used RH, RHEL and Fedora since the last century, and have always 
installed R from source. Recently, the TexLive packaging system drew in 
(totally unecessarily) a dependency on the R rpm, which I now have to 
avoid using. My rpm:

$ /usr/bin/R CMD config LDFLAGS
-Wl,-z,relro -Wl,--as-needed -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld

and compiled from source:

$ R CMD config LDFLAGS
-L/usr/local/lib64

Why the rpm LDFLAGS demolish a simple AC_LANG(C++) (guesswork, now line 
504 in configure.ac) is unknown for me, hence the need for the workaround.

I advise strongly against binary packaging of rgdal for Linux, and was not 
aware that any such packaging had been attempted. Changes in GDAL and PROJ 
happen fast, and Fedora/Centos etc. have been really slow to update.

If anyone understands why the R Fedora rpm imposes such vicious LDFLAGS 
and can explain why they are needed and how to run a cross platform 
configure script without having to special-case platforms, I'd be mildly 
interested to know. sf has also been through similar trouble as mentioned 
earlier in this thread.

Roger