cannot install rgdal after updating to fedora32

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

cannot install rgdal after updating to fedora32

Veronica Andreo
Hello everyone

I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
6) and when updating my R packages, I get the following error for rgdal.
Can someone help me out here? What does it mean that it cannot run C++
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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
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   base

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

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Veronica Andreo
See the attached config.log file

El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo (<[hidden email]>) escribió:
Hello everyone

I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ 6) and when updating my R packages, I get the following error for rgdal. Can someone help me out here? What does it mean that it cannot run C++ 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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
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   base    

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

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

config.log (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Roger Bivand
Administrator
Vero,

On Sat, 27 Jun 2020, Veronica Andreo wrote:

> See the attached config.log file
>

How did you install R itself? If an rpm, then

https://github.com/r-spatial/sf/issues/1369

may be relevant, also if you see errors installing sf. You would need to
unset LDFLAGS before installing:

https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865

Please report back on this.

Roger

> El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo (<[hidden email]>)
> escribió:
>
>> Hello everyone
>>
>> I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
>> 6) and when updating my R packages, I get the following error for rgdal.
>> Can someone help me out here? What does it mean that it cannot run C++
>> 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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>> 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   base
>>
>> loaded via a namespace (and not attached):
>> [1] compiler_3.6.3 tools_3.6.3
>>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Roger Bivand
Administrator
On Sun, 28 Jun 2020, Roger Bivand wrote:

> Vero,
>
> On Sat, 27 Jun 2020, Veronica Andreo wrote:
>
>>  See the attached config.log file
>>
>
> How did you install R itself? If an rpm, then
>
> https://github.com/r-spatial/sf/issues/1369
>
> may be relevant, also if you see errors installing sf. You would need to
> unset LDFLAGS before installing:
>
> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>
> Please report back on this.
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 the
problem.

Roger


>
> Roger
>
>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>>  (<[hidden email]>)
>>  escribió:
>>
>>>  Hello everyone
>>>
>>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
>>>  6) and when updating my R packages, I get the following error for rgdal.
>>>  Can someone help me out here? What does it mean that it cannot run C++
>>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>>>  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   base
>>>
>>>  loaded via a namespace (and not attached):
>>>  [1] compiler_3.6.3 tools_3.6.3
>>>
>>
>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Veronica Andreo
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 = "source")
Installing package into ‘/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 (<[hidden email]>) escribió:
On Sun, 28 Jun 2020, Roger Bivand wrote:

> Vero,
>
> On Sat, 27 Jun 2020, Veronica Andreo wrote:
>
>>  See the attached config.log file
>>
>
> How did you install R itself? If an rpm, then
>
> https://github.com/r-spatial/sf/issues/1369
>
> may be relevant, also if you see errors installing sf. You would need to
> unset LDFLAGS before installing:
>
> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>
> Please report back on this.

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 the
problem.

Roger


>
> Roger
>
>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>>  (<[hidden email]>)
>>  escribió:
>>
>>>  Hello everyone
>>>
>>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
>>>  6) and when updating my R packages, I get the following error for rgdal.
>>>  Can someone help me out here? What does it mean that it cannot run C++
>>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>>>  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   base
>>>
>>>  loaded via a namespace (and not attached):
>>>  [1] compiler_3.6.3 tools_3.6.3
>>>
>>
>
>

--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

config.log (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Erwan LE PENNEC
Using the new --disable-loadflags in install.packages:
install.packages("rgdal_1.5-13.tar.gz", repos = NULL, type = "source",
configure.args = "--disable-loadflags")
should solve the issue.

Erwan

On Sun, Jun 28, 2020 at 3:42 PM Veronica Andreo <[hidden email]>
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 =
> "source")
> Installing package into
> ‘/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 (<[hidden email]>)
> escribió:
>
>> On Sun, 28 Jun 2020, Roger Bivand wrote:
>>
>> > Vero,
>> >
>> > On Sat, 27 Jun 2020, Veronica Andreo wrote:
>> >
>> >>  See the attached config.log file
>> >>
>> >
>> > How did you install R itself? If an rpm, then
>> >
>> > https://github.com/r-spatial/sf/issues/1369
>> >
>> > may be relevant, also if you see errors installing sf. You would need
>> to
>> > unset LDFLAGS before installing:
>> >
>> > https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>> >
>> > Please report back on this.
>>
>> 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
>> the
>> problem.
>>
>> Roger
>>
>>
>> >
>> > Roger
>> >
>> >>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>> >>  (<[hidden email]>)
>> >>  escribió:
>> >>
>> >>>  Hello everyone
>> >>>
>> >>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and
>> PROJ
>> >>>  6) and when updating my R packages, I get the following error for
>> rgdal.
>> >>>  Can someone help me out here? What does it mean that it cannot run
>> C++
>> >>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>> >>>  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   base
>> >>>
>> >>>  loaded via a namespace (and not attached):
>> >>>  [1] compiler_3.6.3 tools_3.6.3
>> >>>
>> >>
>> >
>> >
>>
>> --
>> Roger Bivand
>> Department of Economics, Norwegian School of Economics,
>> Helleveien 30, N-5045 Bergen, Norway.
>> voice: +47 55 95 93 55; e-mail: [hidden email]
>> https://orcid.org/0000-0003-2392-6140
>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Ista Zahn-2
In reply to this post by Veronica Andreo
I can reproduce this error using the official Fedora 32 docker image:

docker run -it library/fedora:32
dnf install 'dnf-command(builddep)'
dnf builddep R-rgdal
R
install.packages("rgdal")

