[R-sig-Geo] GDAL 3.0.0 and rgdal?

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Thu May 30 08:38:54 CEST 2019

As you should see, pkg-config is picking up your 4.9.3 PROJ. It is never a good idea to use multiple versions unless you are also willing to keep control of the runtime load path too. Here you could rename the 4.9.3 proj.pc file and point shell variable PKG_CONFIG_PATH at the 6.0.0 proj.pc, or rename both to use only the configure arguments. Using pkg-config takes precedence over configure arguments, it seems.


Roger Bivand
Norwegian School of Economics
Bergen, Norway

Fra: Thiago V. dos Santos
Sendt: torsdag 30. mai, 05.43
Emne: Re: [R-sig-Geo] GDAL 3.0.0 and rgdal?
Til: r-sig-geo using r-project.org
Kopi: Roger Bivand, Edzer Pebesma

Dear Roger and Edzer,

Many thanks for the update. The installation now passes the GDAL version check, but it fails when looking for proj_api.h. Please see the complete error message below.

# This is from the R terminal:
install.packages('rgdal', type = "source", configure.args=c(

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.4-4.tar.gz'
Content type 'application/x-gzip' length 1687518 bytes (1.6 MB)
downloaded 1.6 MB

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /usr/lib/R
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.4-4
checking for /usr/bin/svnversion... yes
configure: svn revision: 833
configure: gdal-config set to /opt/software/bin/gdal-config
checking gdal-config exists... yes
checking gdal-config executable... yes
checking gdal-config usability... yes
configure: GDAL: 3.0.0
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: /opt/software/share/gdal/pcs.csv readable... no
configure: pkg-config proj exists, will use it
configure: PROJ version: 4.9.3
configure: PROJ version < 6.0.0
configure: proj CPP flags:  -I/opt/software/include
checking PROJ header API:... proj_api.h
checking proj_api.h presence and usability... yes
checking PROJ version agreement... no
configure: error: proj_api.h and pkg-config give different versions
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/local/lib/R/site-library/rgdal’
* restoring previous ‘/usr/local/lib/R/site-library/rgdal’

The downloaded source packages are in
Warning message:
In install.packages("rgdal", type = "source", configure.args = c("--with-gdal-config=/opt/software/bin/gdal-config",  :
  installation of package ‘rgdal’ had non-zero exit status

I do have two installations of PROJ on my system:

1) PROJ v4.9.3 supplied by Ubuntu.
2) PROJ v6.0.0 manually built by me on /opt/software. I made sure to pass that directory in the install.packages() command, but it seems to be ignored.

Perhaps I am missing a configure.args argument?

 -- Thiago V. dos Santos

Postdoctoral Research Fellow
Department of Climate and Space Science and Engineering
University of Michigan

On Wednesday, May 29, 2019, 12:54:22 PM EDT, Roger Bivand <Roger.Bivand using nhh.no> wrote:

rgdal_1.4-4 source on CRAN, Windows and OSX binaries to follow shortly.


On Mon, 27 May 2019, Thiago V. dos Santos wrote:

> Thanks for the feedback Edzer and Roger. The development version indeed
> works fine with GDAL 3.
> Sent from Yahoo Mail for iPhone
> On Monday, May 27, 2019, 6:31 AM, Roger Bivand <Roger.Bivand using nhh.no<mailto:Roger.Bivand using nhh.no>> wrote:
> On Mon, 27 May 2019, Edzer Pebesma wrote:
>> The development version installs with GDAL 3, try
>> install.packages("rgdal", repos="http://R-Forge.R-project.org")
> I'll try to submit to CRAN this week.
> Roger
>> On 5/27/19 1:43 AM, Thiago V. dos Santos via R-sig-Geo wrote:
>>> Dear all,
>>> Yesterday I replaced GDAL v2.4.1 with the latest v3.0.0 on my Linux server. Then, when I tried to reinstall rgdal, I got an error due to wrong system requirements: rgdal requires GDAL between versions 1.11.4 and 2.5.0.
>>> Therefore, I am wondering: are there plans for rgdal to support GDAL 3.0.0 in the next few days? I like to be up-to-date with GIS software, but I don't really need to use GDAL 3.0.0 at all. If it is going to be a little while until it is supported by rgdal, I can happily revert back to v2.4.1.
>>> Thanks, -- Thiago V. dos Santos
>>> Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan
>>>     [[alternative HTML version deleted]]
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo using r-project.org<mailto:R-sig-Geo using r-project.org>
>>> 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: Roger.Bivand using nhh.no<mailto:Roger.Bivand using nhh.no>

	[[alternative HTML version deleted]]

More information about the R-sig-Geo mailing list