<div dir="ltr">Upgrading to GRASS 7.8 fixed that problem, and consequentially revealed another one. I'm going to trim some of the output because there's a lot of it.<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In file included from /usr/include/c++/7/list:63:0,<br> from /home/ben/software/gdal/gdal-3.1.0/port/cpl_mem_cache.h:37,<br> from ogr_proj_p.h:34,<br> from ogrspatialreference.cpp:53:<br>/usr/include/c++/7/bits/stl_list.h:503:11: note: ‘std::__cxx11::list’<br> class list : protected _List_base<_Tp, _Alloc><br> ^~~~<br>/usr/include/c++/7/bits/stl_list.h:503:11: note: ‘std::__cxx11::list’<br>ogrspatialreference.cpp:10880:64: error: ‘type’ was not declared in this scope<br> d->getPROJContext(), "ESRI", "NAD_1983_HARN_WISCRS_", &type, 1, true,<br> ^~~~<br>ogrspatialreference.cpp:10880:64: note: suggested alternative: ‘pipe’<br> d->getPROJContext(), "ESRI", "NAD_1983_HARN_WISCRS_", &type, 1, true,<br> ^~~~<br> pipe<br>ogrspatialreference.cpp:10879:25: error: ‘proj_create_from_name’ was not declared in this scope<br> PJ_OBJ_LIST* list = proj_create_from_name(<br> ^~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10879:25: note: suggested alternative: ‘proj_create_argv’<br> PJ_OBJ_LIST* list = proj_create_from_name(<br> ^~~~~~~~~~~~~~~~~~~~~<br> proj_create_argv<br>ogrspatialreference.cpp:10884:31: error: ‘proj_list_get_count’ was not declared in this scope<br> const auto listSize = proj_list_get_count(list);<br> ^~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10884:31: note: suggested alternative: ‘proj_list_units’<br> const auto listSize = proj_list_get_count(list);<br> ^~~~~~~~~~~~~~~~~~~<br> proj_list_units<br>ogrspatialreference.cpp:10887:24: error: ‘proj_list_get’ was not declared in this scope<br> auto crs = proj_list_get(d->getPROJContext(), list, i);<br> ^~~~~~~~~~~~~<br>ogrspatialreference.cpp:10887:24: note: suggested alternative: ‘proj_list_units’<br> auto crs = proj_list_get(d->getPROJContext(), list, i);<br> ^~~~~~~~~~~~~<br> proj_list_units<br>ogrspatialreference.cpp:10893:25: error: ‘proj_crs_get_coordoperation’ was not declared in this scope<br> auto conv = proj_crs_get_coordoperation(<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10893:25: note: suggested alternative: ‘proj_list_operations’<br> auto conv = proj_crs_get_coordoperation(<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~<br> proj_list_operations<br>ogrspatialreference.cpp:10901:13: error: ‘proj_coordoperation_get_method_info’ was not declared in this scope<br> proj_coordoperation_get_method_info(<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10914:29: error: ‘proj_crs_get_coordinate_system’ was not declared in this scope<br> auto coordSys = proj_crs_get_coordinate_system(<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10924:13: error: ‘proj_cs_get_axis_info’ was not declared in this scope<br> proj_cs_get_axis_info(<br> ^~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10924:13: note: suggested alternative: ‘proj_grid_info’<br> proj_cs_get_axis_info(<br> ^~~~~~~~~~~~~~~~~~~~~<br> proj_grid_info<br>ogrspatialreference.cpp:10938:27: error: ‘proj_coordoperation_get_param_index’ was not declared in this scope<br> int idx_lat = proj_coordoperation_get_param_index(<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10942:13: error: ‘proj_coordoperation_get_param’ was not declared in this scope<br> proj_coordoperation_get_param(<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10959:17: error: ‘proj_list_destroy’ was not declared in this scope<br> proj_list_destroy(list);<br> ^~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10959:17: note: suggested alternative: ‘proj_destroy’<br> proj_list_destroy(list);<br> ^~~~~~~~~~~~~~~~~<br> proj_destroy<br>ogrspatialreference.cpp:10967:9: error: ‘proj_list_destroy’ was not declared in this scope<br> proj_list_destroy(list);<br> ^~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:10967:9: note: suggested alternative: ‘proj_destroy’<br> proj_list_destroy(list);<br> ^~~~~~~~~~~~~~~~~<br> proj_destroy<br>ogrspatialreference.cpp: In member function ‘bool OGRSpatialReference::GetAreaOfUse(double*, double*, double*, double*, const char**) const’:<br>ogrspatialreference.cpp:11172:20: error: ‘proj_get_area_of_use’ was not declared in this scope<br> int bSuccess = proj_get_area_of_use(<br> ^~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11172:20: note: suggested alternative: ‘proj_errno_set’<br> int bSuccess = proj_get_area_of_use(<br> ^~~~~~~~~~~~~~~~~~~~<br> proj_errno_set<br>ogrspatialreference.cpp: In function ‘OSRCRSInfo** OSRGetCRSInfoListFromDatabase(const char*, const OSRCRSListParameters*, int*)’:<br>ogrspatialreference.cpp:11237:21: error: ‘proj_get_crs_info_list_from_database’ was not declared in this scope<br> auto projList = proj_get_crs_info_list_from_database(OSRGetProjTLSContext(),<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11237:21: note: suggested alternative: ‘OSRGetCRSInfoListFromDatabase’<br> auto projList = proj_get_crs_info_list_from_database(OSRGetProjTLSContext(),<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br> OSRGetCRSInfoListFromDatabase<br>ogrspatialreference.cpp:11260:18: error: ‘PJ_TYPE_GEOGRAPHIC_2D_CRS’ was not declared in this scope<br> case PJ_TYPE_GEOGRAPHIC_2D_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11260:18: note: suggested alternative: ‘OSR_CRS_TYPE_GEOGRAPHIC_2D’<br> case PJ_TYPE_GEOGRAPHIC_2D_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br> OSR_CRS_TYPE_GEOGRAPHIC_2D<br>ogrspatialreference.cpp:11262:18: error: ‘PJ_TYPE_GEOGRAPHIC_3D_CRS’ was not declared in this scope<br> case PJ_TYPE_GEOGRAPHIC_3D_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11262:18: note: suggested alternative: ‘OSR_CRS_TYPE_GEOGRAPHIC_3D’<br> case PJ_TYPE_GEOGRAPHIC_3D_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br> OSR_CRS_TYPE_GEOGRAPHIC_3D<br>ogrspatialreference.cpp:11264:18: error: ‘PJ_TYPE_GEOCENTRIC_CRS’ was not declared in this scope<br> case PJ_TYPE_GEOCENTRIC_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11264:18: note: suggested alternative: ‘OSR_CRS_TYPE_GEOCENTRIC’<br> case PJ_TYPE_GEOCENTRIC_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~~<br> OSR_CRS_TYPE_GEOCENTRIC<br>ogrspatialreference.cpp:11266:18: error: ‘PJ_TYPE_PROJECTED_CRS’ was not declared in this scope<br> case PJ_TYPE_PROJECTED_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11266:18: note: suggested alternative: ‘OSR_CRS_TYPE_PROJECTED’<br> case PJ_TYPE_PROJECTED_CRS:<br> ^~~~~~~~~~~~~~~~~~~~~<br> OSR_CRS_TYPE_PROJECTED<br>ogrspatialreference.cpp:11268:18: error: ‘PJ_TYPE_VERTICAL_CRS’ was not declared in this scope<br> case PJ_TYPE_VERTICAL_CRS:<br> ^~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11270:18: error: ‘PJ_TYPE_COMPOUND_CRS’ was not declared in this scope<br> case PJ_TYPE_COMPOUND_CRS:<br> ^~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11287:5: error: ‘proj_crs_info_list_destroy’ was not declared in this scope<br> proj_crs_info_list_destroy(projList);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11287:5: note: suggested alternative: ‘proj_context_destroy’<br> proj_crs_info_list_destroy(projList);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~<br> proj_context_destroy<br>ogrspatialreference.cpp: In member function ‘void OGRSpatialReference::UpdateCoordinateSystemFromGeogCRS()’:<br>ogrspatialreference.cpp:11332:12: error: ‘struct OGRSpatialReference::Private’ has no member named ‘m_pjType’; did you mean ‘m_pj_crs’?<br> if( d->m_pjType != PJ_TYPE_PROJECTED_CRS )<br> ^~~~~~~~<br> m_pj_crs<br>ogrspatialreference.cpp:11332:24: error: ‘PJ_TYPE_PROJECTED_CRS’ was not declared in this scope<br> if( d->m_pjType != PJ_TYPE_PROJECTED_CRS )<br> ^~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11332:24: note: suggested alternative: ‘OSR_CRS_TYPE_PROJECTED’<br> if( d->m_pjType != PJ_TYPE_PROJECTED_CRS )<br> ^~~~~~~~~~~~~~~~~~~~~<br> OSR_CRS_TYPE_PROJECTED<br>ogrspatialreference.cpp:11337:20: error: ‘proj_crs_get_geodetic_crs’ was not declared in this scope<br> auto baseCRS = proj_crs_get_geodetic_crs(ctxt, d->m_pj_crs);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11337:20: note: suggested alternative: ‘proj_create_crs_to_crs’<br> auto baseCRS = proj_crs_get_geodetic_crs(ctxt, d->m_pj_crs);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br> proj_create_crs_to_crs<br>ogrspatialreference.cpp:11340:22: error: ‘proj_crs_get_coordinate_system’ was not declared in this scope<br> auto baseCRSCS = proj_crs_get_coordinate_system(ctxt, baseCRS);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11346:9: error: ‘proj_cs_get_axis_count’ was not declared in this scope<br> if( proj_cs_get_axis_count(ctxt, baseCRSCS) != 3 )<br> ^~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11353:20: error: ‘proj_cs_get_axis_count’ was not declared in this scope<br> if( !projCS || proj_cs_get_axis_count(ctxt, projCS) != 2 )<br> ^~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11369:9: error: ‘proj_cs_get_axis_info’ was not declared in this scope<br> proj_cs_get_axis_info(ctxt,<br> ^~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11369:9: note: suggested alternative: ‘proj_grid_info’<br> proj_cs_get_axis_info(ctxt,<br> ^~~~~~~~~~~~~~~~~~~~~<br> proj_grid_info<br>ogrspatialreference.cpp:11386:36: error: ‘PJ_CS_TYPE_CARTESIAN’ was not declared in this scope<br> auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis);<br> ^~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11386:36: note: suggested alternative: ‘OSR_CRS_TYPE_VERTICAL’<br> auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis);<br> ^~~~~~~~~~~~~~~~~~~~<br> OSR_CRS_TYPE_VERTICAL<br>ogrspatialreference.cpp:11386:15: error: ‘proj_create_cs’ was not declared in this scope<br> auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis);<br> ^~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11386:15: note: suggested alternative: ‘proj_create’<br> auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis);<br> ^~~~~~~~~~~~~~<br> proj_create<br>ogrspatialreference.cpp:11399:23: error: ‘proj_crs_get_coordoperation’ was not declared in this scope<br> auto conversion = proj_crs_get_coordoperation(ctxt, d->m_pj_crs);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11399:23: note: suggested alternative: ‘proj_list_operations’<br> auto conversion = proj_crs_get_coordoperation(ctxt, d->m_pj_crs);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~<br> proj_list_operations<br>ogrspatialreference.cpp:11400:16: error: ‘proj_create_projected_crs’ was not declared in this scope<br> auto crs = proj_create_projected_crs(ctxt,<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br>ogrspatialreference.cpp:11400:16: note: suggested alternative: ‘proj_create_crs_to_crs’<br> auto crs = proj_create_projected_crs(ctxt,<br> ^~~~~~~~~~~~~~~~~~~~~~~~~<br> proj_create_crs_to_crs<br>ogrspatialreference.cpp: At global scope:<br>ogrspatialreference.cpp:322:13: warning: ‘bool isNorthEastAxisOrder(PJ_CONTEXT*, PJ*)’ defined but not used [-Wunused-function]<br> static bool isNorthEastAxisOrder(PJ_CONTEXT* ctx, PJ* cs)<br> ^~~~~~~~~~~~~~~~~~~~<br>../GDALmake.opt:655: recipe for target 'ogrspatialreference.lo' failed<br>make[1]: *** [ogrspatialreference.lo] Error 1<br>make[1]: Leaving directory '/home/ben/software/gdal/gdal-3.1.0/ogr'<br>GNUmakefile:91: recipe for target 'ogr-target' failed<br>make: *** [ogr-target] Error 2<br></blockquote></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 26, 2020 at 5:05 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">On mardi 26 mai 2020 17:02:12 CEST Ben Van Riper wrote:</p>
<p style="margin:0px;text-indent:0px">> I undid the changes that I made to the makefiles and am now getting the</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> following error:</p>
<p style="margin:0px;text-indent:0px">> > make[2]: Entering directory</p>
<p style="margin:0px;text-indent:0px">> > '/home/ben/software/gdal/gdal-3.1.0/frmts/grass'</p>
<p style="margin:0px;text-indent:0px">> > /bin/bash /home/ben/software/gdal/gdal-3.1.0/libtool --mode=compile</p>
<p style="margin:0px;text-indent:0px">> > --silent --tag=CXX g++ -I/home/ben/software/gdal/gdal-3.1.0/port</p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/gcore</p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/alg</p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/ogr</p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/ogr/ogrsf_frmts</p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/gnm</p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/apps -DHAVE_AVX_AT_COMPILE_TIME</p>
<p style="margin:0px;text-indent:0px">> > -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall</p>
<p style="margin:0px;text-indent:0px">> > -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security</p>
<p style="margin:0px;text-indent:0px">> > -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time</p>
<p style="margin:0px;text-indent:0px">> > -Wnull-dereference -Wduplicated-cond -Wfloat-conversion</p>
<p style="margin:0px;text-indent:0px">> > -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual</p>
<p style="margin:0px;text-indent:0px">> > -fno-operator-names -Wzero-as-null-pointer-constant -Wsuggest-override</p>
<p style="margin:0px;text-indent:0px">> > -Wimplicit-fallthrough -DGRASS_GISBASE=\"/usr/lib/grass74\"</p>
<p style="margin:0px;text-indent:0px">> > -I/usr/lib/grass74/include -I/usr/local/include -DGNM_ENABLED -D_REENTRANT</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/port -I/usr/include/openjpeg-2.3</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > -I/usr/include -I/usr/local/share/libgta -I/usr/local/share/libgta/include</p>
<p style="margin:0px;text-indent:0px">> > -I/usr -I/usr/include -DGDAL_COMPILATION -DHAVE_XERCES -I/usr/include</p>
<p style="margin:0px;text-indent:0px">> > -I/usr/include/xercesc -D_REENTRANT</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > -I/home/ben/software/gdal/gdal-3.1.0/port -I/usr/include/openjpeg-2.3</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > -I/usr/include -I/usr/local/share/libgta -I/usr/local/share/libgta/include</p>
<p style="margin:0px;text-indent:0px">> > -I/usr -I/usr/include -DGDAL_COMPILATION -c -o ../o/grass57dataset.lo</p>
<p style="margin:0px;text-indent:0px">> > grass57dataset.cpp</p>
<p style="margin:0px;text-indent:0px">> > In file included from /usr/lib/grass74/include/grass/gprojects.h:21:0,</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > from grass57dataset.cpp:50:</p>
<p style="margin:0px;text-indent:0px">> > /usr/local/include/proj_api.h:37:2: error: #error 'To use the proj_api.h</p>
<p style="margin:0px;text-indent:0px">> > you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > #error 'To use the proj_api.h you must define the macro</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > ^~~~~</p>
<p style="margin:0px;text-indent:0px">> > </p>
<p style="margin:0px;text-indent:0px">> > ../../GDALmake.opt:649: recipe for target '../o/grass57dataset.lo' failed</p>
<p style="margin:0px;text-indent:0px">> > make[2]: *** [../o/grass57dataset.lo] Error 1</p>
<p style="margin:0px;text-indent:0px">> > make[2]: Leaving directory</p>
<p style="margin:0px;text-indent:0px">> > '/home/ben/software/gdal/gdal-3.1.0/frmts/grass'</p>
<p style="margin:0px;text-indent:0px">> > GNUmakefile:15: recipe for target 'grass-install-obj' failed</p>
<p style="margin:0px;text-indent:0px">> > make[1]: *** [grass-install-obj] Error 2</p>
<p style="margin:0px;text-indent:0px">> > make[1]: Leaving directory '/home/ben/software/gdal/gdal-3.1.0/frmts'</p>
<p style="margin:0px;text-indent:0px">> > GNUmakefile:105: recipe for target 'frmts-target' failed</p>
<p style="margin:0px;text-indent:0px">> > make: *** [frmts-target] Error 2</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> When you say that my environment might be linking against the proj.h from</p>
<p style="margin:0px;text-indent:0px">> PROJ5, I think that's possible, and if I'm not mistaken, I did have PROJ5</p>
<p style="margin:0px;text-indent:0px">> installed (or was it 4?) when I compiled GDAL v2.4.0. I suppose I can</p>
<p style="margin:0px;text-indent:0px">> uninstall the old version and try again, but does that explain the current</p>
<p style="margin:0px;text-indent:0px">> error I'm having?</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">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</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>