* 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... no
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
`/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’

The downloaded source packages are in
        ‘/tmp/RtmpooFgiH/downloaded_packages’
Updating HTML index of packages in '.Library'
Warning messages:
1: In install.packages("rgdal") :
  installation of package ‘rgdal’ had non-zero exit status
2: In file.create(f.tg) :
  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
such file or directory'
3: In make.packages.html(.Library) : cannot update HTML package index
>

I don't have any insight into what happens here, but it is reproducible.

Best,
Ista

On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]> 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 = "source")
> Installing package into ‘/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 (<[hidden email]>) escribió:
>>
>> On Sun, 28 Jun 2020, Roger Bivand wrote:
>>
>> > Vero,
>> >
>> > On Sat, 27 Jun 2020, Veronica Andreo wrote:
>> >
>> >>  See the attached config.log file
>> >>
>> >
>> > How did you install R itself? If an rpm, then
>> >
>> > https://github.com/r-spatial/sf/issues/1369
>> >
>> > may be relevant, also if you see errors installing sf. You would need to
>> > unset LDFLAGS before installing:
>> >
>> > https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>> >
>> > Please report back on this.
>>
>> 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 the
>> problem.
>>
>> Roger
>>
>>
>> >
>> > Roger
>> >
>> >>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>> >>  (<[hidden email]>)
>> >>  escribió:
>> >>
>> >>>  Hello everyone
>> >>>
>> >>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
>> >>>  6) and when updating my R packages, I get the following error for rgdal.
>> >>>  Can someone help me out here? What does it mean that it cannot run C++
>> >>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>> >>>  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   base
>> >>>
>> >>>  loaded via a namespace (and not attached):
>> >>>  [1] compiler_3.6.3 tools_3.6.3
>> >>>
>> >>
>> >
>> >
>>
>> --
>> Roger Bivand
>> Department of Economics, Norwegian School of Economics,
>> Helleveien 30, N-5045 Bergen, Norway.
>> voice: +47 55 95 93 55; e-mail: [hidden email]
>> https://orcid.org/0000-0003-2392-6140
>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Veronica Andreo
In reply to this post by Veronica Andreo
Hi Bennet,
[cc-ing the list too]

Thanks for the explanations about the config.log file

I tried with your suggestion, but the error still appears as originally
reported

Best,
Vero

El dom., 28 jun. 2020 a las 17:00, Bennet Fauber (<[hidden email]>)
escribió:

> 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 <[hidden email]>
> 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 =
> "source")
> > Installing package into
> ‘/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 (<[hidden email]>)
> escribió:
> >>
> >> On Sun, 28 Jun 2020, Roger Bivand wrote:
> >>
> >> > Vero,
> >> >
> >> > On Sat, 27 Jun 2020, Veronica Andreo wrote:
> >> >
> >> >>  See the attached config.log file
> >> >>
> >> >
> >> > How did you install R itself? If an rpm, then
> >> >
> >> > https://github.com/r-spatial/sf/issues/1369
> >> >
> >> > may be relevant, also if you see errors installing sf. You would need
> to
> >> > unset LDFLAGS before installing:
> >> >
> >> > https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
> >> >
> >> > Please report back on this.
> >>
> >> 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
> the
> >> problem.
> >>
> >> Roger
> >>
> >>
> >> >
> >> > Roger
> >> >
> >> >>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
> >> >>  (<[hidden email]>)
> >> >>  escribió:
> >> >>
> >> >>>  Hello everyone
> >> >>>
> >> >>>  I have just updated my system to fedora 32 (which fetched GDAL 3
> and PROJ
> >> >>>  6) and when updating my R packages, I get the following error for
> rgdal.
> >> >>>  Can someone help me out here? What does it mean that it cannot run
> C++
> >> >>>  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 '
> http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
> >> >>>  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
>  base
> >> >>>
> >> >>>  loaded via a namespace (and not attached):
> >> >>>  [1] compiler_3.6.3 tools_3.6.3
> >> >>>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> Roger Bivand
> >> Department of Economics, Norwegian School of Economics,
> >> Helleveien 30, N-5045 Bergen, Norway.
> >> voice: +47 55 95 93 55; e-mail: [hidden email]
> >> https://orcid.org/0000-0003-2392-6140
> >> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > [hidden email]
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Roger Bivand
Administrator
In reply to this post by Ista Zahn-2
On Sun, 28 Jun 2020, Ista Zahn wrote:

> I can reproduce this error using the official Fedora 32 docker image:

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

>
> docker run -it library/fedora:32
> dnf install 'dnf-command(builddep)'
> dnf builddep R-rgdal
> R
> install.packages("rgdal")
>
> * 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... no
> 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
> `/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’
>
> The downloaded source packages are in
>        ‘/tmp/RtmpooFgiH/downloaded_packages’
> Updating HTML index of packages in '.Library'
> Warning messages:
> 1: In install.packages("rgdal") :
>  installation of package ‘rgdal’ had non-zero exit status
> 2: In file.create(f.tg) :
>  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
> such file or directory'
> 3: In make.packages.html(.Library) : cannot update HTML package index
>>
>
> I don't have any insight into what happens here, but it is reproducible.
>
> Best,
> Ista
>
> On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]> 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 = "source")
>> Installing package into ‘/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 (<[hidden email]>) escribió:
>>>
>>> On Sun, 28 Jun 2020, Roger Bivand wrote:
>>>
>>>> Vero,
>>>>
>>>> On Sat, 27 Jun 2020, Veronica Andreo wrote:
>>>>
>>>>>  See the attached config.log file
>>>>>
>>>>
>>>> How did you install R itself? If an rpm, then
>>>>
>>>> https://github.com/r-spatial/sf/issues/1369
>>>>
>>>> may be relevant, also if you see errors installing sf. You would need to
>>>> unset LDFLAGS before installing:
>>>>
>>>> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>>>>
>>>> Please report back on this.
>>>
>>> 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 the
>>> problem.
>>>
>>> Roger
>>>
>>>
>>>>
>>>> Roger
>>>>
>>>>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>>>>>  (<[hidden email]>)
>>>>>  escribió:
>>>>>
>>>>>>  Hello everyone
>>>>>>
>>>>>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
>>>>>>  6) and when updating my R packages, I get the following error for rgdal.
>>>>>>  Can someone help me out here? What does it mean that it cannot run C++
>>>>>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>>>>>>  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   base
>>>>>>
>>>>>>  loaded via a namespace (and not attached):
>>>>>>  [1] compiler_3.6.3 tools_3.6.3
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Roger Bivand
>>> Department of Economics, Norwegian School of Economics,
>>> Helleveien 30, N-5045 Bergen, Norway.
>>> voice: +47 55 95 93 55; e-mail: [hidden email]
>>> https://orcid.org/0000-0003-2392-6140
>>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Roger Bivand
Administrator
In reply to this post by Veronica Andreo
On Sun, 28 Jun 2020, Veronica Andreo wrote:

> Hi Bennet,
> [cc-ing the list too]
>
> Thanks for the explanations about the config.log file
>
> I tried with your suggestion, but the error still appears as originally
> reported

Please try install.packages("rgdal", repos="http://R-Forge.R-project.org",
configure.args="--disable-loadflags") to be sure to get the current
version.

Roger

>
> Best,
> Vero
>
> El dom., 28 jun. 2020 a las 17:00, Bennet Fauber (<[hidden email]>)
> escribió:
>
>> 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 <[hidden email]>
>> 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 =
>> "source")
>>> Installing package into
>> ‘/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 (<[hidden email]>)
>> escribió:
>>>>
>>>> On Sun, 28 Jun 2020, Roger Bivand wrote:
>>>>
>>>>> Vero,
>>>>>
>>>>> On Sat, 27 Jun 2020, Veronica Andreo wrote:
>>>>>
>>>>>>  See the attached config.log file
>>>>>>
>>>>>
>>>>> How did you install R itself? If an rpm, then
>>>>>
>>>>> https://github.com/r-spatial/sf/issues/1369
>>>>>
>>>>> may be relevant, also if you see errors installing sf. You would need
>> to
>>>>> unset LDFLAGS before installing:
>>>>>
>>>>> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>>>>>
>>>>> Please report back on this.
>>>>
>>>> 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
>> the
>>>> problem.
>>>>
>>>> Roger
>>>>
>>>>
>>>>>
>>>>> Roger
>>>>>
>>>>>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>>>>>>  (<[hidden email]>)
>>>>>>  escribió:
>>>>>>
>>>>>>>  Hello everyone
>>>>>>>
>>>>>>>  I have just updated my system to fedora 32 (which fetched GDAL 3
>> and PROJ
>>>>>>>  6) and when updating my R packages, I get the following error for
>> rgdal.
>>>>>>>  Can someone help me out here? What does it mean that it cannot run
>> C++
>>>>>>>  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 '
>> http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>>>>>>>  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
>>  base
>>>>>>>
>>>>>>>  loaded via a namespace (and not attached):
>>>>>>>  [1] compiler_3.6.3 tools_3.6.3
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Roger Bivand
>>>> Department of Economics, Norwegian School of Economics,
>>>> Helleveien 30, N-5045 Bergen, Norway.
>>>> voice: +47 55 95 93 55; e-mail: [hidden email]
>>>> https://orcid.org/0000-0003-2392-6140
>>>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> [hidden email]
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Veronica Andreo
El dom., 28 jun. 2020 a las 19:20, Roger Bivand (<[hidden email]>)
escribió:

> On Sun, 28 Jun 2020, Veronica Andreo wrote:
>
> > Hi Bennet,
> > [cc-ing the list too]
> >
> > Thanks for the explanations about the config.log file
> >
> > I tried with your suggestion, but the error still appears as originally
> > reported
>
> Please try install.packages("rgdal", repos="http://R-Forge.R-project.org",
>
> configure.args="--disable-loadflags") to be sure to get the current
> version.
>

Yes, this works! rgdal is installed properly now :)
I didn't understand how to properly specify the command before, apologies.
And many thanks!!!

