rgdal compile confusion
On Mon, 20 Aug 2018, Roger Bivand wrote:
And the output of sessionInfo() - we don't know your platform. How was GDAL itself installed: from source or binary? Was that binary built on the same platform? Are there multiple GDAL installations on your system? If so, the configure step may see one version but install sees another.
Roger,
sessionInfo()
R version 3.5.1 (2018-07-02) Platform: i586-slackware-linux-gnu (32-bit) Running under: Slackware 14.2 Matrix products: default BLAS: /usr/lib/R/lib/libRblas.so LAPACK: /usr/lib/R/lib/libRlapack.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C [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.5.1 tools_3.5.1 tcltk_3.5.1 gdal is built from source using the SlackBuiilds.org <https://www.slackbuilds.org/> build script. gdal-2.3.1 is the only gdal package installed. With the upgraded (2.3.0 -> 2.3.1) gdal version installed fails the same way in response to both update.packages() and install.packages('rgdal'):
install.packages('rgdal')
trying URL 'https://ftp.osuosl.org/pub/cran/src/contrib/rgdal_1.3-4.tar.gz' Content type 'application/x-gzip' length 1664774 bytes (1.6 MB) ================================================== downloaded 1.6 MB * installing *source* package ?rgdal? ... ** package ?rgdal? successfully unpacked and MD5 sums checked configure: R_HOME: /usr/lib/R configure: CC: gcc configure: CXX: g++ configure: C++11 support available configure: rgdal: 1.3-4 checking for /usr/bin/svnversion... yes configure: svn revision: 766 checking for gdal-config... /usr/bin/gdal-config checking gdal-config usability... yes configure: GDAL: 2.3.1 checking C++11 support for GDAL >= 2.3.0... yes checking GDAL version >= 1.11.4... yes checking gdal: linking with --libs only... no checking gdal: linking with --libs and --dep-libs... no In file included from /usr/include/gdal.h:45:0, from gdal_test.cc:1: /usr/include/cpl_port.h:187:6: error: #error Must have C++11 or newer. # error Must have C++11 or newer. ^ In file included from /usr/include/gdal.h:49:0, from gdal_test.cc:1: /usr/include/cpl_minixml.h:202:47: error: expected template-name before '<' token class CPLXMLTreeCloser: public std::unique_ptr<CPLXMLNode, CPLXMLTreeCloserDeleter> ^ /usr/include/cpl_minixml.h:202:47: error: expected '{' before '<' token /usr/include/cpl_minixml.h:202:47: error: expected unqualified-id before '<' token In file included from /usr/include/ogr_api.h:45:0, from /usr/include/gdal.h:50, from gdal_test.cc:1: /usr/include/ogr_core.h:79:28: error: expected '}' before end of line /usr/include/ogr_core.h:79:28: error: expected declaration before end of line In file included from /usr/include/gdal.h:45:0, from gdal_test.cc:1: /usr/include/cpl_port.h:187:6: error: #error Must have C++11 or newer. # error Must have C++11 or newer. ^ In file included from /usr/include/gdal.h:49:0, from gdal_test.cc:1: /usr/include/cpl_minixml.h:202:47: error: expected template-name before '<' token class CPLXMLTreeCloser: public std::unique_ptr<CPLXMLNode, CPLXMLTreeCloserDeleter> ^ /usr/include/cpl_minixml.h:202:47: error: expected '{' before '<' token /usr/include/cpl_minixml.h:202:47: error: expected unqualified-id before '<' token In file included from /usr/include/ogr_api.h:45:0, from /usr/include/gdal.h:50, from gdal_test.cc:1: /usr/include/ogr_core.h:79:28: error: expected '}' before end of line /usr/include/ogr_core.h:79:28: error: expected declaration before end of line configure: Install failure: compilation and/or linkage problems. configure: error: GDALAllRegister not found in libgdal. ERROR: configuration failed for package ?rgdal? * removing ?/usr/lib/R/library/rgdal? * restoring previous ?/usr/lib/R/library/rgdal? The downloaded source packages are in ?/tmp/RtmpfJQHZG/downloaded_packages? Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In install.packages("rgdal") : installation of package ?rgdal? had non-zero exit status What other information can I provide? Regards, Rich