Re: [R-sig-Fedora] -specs=/usr/lib/rpm/redhat/redhat-hardened-ld woes

2020-06-29 Thread Roger Bivand

On Mon, 29 Jun 2020, Iñaki Ucar wrote:


On Mon, 29 Jun 2020 at 11:24, Iñaki Ucar  wrote:


On Mon, 29 Jun 2020 at 10:21, Roger Bivand  wrote:


In the rgdal package, configure.ac has had : ${LDFLAGS=`"${RBIN}" CMD
config LDFLAGS`} at least since 2012, so picking up LDFLAGS known to the R
version installed. Very recently, users installing rgdal from source with
R installed from RPM are seeing problems, such as those reported in this
thread: https://stat.ethz.ch/pipermail/r-sig-geo/2020-June/028251.html

The diagnosis by Bennet Fauber, that

LDFLAGS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'

is the problem, that LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now'
works OK, and that the -specs= conflict with autoconf has not been
resolved seems accurate to me (see also
https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/,
https://bugzilla.redhat.com/show_bug.cgi?id=1343892).

I realise that the R RPM needs to follow RH/F standards, but has something
happened in the RPM ecosystem recently to poison the -spec/autoconf
relationship?


Did something change in rgdal's flags from 1.5-10 to 1.5-12? Because
the former installs fine. You can see in [1] that it fails since the
last update.


I see that rgdal changed to C++ recently. The issue is in rgdal,
because the configure script is missing:

CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`

as indicated in Writing R Extensions (note that CPPFLAGS are *not*
CXXFLAGS; I say this because it's a common mistake).


Thanks, added R-forge revision 1021. The problem was caused by the 
addition of AC_LANG(C++) (about line 500, 11 June) in connection with 
preparations for macOS static builds; without AC_LANG(C++) Fedora runs 
configure OK. With AC_LANG(C++), Fedora needs CXXFLAGS set if using the R 
rpm (otherwise and other systems not).  CPPFLAGS were used for the C 
pre-processor.


Roger






--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: roger.biv...@nhh.no
https://orcid.org/-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0J=en___
R-SIG-Fedora mailing list
R-SIG-Fedora@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-fedora


Re: [R-sig-Fedora] -specs=/usr/lib/rpm/redhat/redhat-hardened-ld woes

2020-06-29 Thread Iñaki Ucar
On Mon, 29 Jun 2020 at 11:24, Iñaki Ucar  wrote:
>
> On Mon, 29 Jun 2020 at 10:21, Roger Bivand  wrote:
> >
> > In the rgdal package, configure.ac has had : ${LDFLAGS=`"${RBIN}" CMD
> > config LDFLAGS`} at least since 2012, so picking up LDFLAGS known to the R
> > version installed. Very recently, users installing rgdal from source with
> > R installed from RPM are seeing problems, such as those reported in this
> > thread: https://stat.ethz.ch/pipermail/r-sig-geo/2020-June/028251.html
> >
> > The diagnosis by Bennet Fauber, that
> >
> > LDFLAGS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
> >
> > is the problem, that LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now'
> > works OK, and that the -specs= conflict with autoconf has not been
> > resolved seems accurate to me (see also
> > https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/,
> > https://bugzilla.redhat.com/show_bug.cgi?id=1343892).
> >
> > I realise that the R RPM needs to follow RH/F standards, but has something
> > happened in the RPM ecosystem recently to poison the -spec/autoconf
> > relationship?
>
> Did something change in rgdal's flags from 1.5-10 to 1.5-12? Because
> the former installs fine. You can see in [1] that it fails since the
> last update.

I see that rgdal changed to C++ recently. The issue is in rgdal,
because the configure script is missing:

CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`

as indicated in Writing R Extensions (note that CPPFLAGS are *not*
CXXFLAGS; I say this because it's a common mistake).

-- 
Iñaki Úcar

___
R-SIG-Fedora mailing list
R-SIG-Fedora@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-fedora


Re: [R-sig-Fedora] -specs=/usr/lib/rpm/redhat/redhat-hardened-ld woes

2020-06-29 Thread Iñaki Ucar
On Mon, 29 Jun 2020 at 10:21, Roger Bivand  wrote:
>
> In the rgdal package, configure.ac has had : ${LDFLAGS=`"${RBIN}" CMD
> config LDFLAGS`} at least since 2012, so picking up LDFLAGS known to the R
> version installed. Very recently, users installing rgdal from source with
> R installed from RPM are seeing problems, such as those reported in this
> thread: https://stat.ethz.ch/pipermail/r-sig-geo/2020-June/028251.html
>
> The diagnosis by Bennet Fauber, that
>
> LDFLAGS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
>
> is the problem, that LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now'
> works OK, and that the -specs= conflict with autoconf has not been
> resolved seems accurate to me (see also
> https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/,
> https://bugzilla.redhat.com/show_bug.cgi?id=1343892).
>
> I realise that the R RPM needs to follow RH/F standards, but has something
> happened in the RPM ecosystem recently to poison the -spec/autoconf
> relationship?

Did something change in rgdal's flags from 1.5-10 to 1.5-12? Because
the former installs fine. You can see in [1] that it fails since the
last update.

[1] https://copr.fedorainfracloud.org/coprs/iucar/cran/package/R-CRAN-rgdal/

-- 
Iñaki Úcar

___
R-SIG-Fedora mailing list
R-SIG-Fedora@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-fedora