Vero


> Roger
>
> >
> > Best,
> > Vero
> >
> > El dom., 28 jun. 2020 a las 17:00, Bennet Fauber (<[hidden email]>)
> > escribió:
> >
> >> 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 <[hidden email]>
> >> 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
> =
> >> "source")
> >>> Installing package into
> >> ‘/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 (<[hidden email]
> >)
> >> escribió:
> >>>>
> >>>> On Sun, 28 Jun 2020, Roger Bivand wrote:
> >>>>
> >>>>> Vero,
> >>>>>
> >>>>> On Sat, 27 Jun 2020, Veronica Andreo wrote:
> >>>>>
> >>>>>>  See the attached config.log file
> >>>>>>
> >>>>>
> >>>>> How did you install R itself? If an rpm, then
> >>>>>
> >>>>> https://github.com/r-spatial/sf/issues/1369
> >>>>>
> >>>>> may be relevant, also if you see errors installing sf. You would need
> >> to
> >>>>> unset LDFLAGS before installing:
> >>>>>
> >>>>> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
> >>>>>
> >>>>> Please report back on this.
> >>>>
> >>>> 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
> >> the
> >>>> problem.
> >>>>
> >>>> Roger
> >>>>
> >>>>
> >>>>>
> >>>>> Roger
> >>>>>
> >>>>>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
> >>>>>>  (<[hidden email]>)
> >>>>>>  escribió:
> >>>>>>
> >>>>>>>  Hello everyone
> >>>>>>>
> >>>>>>>  I have just updated my system to fedora 32 (which fetched GDAL 3
> >> and PROJ
> >>>>>>>  6) and when updating my R packages, I get the following error for
> >> rgdal.
> >>>>>>>  Can someone help me out here? What does it mean that it cannot run
> >> C++
> >>>>>>>  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 '
> >> http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
> >>>>>>>  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
> >>  base
> >>>>>>>
> >>>>>>>  loaded via a namespace (and not attached):
> >>>>>>>  [1] compiler_3.6.3 tools_3.6.3
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> Roger Bivand
> >>>> Department of Economics, Norwegian School of Economics,
> >>>> Helleveien 30, N-5045 Bergen, Norway.
> >>>> voice: +47 55 95 93 55; e-mail: [hidden email]
> >>>> https://orcid.org/0000-0003-2392-6140
> >>>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
> >>>
> >>> _______________________________________________
> >>> R-sig-Geo mailing list
> >>> [hidden email]
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > [hidden email]
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> --
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; e-mail: [hidden email]
> https://orcid.org/0000-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Bennet Fauber
Vero, Ista, and Roger,

I used Ista's help to get a Docker container in which I could try this.

Yes, there does seem to be something wrong with the R packages for
Fedora 32, as I am also getting this when installing packages (not
just rgdal)

Warning in file.create(f.tg) :
  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
such file or directory'
Warning in utils::make.packages.html(.Library, docdir = R.home("doc")) :
  cannot update HTML package index

I believe that they (Fedora) also did not include building the HTML
documentation for R.

The particular LDFLAG that is causing the issue seems to be this one,

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

as that fails with the same message, but using all the others (the
following line used the additional printing of LDFLAGS, thank you
Roger!), as in the following,

    install.packages('rgdal', repos="https://R-Forge.R-project.org",
configure.vars=c("LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now'"))

does work.  I don't know if that helps you any, Roger, but I thought
that might help if someone reports this to Fedora.  I agree with you
that they probably should be dropped.

I am confused by them having the compiler syntax `-Wl,<linker options,
comma separated>`.  I think if those were CFLAGS, that would result in
a line like

    ld -z relro --as-needed -z now

where these are the explanations from the `ld` man page.

    -z relro                    Create RELRO program header (default)
    -z now                      Mark object non-lazy runtime binding
    --as-needed                 Only set DT_NEEDED for following
dynamic libs if used

I am not working on Fedora, so my ability to pursue further is limited.

Thanks, Roger, for providing a solution so quickly!

-- bennet


On Sun, Jun 28, 2020 at 1:30 PM Veronica Andreo <[hidden email]> wrote:

>
>
>
> El dom., 28 jun. 2020 a las 19:20, Roger Bivand (<[hidden email]>) escribió:
>>
>> On Sun, 28 Jun 2020, Veronica Andreo wrote:
>>
>> > Hi Bennet,
>> > [cc-ing the list too]
>> >
>> > Thanks for the explanations about the config.log file
>> >
>> > I tried with your suggestion, but the error still appears as originally
>> > reported
>>
>> Please try install.packages("rgdal", repos="http://R-Forge.R-project.org",
>> configure.args="--disable-loadflags") to be sure to get the current
>> version.
>
>
> Yes, this works! rgdal is installed properly now :)
> I didn't understand how to properly specify the command before, apologies.
> And many thanks!!!
>
> Vero
>
>>
>> Roger
>>
>> >
>> > Best,
>> > Vero
>> >
>> > El dom., 28 jun. 2020 a las 17:00, Bennet Fauber (<[hidden email]>)
>> > escribió:
>> >
>> >> 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 <[hidden email]>
>> >> 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 =
>> >> "source")
>> >>> Installing package into
>> >> ‘/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 (<[hidden email]>)
>> >> escribió:
>> >>>>
>> >>>> On Sun, 28 Jun 2020, Roger Bivand wrote:
>> >>>>
>> >>>>> Vero,
>> >>>>>
>> >>>>> On Sat, 27 Jun 2020, Veronica Andreo wrote:
>> >>>>>
>> >>>>>>  See the attached config.log file
>> >>>>>>
>> >>>>>
>> >>>>> How did you install R itself? If an rpm, then
>> >>>>>
>> >>>>> https://github.com/r-spatial/sf/issues/1369
>> >>>>>
>> >>>>> may be relevant, also if you see errors installing sf. You would need
>> >> to
>> >>>>> unset LDFLAGS before installing:
>> >>>>>
>> >>>>> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>> >>>>>
>> >>>>> Please report back on this.
>> >>>>
>> >>>> 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
>> >> the
>> >>>> problem.
>> >>>>
>> >>>> Roger
>> >>>>
>> >>>>
>> >>>>>
>> >>>>> Roger
>> >>>>>
>> >>>>>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>> >>>>>>  (<[hidden email]>)
>> >>>>>>  escribió:
>> >>>>>>
>> >>>>>>>  Hello everyone
>> >>>>>>>
>> >>>>>>>  I have just updated my system to fedora 32 (which fetched GDAL 3
>> >> and PROJ
>> >>>>>>>  6) and when updating my R packages, I get the following error for
>> >> rgdal.
>> >>>>>>>  Can someone help me out here? What does it mean that it cannot run
>> >> C++
>> >>>>>>>  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 '
>> >> http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>> >>>>>>>  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
>> >>  base
>> >>>>>>>
>> >>>>>>>  loaded via a namespace (and not attached):
>> >>>>>>>  [1] compiler_3.6.3 tools_3.6.3
>> >>>>>>>
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> --
>> >>>> Roger Bivand
>> >>>> Department of Economics, Norwegian School of Economics,
>> >>>> Helleveien 30, N-5045 Bergen, Norway.
>> >>>> voice: +47 55 95 93 55; e-mail: [hidden email]
>> >>>> https://orcid.org/0000-0003-2392-6140
>> >>>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>> >>>
>> >>> _______________________________________________
>> >>> R-sig-Geo mailing list
>> >>> [hidden email]
>> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>> >>
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > R-sig-Geo mailing list
>> > [hidden email]
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>> >
>>
>> --
>> Roger Bivand
>> Department of Economics, Norwegian School of Economics,
>> Helleveien 30, N-5045 Bergen, Norway.
>> voice: +47 55 95 93 55; e-mail: [hidden email]
>> https://orcid.org/0000-0003-2392-6140
>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Bennet Fauber
In reply to this post by Roger Bivand
Roger,

