[gdal-dev] Building GDAL 3.0.0 with Proj 6.0.0

joshl josh at cesium.com
Wed May 15 13:27:29 PDT 2019


Hello,

I'm having trouble getting gdal to build with proj on linux. They are both
brought in as git submodules in a git repo and get built via cmake.

To get proj 6.0.0 to build, I had to add a small modification to its
CMakeLists.txt where it uses both the src and include folders for the
include_directories command (did not have include folder originally):
/include_directories(${PROJ4_SOURCE_DIR}/src ${PROJ4_SOURCE_DIR}/include)/

If I don't do this it will error with the following since proj/common.hpp is
in the include folder:
<proj path>/src/proj_internal.h:61:27: fatal error: proj/common.hpp: No such
file or directory

For gdal, an error occurs during the configure step. If I manually run our
configure command (or a stripped down version just using just  -with-proj)
in the gdal dir, it will fail trying to find symbols for proj:
checking for PROJ >= 6 library... checking for proj_create_from_wkt in
-lproj... no
checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... no
checking for internal_proj_create_from_wkt in -linternalproj... (cached) no
configure: error: PROJ 6 symbols not found

A similar failure is seen on this stack exchange post here:
https://gis.stackexchange.com/questions/317109/build-gdal-with-proj-version-6

The most common solution I found googling around seems to be using
--with-static-proj4 but that is no longer recognized as a configure script
option in gdal 3. I checked out the commit hash for gdal 2.4.1 and tried to
use --with-static-proj4 but I got the same error. 

A team member had suggested that maybe proj wasn't built with all the
necessary features for gdal so it can't find those require symbols...

Not sure what the right move is from here so any suggestions are
appreciated.

-Josh



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list