Hi Roger!
I updated GDAL and PROJ to 3.0.4 and 6.3.1, respectively... the install
worked perfectly using:
sudo R CMD INSTALL rgdal_1.5-13.tar.gz
Thank you so much!
Best,
Tom
On Fri, Jul 3, 2020 at 11:24 AM Roger Bivand <Roger.Bivand at nhh.no> wrote:
On Fri, 3 Jul 2020, Roger Bivand wrote:
On Fri, 3 Jul 2020, Thomas Adams wrote:
Hi Roger,
I just tried re-installing withou using the argument and got this:
Very useful, thanks - painful but another case of staying too close to
front. proj_create_crs_to_crs_from_pj() was new in PROJ 6.2.0. I'll try
adapt to accommodate older PROJ 6.
Re-creating a GDAL 3.0.0 with PROJ 6.1.0 platform has thrown up another
issue which which I'm struggling. I'll try to resolve it, but until then
advice would be to update GDAL and PROJ to 3.0.4 and 6.3.1, which we know
work (those are the versions in the CRAN Windows binary).
Roger
teaiii at teaiii-Leopard-WS:~$ sudo R CMD INSTALL rgdal_1.5-13.tar.gz
* installing to library
?/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0?
* installing *source* package ?rgdal? ...
** using staged installation
configure: R_HOME: /usr/local/lib/R
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
configure: CFLAGS: -g -O2
configure: CPPFLAGS: -I/usr/local/include
configure: CXXFLAGS: -g -O2
configure: LDFLAGS: -L/usr/local/lib
configure: LDFLAGS: -L/usr/local/lib
configure: CXX11 is: g++, CXX11STD is: -std=gnu++11
configure: CXX is: g++ -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/local/bin/gdal-config
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: /usr/local/share/gdal/stateplane.csv readable... yes
configure: pkg-config proj exists, will use it
configure: PROJ version: 6.1.0
configure: PROJ CPP flags: -DPROJ_H_API -I/usr/local/include
configure: PROJ LIBS: -L/usr/local/lib -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... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking proj.h usability... yes
checking proj.h presence... yes
checking for proj.h... yes
checking for proj_context_create in -lproj... yes
checking Using GDAL < 3 with PROJ >= 6... no
checking PROJ version >= 4.8.0... yes
checking PROJ: proj.db found and readable... yes
configure: Package CPP flags: -I/usr/local/include
-DPROJ_H_API
configure: Package LIBS: -L/usr/local/lib -lgdal -L/usr/local/lib
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c OGR_write.cpp -o OGR_write.o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c gdal-bindings.cpp -o
gdal-bindings.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c init.c -o init.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c inverser.c -o inverser.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c local_stubs.c -o local_stubs.o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogr_geom.cpp -o ogr_geom.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogr_polygons.c -o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogr_proj.cpp -o ogr_proj.o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogrdrivers.cpp -o ogrdrivers.o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogrsource.cpp -o ogrsource.o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c proj6.cpp -o proj6.o
proj6.cpp: In function ?SEXPREC* transform_ng(SEXP, SEXP, SEXP, SEXP,
SEXP,
SEXP, SEXP)?:
proj6.cpp:521:29: error: ?proj_create_crs_to_crs_from_pj? was not
in this scope
if ((pj_transform =
proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX,
source_crs,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proj6.cpp:521:29: note: suggested alternative: ?proj_create_crs_to_crs?
if ((pj_transform =
proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX,
source_crs,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proj_create_crs_to_crs
proj6.cpp: In function ?SEXPREC* project_ng_coordOp(SEXP, SEXP)?:
proj6.cpp:704:33: error: ?proj_create_crs_to_crs_from_pj? was not
in this scope
if (use_inv) pj_transform =
proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, target_crs,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proj6.cpp:704:33: note: suggested alternative: ?proj_create_crs_to_crs?
if (use_inv) pj_transform =
proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, target_crs,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proj_create_crs_to_crs
proj6.cpp:706:25: error: ?proj_create_crs_to_crs_from_pj? was not
in this scope
else pj_transform = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX,
source_crs,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proj6.cpp:706:25: note: suggested alternative: ?proj_create_crs_to_crs?
else pj_transform = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX,
source_crs,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proj_create_crs_to_crs
/usr/local/lib/R/etc/Makeconf:176: recipe for target 'proj6.o' failed
make: *** [proj6.o] Error 1
ERROR: compilation failed for package ?rgdal?
* removing ?/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/rgdal?
* restoring previous
?/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/rgdal?
On Fri, Jul 3, 2020 at 5:45 AM Roger Bivand <Roger.Bivand at nhh.no>
On Thu, 2 Jul 2020, Thomas Adams wrote:
Roger,
Thank you so much; after downloading the *.tar.gz file, the that did
trick, using:
sudo R CMD INSTALL --configure-args=--with-proj_api="proj_api.h"
rgdal_1.5-13.tar.gz
Since you have GDAL: 3.0.0 and PROJ version: 6.1.0, you can drop
--configure-args=--with-proj_api="proj_api.h", which is only needed if
GDAL < 3 and PROJ >= 6. I'm uncertain how stable a system will be if
= 3 && PROJ >= 6 with this configure argument, as it is only a
work-around for systems with GDAL < 3 and PROJ >= 6, and onnly tested
that setting.
Thanks for reporting back!
Roger
Best regards!
Tom
On Thu, Jul 2, 2020 at 3:15 PM Roger Bivand <Roger.Bivand at nhh.no>
On Thu, 2 Jul 2020, Thomas Adams wrote:
Hi Bennet!
Thank you for your help, but I get the same error...
is in the 3.0.1 headers. I've modified the check so as not to try
Tom
On Thu, Jul 2, 2020 at 2:01 PM Bennet Fauber <bennet at umich.edu>
You might try this
install.packages("rgdal", "/sw/arcts/centos7/Rgeospatial/062020",
repos="http://R-Forge.R-project.org")
as there have been recent patches to rgdal that might help that
been incorporated there.
On Thu, Jul 2, 2020 at 1:47 PM Thomas Adams <tea3rd at gmail.com>
Hi all,
I have searched the internet and have spent a few days trying to
problem when I try to install rgdal into my Ubuntu 18.04 system.
done this many times previously, but cannot seem to track down
doing wrong now. I have tried a forced install from sources with
without dependencies. Below is what I get. Any help is
install.packages("rgdal")
?/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0?
(as ?lib? is unspecified)
trying URL '
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/local/lib/R
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
configure: CXX11 is: g++, CXX11STD is: -std=gnu++11
configure: CXX is: g++ -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/local/bin/gdal-config
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: /usr/local/share/gdal/stateplane.csv readable...
configure: pkg-config proj exists, will use it
configure: PROJ version: 6.1.0
configure: PROJ CPP flags: -DPROJ_H_API -I/usr/local/include
configure: PROJ LIBS: -L/usr/local/lib -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... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking proj.h usability... yes
checking proj.h presence... yes
checking for proj.h... yes
checking for proj_context_create in -lproj... yes
checking Using GDAL < 3 with PROJ >= 6... no
checking PROJ version >= 4.8.0... yes
checking PROJ: proj.db found and readable... yes
configure: Package CPP flags: -I/usr/local/include
-DPROJ_H_API
configure: Package LIBS: -L/usr/local/lib -lgdal
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c OGR_write.cpp -o
OGR_write.o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c gdal-bindings.cpp -o
gdal-bindings.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c init.c -o init.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c inverser.c -o inverser.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c local_stubs.c -o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogr_geom.cpp -o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogr_polygons.c -o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG
-I/usr/local/include -DPROJ_H_API
-I'/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/sp/include'
-I/usr/local/include -fpic -g -O2 -c ogr_proj.cpp -o
ogr_proj.cpp: In function ?SEXPREC* R_GDAL_OSR_PROJ()?:
ogr_proj.cpp:163:9: error: ?OSRGetPROJVersion? was not declared
scope
OSRGetPROJVersion(&pnMajor, &pnMinor, &pnPatch);
^~~~~~~~~~~~~~~~~
ogr_proj.cpp:163:9: note: suggested alternative: ?OSRProjVersion?
OSRGetPROJVersion(&pnMajor, &pnMinor, &pnPatch);
^~~~~~~~~~~~~~~~~
OSRProjVersion
/usr/local/lib/R/etc/Makeconf:176: recipe for target 'ogr_proj.o'
make: *** [ogr_proj.o] Error 1
ERROR: compilation failed for package ?rgdal?
* removing ?/home/teaiii/R/x86_64-pc-linux-gnu-library/4.0/rgdal?
The downloaded source packages are in
?/tmp/RtmpNkdFOf/downloaded_packages?
Warning message:
In install.packages("rgdal") :
installation of package ?rgdal? had non-zero exit status
--
Thomas E Adams, III
1724 Sage Lane
Blacksburg, VA 24060
tea3rd at gmail.com (personal)
tea at terrapredictions.org (work)
1 (513) 739-9512 (cell)
[[alternative HTML version deleted]]