This seems to be an outcome of a 'security' policy that
RedHat/Fedora/CentOS implemented.  There are some circumstances where
I think that could be justified, but I do not think compiling R is one
of them.

It was reported several times to RedHat's Bugzilla and basically
ignored by RedHat at least as far back as 2015-12-02.  There are
several reports of slightly different versions of the report, but none
of them got acted upon.  Some details and links to other issues marked
as duplicates (but also seemingly closed without any attention or
action) can be found at

    https://bugzilla.redhat.com/show_bug.cgi?id=1287743

The version of R-rgdal that is in the Fedora archive as a binary is
rgdal_1.4-8 and that .srpm will build, however if it is updated to use
rgdal_1.5-12 it fails the same way that it does with the source build.



On Sun, Jun 28, 2020 at 1:17 PM Roger Bivand <[hidden email]> wrote:

>
> On Sun, 28 Jun 2020, Ista Zahn wrote:
>
> > I can reproduce this error using the official Fedora 32 docker image:
>
> 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
>
> >
> > docker run -it library/fedora:32
> > dnf install 'dnf-command(builddep)'
> > dnf builddep R-rgdal
> > R
> > install.packages("rgdal")
> >
> > * 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... no
> > 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
> > `/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’
> >
> > The downloaded source packages are in
> >        ‘/tmp/RtmpooFgiH/downloaded_packages’
> > Updating HTML index of packages in '.Library'
> > Warning messages:
> > 1: In install.packages("rgdal") :
> >  installation of package ‘rgdal’ had non-zero exit status
> > 2: In file.create(f.tg) :
> >  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
> > such file or directory'
> > 3: In make.packages.html(.Library) : cannot update HTML package index
> >>
> >
> > I don't have any insight into what happens here, but it is reproducible.
> >
> > Best,
> > Ista
> >
> > On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]> 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 = "source")
> >> Installing package into ‘/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 (<[hidden email]>) escribió:
> >>>
> >>> On Sun, 28 Jun 2020, Roger Bivand wrote:
> >>>
> >>>> Vero,
> >>>>
> >>>> On Sat, 27 Jun 2020, Veronica Andreo wrote:
> >>>>
> >>>>>  See the attached config.log file
> >>>>>
> >>>>
> >>>> How did you install R itself? If an rpm, then
> >>>>
> >>>> https://github.com/r-spatial/sf/issues/1369
> >>>>
> >>>> may be relevant, also if you see errors installing sf. You would need to
> >>>> unset LDFLAGS before installing:
> >>>>
> >>>> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
> >>>>
> >>>> Please report back on this.
> >>>
> >>> 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 the
> >>> problem.
> >>>
> >>> Roger
> >>>
> >>>
> >>>>
> >>>> Roger
> >>>>
> >>>>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
> >>>>>  (<[hidden email]>)
> >>>>>  escribió:
> >>>>>
> >>>>>>  Hello everyone
> >>>>>>
> >>>>>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
> >>>>>>  6) and when updating my R packages, I get the following error for rgdal.
> >>>>>>  Can someone help me out here? What does it mean that it cannot run C++
> >>>>>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
> >>>>>>  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   base
> >>>>>>
> >>>>>>  loaded via a namespace (and not attached):
> >>>>>>  [1] compiler_3.6.3 tools_3.6.3
> >>>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> Roger Bivand
> >>> Department of Economics, Norwegian School of Economics,
> >>> Helleveien 30, N-5045 Bergen, Norway.
> >>> voice: +47 55 95 93 55; e-mail: [hidden email]
> >>> https://orcid.org/0000-0003-2392-6140
> >>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> [hidden email]
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> --
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; e-mail: [hidden email]
> https://orcid.org/0000-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en_______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Roger Bivand
Administrator
Bennet,

Thanks for the careful analysis.

On Sun, 28 Jun 2020, Bennet Fauber wrote:

> Roger,
>
> This seems to be an outcome of a 'security' policy that
> RedHat/Fedora/CentOS implemented.  There are some circumstances where
> I think that could be justified, but I do not think compiling R is one
> of them.
>
> It was reported several times to RedHat's Bugzilla and basically
> ignored by RedHat at least as far back as 2015-12-02.  There are
> several reports of slightly different versions of the report, but none
> of them got acted upon.  Some details and links to other issues marked
> as duplicates (but also seemingly closed without any attention or
> action) can be found at
>
>    https://bugzilla.redhat.com/show_bug.cgi?id=1287743
>
https://bugzilla.redhat.com/show_bug.cgi?id=1343892 includes more
information. Many traces in search suggest that a missing
redhat-rpm-config package is to blame, but it is certainly present on my
test system.

The Redhat policy positions are specified in:

https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/

but do not seem to resolve the conflict between autoconf and
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld.

I'll raise this on the R fedora list.

Roger

> The version of R-rgdal that is in the Fedora archive as a binary is
> rgdal_1.4-8 and that .srpm will build, however if it is updated to use
> rgdal_1.5-12 it fails the same way that it does with the source build.
>
>
>
> On Sun, Jun 28, 2020 at 1:17 PM Roger Bivand <[hidden email]> wrote:
>>
>> On Sun, 28 Jun 2020, Ista Zahn wrote:
>>
>>> I can reproduce this error using the official Fedora 32 docker image:
>>
>> 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
>>
>>>
>>> docker run -it library/fedora:32
>>> dnf install 'dnf-command(builddep)'
>>> dnf builddep R-rgdal
>>> R
>>> install.packages("rgdal")
>>>
>>> * 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... no
>>> 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
>>> `/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’
>>>
>>> The downloaded source packages are in
>>>        ‘/tmp/RtmpooFgiH/downloaded_packages’
>>> Updating HTML index of packages in '.Library'
>>> Warning messages:
>>> 1: In install.packages("rgdal") :
>>>  installation of package ‘rgdal’ had non-zero exit status
>>> 2: In file.create(f.tg) :
>>>  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
>>> such file or directory'
>>> 3: In make.packages.html(.Library) : cannot update HTML package index
>>>>
>>>
>>> I don't have any insight into what happens here, but it is reproducible.
>>>
>>> Best,
>>> Ista
>>>
>>> On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]> 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 = "source")
>>>> Installing package into ‘/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 (<[hidden email]>) escribió:
>>>>>
>>>>> On Sun, 28 Jun 2020, Roger Bivand wrote:
>>>>>
>>>>>> Vero,
>>>>>>
>>>>>> On Sat, 27 Jun 2020, Veronica Andreo wrote:
>>>>>>
>>>>>>>  See the attached config.log file
>>>>>>>
>>>>>>
>>>>>> How did you install R itself? If an rpm, then
>>>>>>
>>>>>> https://github.com/r-spatial/sf/issues/1369
>>>>>>
>>>>>> may be relevant, also if you see errors installing sf. You would need to
>>>>>> unset LDFLAGS before installing:
>>>>>>
>>>>>> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>>>>>>
>>>>>> Please report back on this.
>>>>>
>>>>> 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 the
>>>>> problem.
>>>>>
>>>>> Roger
>>>>>
>>>>>
>>>>>>
>>>>>> Roger
>>>>>>
>>>>>>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>>>>>>>  (<[hidden email]>)
>>>>>>>  escribió:
>>>>>>>
>>>>>>>>  Hello everyone
>>>>>>>>
>>>>>>>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
>>>>>>>>  6) and when updating my R packages, I get the following error for rgdal.
>>>>>>>>  Can someone help me out here? What does it mean that it cannot run C++
>>>>>>>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>>>>>>>>  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   base
>>>>>>>>
>>>>>>>>  loaded via a namespace (and not attached):
>>>>>>>>  [1] compiler_3.6.3 tools_3.6.3
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Roger Bivand
>>>>> Department of Economics, Norwegian School of Economics,
>>>>> Helleveien 30, N-5045 Bergen, Norway.
>>>>> voice: +47 55 95 93 55; e-mail: [hidden email]
>>>>> https://orcid.org/0000-0003-2392-6140
>>>>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>>>>
>>>> _______________________________________________
>>>> R-sig-Geo mailing list
>>>> [hidden email]
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>
>> --
>> Roger Bivand
>> Department of Economics, Norwegian School of Economics,
>> Helleveien 30, N-5045 Bergen, Norway.
>> voice: +47 55 95 93 55; e-mail: [hidden email]
>> https://orcid.org/0000-0003-2392-6140
>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en_______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Roger Bivand
Administrator
In thread
https://stat.ethz.ch/pipermail/r-sig-fedora/2020-June/000653.html, Iñaki
Úcar explains that, following the introduction of AC_LANG(C++) into
configure.ac about 11 June, the Fedora R rpm would also need CXXFLAGS set.

