<div dir="ltr">I undid the changes that I made to the makefiles and am now getting the following error:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">make[2]: Entering directory '/home/ben/software/gdal/gdal-3.1.0/frmts/grass'<br>/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<br>In file included from /usr/lib/grass74/include/grass/gprojects.h:21:0,<br>                 from grass57dataset.cpp:50:<br>/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'<br> #error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'<br>  ^~~~~<br>../../GDALmake.opt:649: recipe for target '../o/grass57dataset.lo' failed<br>make[2]: *** [../o/grass57dataset.lo] Error 1<br>make[2]: Leaving directory '/home/ben/software/gdal/gdal-3.1.0/frmts/grass'<br>GNUmakefile:15: recipe for target 'grass-install-obj' failed<br>make[1]: *** [grass-install-obj] Error 2<br>make[1]: Leaving directory '/home/ben/software/gdal/gdal-3.1.0/frmts'<br>GNUmakefile:105: recipe for target 'frmts-target' failed<br>make: *** [frmts-target] Error 2</font><br></blockquote><div>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? </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 26, 2020 at 4:32 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div style="font-family:monospace;font-size:9pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">> I'm compiling against PROJ6, if that explains any of these issues. I know</p>
<p style="margin:0px;text-indent:0px">> that I had to go into one of the makefiles in the source tree and add a</p>
<p style="margin:0px;text-indent:0px">> compiler flag to allow use of the deprecated API, (don't remember the flag</p>
<p style="margin:0px;text-indent:0px">> name), so maybe this is related to that?</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Quite certainly. Don't do this. It is likely that in your include path you have the proj.h file of PROJ 5, and proj_experimental.h includes that one instead of the proj.h that matches it. Some cleanup in your build environment seems necessary</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Even</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">-- </p>
<p style="margin:0px;text-indent:0px">Spatialys - Geospatial professional services</p>
<p style="margin:0px;text-indent:0px"><a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a></p></div></blockquote></div>