[gdal-dev] Cannot Build GDAL 3.1.0 on Ubuntu 18.04

Even Rouault even.rouault at spatialys.com
Tue May 26 14:05:56 PDT 2020


On mardi 26 mai 2020 17:02:12 CEST Ben Van Riper wrote:
> I undid the changes that I made to the makefiles and am now getting the
> 
> following error:
> > make[2]: Entering directory
> > '/home/ben/software/gdal/gdal-3.1.0/frmts/grass'
> > /bin/bash /home/ben/software/gdal/gdal-3.1.0/libtool --mode=compile
> > --silent --tag=CXX g++ -I/home/ben/software/gdal/gdal-3.1.0/port
> > -I/home/ben/software/gdal/gdal-3.1.0/gcore
> > -I/home/ben/software/gdal/gdal-3.1.0/alg
> > -I/home/ben/software/gdal/gdal-3.1.0/ogr
> > -I/home/ben/software/gdal/gdal-3.1.0/ogr/ogrsf_frmts
> > -I/home/ben/software/gdal/gdal-3.1.0/gnm
> > -I/home/ben/software/gdal/gdal-3.1.0/apps -DHAVE_AVX_AT_COMPILE_TIME
> > -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall
> > -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security
> > -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time
> > -Wnull-dereference -Wduplicated-cond -Wfloat-conversion
> > -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual
> > -fno-operator-names -Wzero-as-null-pointer-constant -Wsuggest-override
> > -Wimplicit-fallthrough  -DGRASS_GISBASE=\"/usr/lib/grass74\"
> > -I/usr/lib/grass74/include -I/usr/local/include -DGNM_ENABLED -D_REENTRANT
> > 
> >  -I/home/ben/software/gdal/gdal-3.1.0/port -I/usr/include/openjpeg-2.3
> > 
> > -I/usr/include -I/usr/local/share/libgta -I/usr/local/share/libgta/include
> > -I/usr -I/usr/include  -DGDAL_COMPILATION -DHAVE_XERCES -I/usr/include
> > -I/usr/include/xercesc -D_REENTRANT
> > 
> >  -I/home/ben/software/gdal/gdal-3.1.0/port -I/usr/include/openjpeg-2.3
> > 
> > -I/usr/include -I/usr/local/share/libgta -I/usr/local/share/libgta/include
> > -I/usr -I/usr/include  -DGDAL_COMPILATION -c -o ../o/grass57dataset.lo
> > grass57dataset.cpp
> > In file included from /usr/lib/grass74/include/grass/gprojects.h:21:0,
> > 
> >                  from grass57dataset.cpp:50:
> > /usr/local/include/proj_api.h:37:2: error: #error 'To use the proj_api.h
> > you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
> > 
> >  #error 'To use the proj_api.h you must define the macro
> > 
> > ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
> > 
> >   ^~~~~
> > 
> > ../../GDALmake.opt:649: recipe for target '../o/grass57dataset.lo' failed
> > make[2]: *** [../o/grass57dataset.lo] Error 1
> > make[2]: Leaving directory
> > '/home/ben/software/gdal/gdal-3.1.0/frmts/grass'
> > GNUmakefile:15: recipe for target 'grass-install-obj' failed
> > make[1]: *** [grass-install-obj] Error 2
> > make[1]: Leaving directory '/home/ben/software/gdal/gdal-3.1.0/frmts'
> > GNUmakefile:105: recipe for target 'frmts-target' failed
> > make: *** [frmts-target] Error 2
> 
> When you say that my environment might be linking against the proj.h from
> PROJ5, I think that's possible, and if I'm not mistaken, I did have PROJ5
> installed (or was it 4?) when I compiled GDAL v2.4.0. I suppose I can
> uninstall the old version and try again, but does that explain the current
> error I'm having?

Ah that might be something different. It might be that grass 7.4 still tries to use the old 
proj_api.h. I'm not completely sure of the effect of building GDAL 3 with  
ACCEPT_USE_OF_DEPRECATED_PROJ_API_H defined. I'd say, either drop the GRASS driver if 
you don't need it, or upgrade to a more recent GRASS version that can use PROJ >= 5 API

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200526/7020ca35/attachment-0001.html>


More information about the gdal-dev mailing list