Having added : ${CXXFLAGS=`"${RBIN}" CMD config CXXFLAGS`} to
configure.ac, I can confirm that the work-around flag is not needed, and
that (once R-forge revision 1021 completes), install.packages("rgdal",
repos="http://R-Forge.R-project.org") should work on Fedora R rpm
platforms. Those affected please check and confirm.

Many thanks to Bennet and Iñaki!

Roger

On Mon, 29 Jun 2020, Roger Bivand wrote:

> Bennet,
>
> Thanks for the careful analysis.
>
> On Sun, 28 Jun 2020, Bennet Fauber wrote:
>
>>  Roger,
>>
>>  This seems to be an outcome of a 'security' policy that
>>  RedHat/Fedora/CentOS implemented.  There are some circumstances where
>>  I think that could be justified, but I do not think compiling R is one
>>  of them.
>>
>>  It was reported several times to RedHat's Bugzilla and basically
>>  ignored by RedHat at least as far back as 2015-12-02.  There are
>>  several reports of slightly different versions of the report, but none
>>  of them got acted upon.  Some details and links to other issues marked
>>  as duplicates (but also seemingly closed without any attention or
>>  action) can be found at
>>
>>     https://bugzilla.redhat.com/show_bug.cgi?id=1287743
>>
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1343892 includes more
> information. Many traces in search suggest that a missing redhat-rpm-config
> package is to blame, but it is certainly present on my test system.
>
> The Redhat policy positions are specified in:
>
> https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
>
> but do not seem to resolve the conflict between autoconf and
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld.
>
> I'll raise this on the R fedora list.
>
> Roger
>
>>  The version of R-rgdal that is in the Fedora archive as a binary is
>>  rgdal_1.4-8 and that .srpm will build, however if it is updated to use
>>  rgdal_1.5-12 it fails the same way that it does with the source build.
>>
>>
>>
>>  On Sun, Jun 28, 2020 at 1:17 PM Roger Bivand <[hidden email]> wrote:
>>>
>>>  On Sun, 28 Jun 2020, Ista Zahn wrote:
>>>
>>>>  I can reproduce this error using the official Fedora 32 docker image:
>>>
>>>  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
>>>
>>>>
>>>>  docker run -it library/fedora:32
>>>>  dnf install 'dnf-command(builddep)'
>>>>  dnf builddep R-rgdal
>>>>  R
>>>>  install.packages("rgdal")
>>>>
>>>>  * 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... no
>>>> 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
>>>>  `/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’
>>>>
>>>>  The downloaded source packages are in
>>>>         ‘/tmp/RtmpooFgiH/downloaded_packages’
>>>>  Updating HTML index of packages in '.Library'
>>>>  Warning messages:
>>>>  1: In install.packages("rgdal") :
>>>>  installation of package ‘rgdal’ had non-zero exit status
>>>>  2: In file.create(f.tg) :
>>>>  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
>>>>  such file or directory'
>>>>  3: In make.packages.html(.Library) : cannot update HTML package index
>>>>>
>>>>
>>>>  I don't have any insight into what happens here, but it is reproducible.
>>>>
>>>>  Best,
>>>>  Ista
>>>>
>>>>  On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]>
>>>>  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
>>>>>  = "source")
>>>>>  Installing package into
>>>>>  ‘/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
>>>>> configure:  -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
>>>>> configure:  -fexceptions -fstack-protector-strong -grecord-gcc-switches
>>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
>>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64
>>>>> configure:  -mtune=generic -fasynchronous-unwind-tables
>>>>> configure:  -fstack-clash-protection -fcf-protection
>>>>> configure:  CPPFLAGS: -I/usr/local/include
>>>>> configure:  LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
>>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
>>>>>  loadflags: yes
>>>>> configure:  LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
>>>>> configure:  -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 (<[hidden email]>)
>>>>>  escribió:
>>>>>>
>>>>>>  On Sun, 28 Jun 2020, Roger Bivand wrote:
>>>>>>
>>>>>>>  Vero,
>>>>>>>
>>>>>>>  On Sat, 27 Jun 2020, Veronica Andreo wrote:
>>>>>>>
>>>>>>>>   See the attached config.log file
>>>>>>>>
>>>>>>>
>>>>>>>  How did you install R itself? If an rpm, then
>>>>>>>
>>>>>>>  https://github.com/r-spatial/sf/issues/1369
>>>>>>>
>>>>>>>  may be relevant, also if you see errors installing sf. You would need
>>>>>>>  to
>>>>>>>  unset LDFLAGS before installing:
>>>>>>>
>>>>>>>  https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>>>>>>>
>>>>>>>  Please report back on this.
>>>>>>
>>>>>>  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
>>>>>>  the
>>>>>>  problem.
>>>>>>
>>>>>>  Roger
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>  Roger
>>>>>>>
>>>>>>>>   El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>>>>>>>>   (<[hidden email]>)
>>>>>>>>   escribió:
>>>>>>>>
>>>>>>>>>   Hello everyone
>>>>>>>>>
>>>>>>>>>   I have just updated my system to fedora 32 (which fetched GDAL 3
>>>>>>>>>   and PROJ
>>>>>>>>>   6) and when updating my R packages, I get the following error for
>>>>>>>>>   rgdal.
>>>>>>>>>   Can someone help me out here? What does it mean that it cannot run
>>>>>>>>>   C++
>>>>>>>>>   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
>>>>>>>>>   'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>>>>>>>>>   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
>>>>>>>>>   base
>>>>>>>>>
>>>>>>>>>   loaded via a namespace (and not attached):
>>>>>>>>>   [1] compiler_3.6.3 tools_3.6.3
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>  --
>>>>>>  Roger Bivand
>>>>>>  Department of Economics, Norwegian School of Economics,
>>>>>>  Helleveien 30, N-5045 Bergen, Norway.
>>>>>>  voice: +47 55 95 93 55; e-mail: [hidden email]
>>>>>>  https://orcid.org/0000-0003-2392-6140
>>>>>>  https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>>>>>
>>>>>  _______________________________________________
>>>>>  R-sig-Geo mailing list
>>>>>  [hidden email]
>>>>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>
>>>
>>>  --
>>>  Roger Bivand
>>>  Department of Economics, Norwegian School of Economics,
>>>  Helleveien 30, N-5045 Bergen, Norway.
>>>  voice: +47 55 95 93 55; e-mail: [hidden email]
>>>  https://orcid.org/0000-0003-2392-6140
>>>  https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en_______________________________________________
>>>  R-sig-Geo mailing list
>>>  [hidden email]
>>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Bennet Fauber
In reply to this post by Roger Bivand
Roger,

I believe the redhat-rpm-config package is actually the culprit that
introduces the problem.  It's missing in the sense that it gets pulled
in when it is not there.  There is something to that effect in the
Change Log for the Fedora R package, I believe, but it's not very
informative other than to say it is happening.

Sorry, I should have been more clear.

-- bennet




On Mon, Jun 29, 2020 at 3:57 AM Roger Bivand <[hidden email]> wrote:

>
> Bennet,
>
> Thanks for the careful analysis.
>
> On Sun, 28 Jun 2020, Bennet Fauber wrote:
>
> > Roger,
> >
> > This seems to be an outcome of a 'security' policy that
> > RedHat/Fedora/CentOS implemented.  There are some circumstances where
> > I think that could be justified, but I do not think compiling R is one
> > of them.
> >
> > It was reported several times to RedHat's Bugzilla and basically
> > ignored by RedHat at least as far back as 2015-12-02.  There are
> > several reports of slightly different versions of the report, but none
> > of them got acted upon.  Some details and links to other issues marked
> > as duplicates (but also seemingly closed without any attention or
> > action) can be found at
> >
> >    https://bugzilla.redhat.com/show_bug.cgi?id=1287743
> >
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1343892 includes more
> information. Many traces in search suggest that a missing
> redhat-rpm-config package is to blame, but it is certainly present on my
> test system.
>
> The Redhat policy positions are specified in:
>
> https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
>
> but do not seem to resolve the conflict between autoconf and
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld.
>
> I'll raise this on the R fedora list.
>
> Roger
>
> > The version of R-rgdal that is in the Fedora archive as a binary is
> > rgdal_1.4-8 and that .srpm will build, however if it is updated to use
> > rgdal_1.5-12 it fails the same way that it does with the source build.
> >
> >
> >
> > On Sun, Jun 28, 2020 at 1:17 PM Roger Bivand <[hidden email]> wrote:
> >>
> >> On Sun, 28 Jun 2020, Ista Zahn wrote:
> >>
> >>> I can reproduce this error using the official Fedora 32 docker image:
> >>
> >> 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
> >>
> >>>
> >>> docker run -it library/fedora:32
> >>> dnf install 'dnf-command(builddep)'
> >>> dnf builddep R-rgdal
> >>> R
> >>> install.packages("rgdal")
> >>>
> >>> * 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... no
> >>> 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
> >>> `/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’
> >>>
> >>> The downloaded source packages are in
> >>>        ‘/tmp/RtmpooFgiH/downloaded_packages’
> >>> Updating HTML index of packages in '.Library'
> >>> Warning messages:
> >>> 1: In install.packages("rgdal") :
> >>>  installation of package ‘rgdal’ had non-zero exit status
> >>> 2: In file.create(f.tg) :
> >>>  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
> >>> such file or directory'
> >>> 3: In make.packages.html(.Library) : cannot update HTML package index
> >>>>
> >>>
> >>> I don't have any insight into what happens here, but it is reproducible.
> >>>
> >>> Best,
> >>> Ista
> >>>
> >>> On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]> 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 = "source")
> >>>> Installing package into ‘/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 (<[hidden email]>) escribió:
> >>>>>
> >>>>> On Sun, 28 Jun 2020, Roger Bivand wrote:
> >>>>>
> >>>>>> Vero,
> >>>>>>
> >>>>>> On Sat, 27 Jun 2020, Veronica Andreo wrote:
> >>>>>>
> >>>>>>>  See the attached config.log file
> >>>>>>>
> >>>>>>
> >>>>>> How did you install R itself? If an rpm, then
> >>>>>>
> >>>>>> https://github.com/r-spatial/sf/issues/1369
> >>>>>>
> >>>>>> may be relevant, also if you see errors installing sf. You would need to
> >>>>>> unset LDFLAGS before installing:
> >>>>>>
> >>>>>> https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
> >>>>>>
> >>>>>> Please report back on this.
> >>>>>
> >>>>> 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 the
> >>>>> problem.
> >>>>>
> >>>>> Roger
> >>>>>
> >>>>>
> >>>>>>
> >>>>>> Roger
> >>>>>>
> >>>>>>>  El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
> >>>>>>>  (<[hidden email]>)
> >>>>>>>  escribió:
> >>>>>>>
> >>>>>>>>  Hello everyone
> >>>>>>>>
> >>>>>>>>  I have just updated my system to fedora 32 (which fetched GDAL 3 and PROJ
> >>>>>>>>  6) and when updating my R packages, I get the following error for rgdal.
> >>>>>>>>  Can someone help me out here? What does it mean that it cannot run C++
> >>>>>>>>  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 'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
> >>>>>>>>  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   base
> >>>>>>>>
> >>>>>>>>  loaded via a namespace (and not attached):
> >>>>>>>>  [1] compiler_3.6.3 tools_3.6.3
> >>>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>> --
> >>>>> Roger Bivand
> >>>>> Department of Economics, Norwegian School of Economics,
> >>>>> Helleveien 30, N-5045 Bergen, Norway.
> >>>>> voice: +47 55 95 93 55; e-mail: [hidden email]
> >>>>> https://orcid.org/0000-0003-2392-6140
> >>>>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
> >>>>
> >>>> _______________________________________________
> >>>> R-sig-Geo mailing list
> >>>> [hidden email]
> >>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>>
> >>
> >> --
> >> Roger Bivand
> >> Department of Economics, Norwegian School of Economics,
> >> Helleveien 30, N-5045 Bergen, Norway.
> >> voice: +47 55 95 93 55; e-mail: [hidden email]
> >> https://orcid.org/0000-0003-2392-6140
> >> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en_______________________________________________
> >> R-sig-Geo mailing list
> >> [hidden email]
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> --
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; e-mail: [hidden email]
> https://orcid.org/0000-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Bennet Fauber
In reply to this post by Roger Bivand
Thanks for the update, Roger!  Very glad you got a response so
quickly, and a fix to match.

I would reiterate Iñaki's warning to folks.

    ...note that CPPFLAGS are *not* CXXFLAGS; I say this because it's
a common mistake

CPPFLAGS -> C preprocessor and are use to specify include files
CXXFLAGS -> C++ compilation flags

I have hurt myself several times thinking that CPP must be C Plus
Plus, not C Pre Processor.

On Mon, Jun 29, 2020 at 8:03 AM Roger Bivand <[hidden email]> wrote:

>
> In thread
> https://stat.ethz.ch/pipermail/r-sig-fedora/2020-June/000653.html, Iñaki
> Úcar explains that, following the introduction of AC_LANG(C++) into
> configure.ac about 11 June, the Fedora R rpm would also need CXXFLAGS set.
>
> Having added : ${CXXFLAGS=`"${RBIN}" CMD config CXXFLAGS`} to
> configure.ac, I can confirm that the work-around flag is not needed, and
> that (once R-forge revision 1021 completes), install.packages("rgdal",
> repos="http://R-Forge.R-project.org") should work on Fedora R rpm
> platforms. Those affected please check and confirm.
>
> Many thanks to Bennet and Iñaki!
>
> Roger
>
> On Mon, 29 Jun 2020, Roger Bivand wrote:
>
> > Bennet,
> >
> > Thanks for the careful analysis.
> >
> > On Sun, 28 Jun 2020, Bennet Fauber wrote:
> >
> >>  Roger,
> >>
> >>  This seems to be an outcome of a 'security' policy that
> >>  RedHat/Fedora/CentOS implemented.  There are some circumstances where
> >>  I think that could be justified, but I do not think compiling R is one
> >>  of them.
> >>
> >>  It was reported several times to RedHat's Bugzilla and basically
> >>  ignored by RedHat at least as far back as 2015-12-02.  There are
> >>  several reports of slightly different versions of the report, but none
> >>  of them got acted upon.  Some details and links to other issues marked
> >>  as duplicates (but also seemingly closed without any attention or
> >>  action) can be found at
> >>
> >>     https://bugzilla.redhat.com/show_bug.cgi?id=1287743
> >>
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=1343892 includes more
> > information. Many traces in search suggest that a missing redhat-rpm-config
> > package is to blame, but it is certainly present on my test system.
> >
> > The Redhat policy positions are specified in:
> >
> > https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
> >
> > but do not seem to resolve the conflict between autoconf and
> > -specs=/usr/lib/rpm/redhat/redhat-hardened-ld.
> >
> > I'll raise this on the R fedora list.
> >
> > Roger
> >
> >>  The version of R-rgdal that is in the Fedora archive as a binary is
> >>  rgdal_1.4-8 and that .srpm will build, however if it is updated to use
> >>  rgdal_1.5-12 it fails the same way that it does with the source build.
> >>
> >>
> >>
> >>  On Sun, Jun 28, 2020 at 1:17 PM Roger Bivand <[hidden email]> wrote:
> >>>
> >>>  On Sun, 28 Jun 2020, Ista Zahn wrote:
> >>>
> >>>>  I can reproduce this error using the official Fedora 32 docker image:
> >>>
> >>>  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
> >>>
> >>>>
> >>>>  docker run -it library/fedora:32
> >>>>  dnf install 'dnf-command(builddep)'
> >>>>  dnf builddep R-rgdal
> >>>>  R
> >>>>  install.packages("rgdal")
> >>>>
> >>>>  * 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... no
> >>>> 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
> >>>>  `/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’
> >>>>
> >>>>  The downloaded source packages are in
> >>>>         ‘/tmp/RtmpooFgiH/downloaded_packages’
> >>>>  Updating HTML index of packages in '.Library'
> >>>>  Warning messages:
> >>>>  1: In install.packages("rgdal") :
> >>>>  installation of package ‘rgdal’ had non-zero exit status
> >>>>  2: In file.create(f.tg) :
> >>>>  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
> >>>>  such file or directory'
> >>>>  3: In make.packages.html(.Library) : cannot update HTML package index
> >>>>>
> >>>>
> >>>>  I don't have any insight into what happens here, but it is reproducible.
> >>>>
> >>>>  Best,
> >>>>  Ista
> >>>>
> >>>>  On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]>
> >>>>  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
> >>>>>  = "source")
> >>>>>  Installing package into
> >>>>>  ‘/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
> >>>>> configure:  -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
> >>>>> configure:  -fexceptions -fstack-protector-strong -grecord-gcc-switches
> >>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> >>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64
> >>>>> configure:  -mtune=generic -fasynchronous-unwind-tables
> >>>>> configure:  -fstack-clash-protection -fcf-protection
> >>>>> configure:  CPPFLAGS: -I/usr/local/include
> >>>>> configure:  LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> >>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
> >>>>>  loadflags: yes
> >>>>> configure:  LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> >>>>> configure:  -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 (<[hidden email]>)
> >>>>>  escribió:
> >>>>>>
> >>>>>>  On Sun, 28 Jun 2020, Roger Bivand wrote:
> >>>>>>
> >>>>>>>  Vero,
> >>>>>>>
> >>>>>>>  On Sat, 27 Jun 2020, Veronica Andreo wrote:
> >>>>>>>
> >>>>>>>>   See the attached config.log file
> >>>>>>>>
> >>>>>>>
> >>>>>>>  How did you install R itself? If an rpm, then
> >>>>>>>
> >>>>>>>  https://github.com/r-spatial/sf/issues/1369
> >>>>>>>
> >>>>>>>  may be relevant, also if you see errors installing sf. You would need
> >>>>>>>  to
> >>>>>>>  unset LDFLAGS before installing:
> >>>>>>>
> >>>>>>>  https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
> >>>>>>>
> >>>>>>>  Please report back on this.
> >>>>>>
> >>>>>>  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
> >>>>>>  the
> >>>>>>  problem.
> >>>>>>
> >>>>>>  Roger
> >>>>>>
> >>>>>>
> >>>>>>>
> >>>>>>>  Roger
> >>>>>>>
> >>>>>>>>   El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
> >>>>>>>>   (<[hidden email]>)
> >>>>>>>>   escribió:
> >>>>>>>>
> >>>>>>>>>   Hello everyone
> >>>>>>>>>
> >>>>>>>>>   I have just updated my system to fedora 32 (which fetched GDAL 3
> >>>>>>>>>   and PROJ
> >>>>>>>>>   6) and when updating my R packages, I get the following error for
> >>>>>>>>>   rgdal.
> >>>>>>>>>   Can someone help me out here? What does it mean that it cannot run
> >>>>>>>>>   C++
> >>>>>>>>>   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
> >>>>>>>>>   'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
> >>>>>>>>>   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
> >>>>>>>>>   base
> >>>>>>>>>
> >>>>>>>>>   loaded via a namespace (and not attached):
> >>>>>>>>>   [1] compiler_3.6.3 tools_3.6.3
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>  --
> >>>>>>  Roger Bivand
> >>>>>>  Department of Economics, Norwegian School of Economics,
> >>>>>>  Helleveien 30, N-5045 Bergen, Norway.
> >>>>>>  voice: +47 55 95 93 55; e-mail: [hidden email]
> >>>>>>  https://orcid.org/0000-0003-2392-6140
> >>>>>>  https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
> >>>>>
> >>>>>  _______________________________________________
> >>>>>  R-sig-Geo mailing list
> >>>>>  [hidden email]
> >>>>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>>>
> >>>
> >>>  --
> >>>  Roger Bivand
> >>>  Department of Economics, Norwegian School of Economics,
> >>>  Helleveien 30, N-5045 Bergen, Norway.
> >>>  voice: +47 55 95 93 55; e-mail: [hidden email]
> >>>  https://orcid.org/0000-0003-2392-6140
> >>>  https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en_______________________________________________
> >>>  R-sig-Geo mailing list
> >>>  [hidden email]
> >>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>
> >
> >
>
> --
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; e-mail: [hidden email]
> https://orcid.org/0000-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: cannot install rgdal after updating to fedora32

Roger Bivand
Administrator
On Mon, 29 Jun 2020, Bennet Fauber wrote:

> Thanks for the update, Roger!  Very glad you got a response so
> quickly, and a fix to match.

I hope it worked in your case.

>
> I would reiterate Iñaki's warning to folks.
>
>    ...note that CPPFLAGS are *not* CXXFLAGS; I say this because it's
> a common mistake
>
> CPPFLAGS -> C preprocessor and are use to specify include files
> CXXFLAGS -> C++ compilation flags
>
> I have hurt myself several times thinking that CPP must be C Plus
> Plus, not C Pre Processor.
Not the case here, CPP was for the pre-processor and had been around a
long time to try to union the positions of R, GDAL and PROJ if possible.

Roger

>
> On Mon, Jun 29, 2020 at 8:03 AM Roger Bivand <[hidden email]> wrote:
>>
>> In thread
>> https://stat.ethz.ch/pipermail/r-sig-fedora/2020-June/000653.html, Iñaki
>> Úcar explains that, following the introduction of AC_LANG(C++) into
>> configure.ac about 11 June, the Fedora R rpm would also need CXXFLAGS set.
>>
>> Having added : ${CXXFLAGS=`"${RBIN}" CMD config CXXFLAGS`} to
>> configure.ac, I can confirm that the work-around flag is not needed, and
>> that (once R-forge revision 1021 completes), install.packages("rgdal",
>> repos="http://R-Forge.R-project.org") should work on Fedora R rpm
>> platforms. Those affected please check and confirm.
>>
>> Many thanks to Bennet and Iñaki!
>>
>> Roger
>>
>> On Mon, 29 Jun 2020, Roger Bivand wrote:
>>
>>> Bennet,
>>>
>>> Thanks for the careful analysis.
>>>
>>> On Sun, 28 Jun 2020, Bennet Fauber wrote:
>>>
>>>>  Roger,
>>>>
>>>>  This seems to be an outcome of a 'security' policy that
>>>>  RedHat/Fedora/CentOS implemented.  There are some circumstances where
>>>>  I think that could be justified, but I do not think compiling R is one
>>>>  of them.
>>>>
>>>>  It was reported several times to RedHat's Bugzilla and basically
>>>>  ignored by RedHat at least as far back as 2015-12-02.  There are
>>>>  several reports of slightly different versions of the report, but none
>>>>  of them got acted upon.  Some details and links to other issues marked
>>>>  as duplicates (but also seemingly closed without any attention or
>>>>  action) can be found at
>>>>
>>>>     https://bugzilla.redhat.com/show_bug.cgi?id=1287743
>>>>
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=1343892 includes more
>>> information. Many traces in search suggest that a missing redhat-rpm-config
>>> package is to blame, but it is certainly present on my test system.
>>>
>>> The Redhat policy positions are specified in:
>>>
>>> https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
>>>
>>> but do not seem to resolve the conflict between autoconf and
>>> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld.
>>>
>>> I'll raise this on the R fedora list.
>>>
>>> Roger
>>>
>>>>  The version of R-rgdal that is in the Fedora archive as a binary is
>>>>  rgdal_1.4-8 and that .srpm will build, however if it is updated to use
>>>>  rgdal_1.5-12 it fails the same way that it does with the source build.
>>>>
>>>>
>>>>
>>>>  On Sun, Jun 28, 2020 at 1:17 PM Roger Bivand <[hidden email]> wrote:
>>>>>
>>>>>  On Sun, 28 Jun 2020, Ista Zahn wrote:
>>>>>
>>>>>>  I can reproduce this error using the official Fedora 32 docker image:
>>>>>
>>>>>  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
>>>>>
>>>>>>
>>>>>>  docker run -it library/fedora:32
>>>>>>  dnf install 'dnf-command(builddep)'
>>>>>>  dnf builddep R-rgdal
>>>>>>  R
>>>>>>  install.packages("rgdal")
>>>>>>
>>>>>>  * 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... no
>>>>>> 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
>>>>>>  `/tmp/Rtmp2o3TMz/R.INSTALLf5d2a7cbb3e/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 ‘/usr/lib64/R/library/rgdal’
>>>>>>
>>>>>>  The downloaded source packages are in
>>>>>>         ‘/tmp/RtmpooFgiH/downloaded_packages’
>>>>>>  Updating HTML index of packages in '.Library'
>>>>>>  Warning messages:
>>>>>>  1: In install.packages("rgdal") :
>>>>>>  installation of package ‘rgdal’ had non-zero exit status
>>>>>>  2: In file.create(f.tg) :
>>>>>>  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
>>>>>>  such file or directory'
>>>>>>  3: In make.packages.html(.Library) : cannot update HTML package index
>>>>>>>
>>>>>>
>>>>>>  I don't have any insight into what happens here, but it is reproducible.
>>>>>>
>>>>>>  Best,
>>>>>>  Ista
>>>>>>
>>>>>>  On Sun, Jun 28, 2020 at 9:42 AM Veronica Andreo <[hidden email]>
>>>>>>  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
>>>>>>>  = "source")
>>>>>>>  Installing package into
>>>>>>>  ‘/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
>>>>>>> configure:  -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
>>>>>>> configure:  -fexceptions -fstack-protector-strong -grecord-gcc-switches
>>>>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
>>>>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64
>>>>>>> configure:  -mtune=generic -fasynchronous-unwind-tables
>>>>>>> configure:  -fstack-clash-protection -fcf-protection
>>>>>>> configure:  CPPFLAGS: -I/usr/local/include
>>>>>>> configure:  LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
>>>>>>> configure:  -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
>>>>>>>  loadflags: yes
>>>>>>> configure:  LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
>>>>>>> configure:  -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 (<[hidden email]>)
>>>>>>>  escribió:
>>>>>>>>
>>>>>>>>  On Sun, 28 Jun 2020, Roger Bivand wrote:
>>>>>>>>
>>>>>>>>>  Vero,
>>>>>>>>>
>>>>>>>>>  On Sat, 27 Jun 2020, Veronica Andreo wrote:
>>>>>>>>>
>>>>>>>>>>   See the attached config.log file
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  How did you install R itself? If an rpm, then
>>>>>>>>>
>>>>>>>>>  https://github.com/r-spatial/sf/issues/1369
>>>>>>>>>
>>>>>>>>>  may be relevant, also if you see errors installing sf. You would need
>>>>>>>>>  to
>>>>>>>>>  unset LDFLAGS before installing:
>>>>>>>>>
>>>>>>>>>  https://github.com/r-spatial/sf/issues/1369#issuecomment-614096865
>>>>>>>>>
>>>>>>>>>  Please report back on this.
>>>>>>>>
>>>>>>>>  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
>>>>>>>>  the
>>>>>>>>  problem.
>>>>>>>>
>>>>>>>>  Roger
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>>  Roger
>>>>>>>>>
>>>>>>>>>>   El sáb., 27 jun. 2020 a las 21:29, Veronica Andreo
>>>>>>>>>>   (<[hidden email]>)
>>>>>>>>>>   escribió:
>>>>>>>>>>
>>>>>>>>>>>   Hello everyone
>>>>>>>>>>>
>>>>>>>>>>>   I have just updated my system to fedora 32 (which fetched GDAL 3
>>>>>>>>>>>   and PROJ
>>>>>>>>>>>   6) and when updating my R packages, I get the following error for
>>>>>>>>>>>   rgdal.
>>>>>>>>>>>   Can someone help me out here? What does it mean that it cannot run
>>>>>>>>>>>   C++
>>>>>>>>>>>   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
>>>>>>>>>>>   'http://cran.rstudio.com/src/contrib/rgdal_1.5-12.tar.gz'
>>>>>>>>>>>   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
>>>>>>>>>>>   base
>>>>>>>>>>>
>>>>>>>>>>>   loaded via a namespace (and not attached):
>>>>>>>>>>>   [1] compiler_3.6.3 tools_3.6.3
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>  --
>>>>>>>>  Roger Bivand
>>>>>>>>  Department of Economics, Norwegian School of Economics,
>>>>>>>>  Helleveien 30, N-5045 Bergen, Norway.
>>>>>>>>  voice: +47 55 95 93 55; e-mail: [hidden email]
>>>>>>>>  https://orcid.org/0000-0003-2392-6140
>>>>>>>>  https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>>>>>>>
>>>>>>>  _______________________________________________
>>>>>>>  R-sig-Geo mailing list
>>>>>>>  [hidden email]
>>>>>>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>>>
>>>>>
>>>>>  --
>>>>>  Roger Bivand
>>>>>  Department of Economics, Norwegian School of Economics,
>>>>>  Helleveien 30, N-5045 Bergen, Norway.
>>>>>  voice: +47 55 95 93 55; e-mail: [hidden email]
>>>>>  https://orcid.org/0000-0003-2392-6140
>>>>>  https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en_______________________________________________
>>>>>  R-sig-Geo mailing list
>>>>>  [hidden email]
>>>>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>
>>>
>>>
>>
>> --
>> Roger Bivand
>> Department of Economics, Norwegian School of Economics,
>> Helleveien 30, N-5045 Bergen, Norway.
>> voice: +47 55 95 93 55; e-mail: [hidden email]
>> https://orcid.org/0000-0003-2392-6140
>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway