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.
> In file included from /usr/include/c++/7/list:63:0, > from > /home/ben/software/gdal/gdal-3.1.0/port/cpl_mem_cache.h:37, > from ogr_proj_p.h:34, > from ogrspatialreference.cpp:53: > /usr/include/c++/7/bits/stl_list.h:503:11: note: ‘std::__cxx11::list’ > class list : protected _List_base<_Tp, _Alloc> > ^~~~ > /usr/include/c++/7/bits/stl_list.h:503:11: note: ‘std::__cxx11::list’ > ogrspatialreference.cpp:10880:64: error: ‘type’ was not declared in this > scope > d->getPROJContext(), "ESRI", "NAD_1983_HARN_WISCRS_", &type, 1, > true, > ^~~~ > ogrspatialreference.cpp:10880:64: note: suggested alternative: ‘pipe’ > d->getPROJContext(), "ESRI", "NAD_1983_HARN_WISCRS_", &type, 1, > true, > ^~~~ > pipe > ogrspatialreference.cpp:10879:25: error: ‘proj_create_from_name’ was not > declared in this scope > PJ_OBJ_LIST* list = proj_create_from_name( > ^~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10879:25: note: suggested alternative: > ‘proj_create_argv’ > PJ_OBJ_LIST* list = proj_create_from_name( > ^~~~~~~~~~~~~~~~~~~~~ > proj_create_argv > ogrspatialreference.cpp:10884:31: error: ‘proj_list_get_count’ was not > declared in this scope > const auto listSize = proj_list_get_count(list); > ^~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10884:31: note: suggested alternative: > ‘proj_list_units’ > const auto listSize = proj_list_get_count(list); > ^~~~~~~~~~~~~~~~~~~ > proj_list_units > ogrspatialreference.cpp:10887:24: error: ‘proj_list_get’ was not declared > in this scope > auto crs = proj_list_get(d->getPROJContext(), list, i); > ^~~~~~~~~~~~~ > ogrspatialreference.cpp:10887:24: note: suggested alternative: > ‘proj_list_units’ > auto crs = proj_list_get(d->getPROJContext(), list, i); > ^~~~~~~~~~~~~ > proj_list_units > ogrspatialreference.cpp:10893:25: error: ‘proj_crs_get_coordoperation’ was > not declared in this scope > auto conv = proj_crs_get_coordoperation( > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10893:25: note: suggested alternative: > ‘proj_list_operations’ > auto conv = proj_crs_get_coordoperation( > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > proj_list_operations > ogrspatialreference.cpp:10901:13: error: > ‘proj_coordoperation_get_method_info’ was not declared in this scope > proj_coordoperation_get_method_info( > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10914:29: error: ‘proj_crs_get_coordinate_system’ > was not declared in this scope > auto coordSys = proj_crs_get_coordinate_system( > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10924:13: error: ‘proj_cs_get_axis_info’ was not > declared in this scope > proj_cs_get_axis_info( > ^~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10924:13: note: suggested alternative: > ‘proj_grid_info’ > proj_cs_get_axis_info( > ^~~~~~~~~~~~~~~~~~~~~ > proj_grid_info > ogrspatialreference.cpp:10938:27: error: > ‘proj_coordoperation_get_param_index’ was not declared in this scope > int idx_lat = proj_coordoperation_get_param_index( > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10942:13: error: ‘proj_coordoperation_get_param’ > was not declared in this scope > proj_coordoperation_get_param( > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10959:17: error: ‘proj_list_destroy’ was not > declared in this scope > proj_list_destroy(list); > ^~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10959:17: note: suggested alternative: > ‘proj_destroy’ > proj_list_destroy(list); > ^~~~~~~~~~~~~~~~~ > proj_destroy > ogrspatialreference.cpp:10967:9: error: ‘proj_list_destroy’ was not > declared in this scope > proj_list_destroy(list); > ^~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:10967:9: note: suggested alternative: > ‘proj_destroy’ > proj_list_destroy(list); > ^~~~~~~~~~~~~~~~~ > proj_destroy > ogrspatialreference.cpp: In member function ‘bool > OGRSpatialReference::GetAreaOfUse(double*, double*, double*, double*, const > char**) const’: > ogrspatialreference.cpp:11172:20: error: ‘proj_get_area_of_use’ was not > declared in this scope > int bSuccess = proj_get_area_of_use( > ^~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11172:20: note: suggested alternative: > ‘proj_errno_set’ > int bSuccess = proj_get_area_of_use( > ^~~~~~~~~~~~~~~~~~~~ > proj_errno_set > ogrspatialreference.cpp: In function ‘OSRCRSInfo** > OSRGetCRSInfoListFromDatabase(const char*, const OSRCRSListParameters*, > int*)’: > ogrspatialreference.cpp:11237:21: error: > ‘proj_get_crs_info_list_from_database’ was not declared in this scope > auto projList = > proj_get_crs_info_list_from_database(OSRGetProjTLSContext(), > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11237:21: note: suggested alternative: > ‘OSRGetCRSInfoListFromDatabase’ > auto projList = > proj_get_crs_info_list_from_database(OSRGetProjTLSContext(), > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > OSRGetCRSInfoListFromDatabase > ogrspatialreference.cpp:11260:18: error: ‘PJ_TYPE_GEOGRAPHIC_2D_CRS’ was > not declared in this scope > case PJ_TYPE_GEOGRAPHIC_2D_CRS: > ^~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11260:18: note: suggested alternative: > ‘OSR_CRS_TYPE_GEOGRAPHIC_2D’ > case PJ_TYPE_GEOGRAPHIC_2D_CRS: > ^~~~~~~~~~~~~~~~~~~~~~~~~ > OSR_CRS_TYPE_GEOGRAPHIC_2D > ogrspatialreference.cpp:11262:18: error: ‘PJ_TYPE_GEOGRAPHIC_3D_CRS’ was > not declared in this scope > case PJ_TYPE_GEOGRAPHIC_3D_CRS: > ^~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11262:18: note: suggested alternative: > ‘OSR_CRS_TYPE_GEOGRAPHIC_3D’ > case PJ_TYPE_GEOGRAPHIC_3D_CRS: > ^~~~~~~~~~~~~~~~~~~~~~~~~ > OSR_CRS_TYPE_GEOGRAPHIC_3D > ogrspatialreference.cpp:11264:18: error: ‘PJ_TYPE_GEOCENTRIC_CRS’ was not > declared in this scope > case PJ_TYPE_GEOCENTRIC_CRS: > ^~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11264:18: note: suggested alternative: > ‘OSR_CRS_TYPE_GEOCENTRIC’ > case PJ_TYPE_GEOCENTRIC_CRS: > ^~~~~~~~~~~~~~~~~~~~~~ > OSR_CRS_TYPE_GEOCENTRIC > ogrspatialreference.cpp:11266:18: error: ‘PJ_TYPE_PROJECTED_CRS’ was not > declared in this scope > case PJ_TYPE_PROJECTED_CRS: > ^~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11266:18: note: suggested alternative: > ‘OSR_CRS_TYPE_PROJECTED’ > case PJ_TYPE_PROJECTED_CRS: > ^~~~~~~~~~~~~~~~~~~~~ > OSR_CRS_TYPE_PROJECTED > ogrspatialreference.cpp:11268:18: error: ‘PJ_TYPE_VERTICAL_CRS’ was not > declared in this scope > case PJ_TYPE_VERTICAL_CRS: > ^~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11270:18: error: ‘PJ_TYPE_COMPOUND_CRS’ was not > declared in this scope > case PJ_TYPE_COMPOUND_CRS: > ^~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11287:5: error: ‘proj_crs_info_list_destroy’ was > not declared in this scope > proj_crs_info_list_destroy(projList); > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11287:5: note: suggested alternative: > ‘proj_context_destroy’ > proj_crs_info_list_destroy(projList); > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > proj_context_destroy > ogrspatialreference.cpp: In member function ‘void > OGRSpatialReference::UpdateCoordinateSystemFromGeogCRS()’: > ogrspatialreference.cpp:11332:12: error: ‘struct > OGRSpatialReference::Private’ has no member named ‘m_pjType’; did you mean > ‘m_pj_crs’? > if( d->m_pjType != PJ_TYPE_PROJECTED_CRS ) > ^~~~~~~~ > m_pj_crs > ogrspatialreference.cpp:11332:24: error: ‘PJ_TYPE_PROJECTED_CRS’ was not > declared in this scope > if( d->m_pjType != PJ_TYPE_PROJECTED_CRS ) > ^~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11332:24: note: suggested alternative: > ‘OSR_CRS_TYPE_PROJECTED’ > if( d->m_pjType != PJ_TYPE_PROJECTED_CRS ) > ^~~~~~~~~~~~~~~~~~~~~ > OSR_CRS_TYPE_PROJECTED > ogrspatialreference.cpp:11337:20: error: ‘proj_crs_get_geodetic_crs’ was > not declared in this scope > auto baseCRS = proj_crs_get_geodetic_crs(ctxt, d->m_pj_crs); > ^~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11337:20: note: suggested alternative: > ‘proj_create_crs_to_crs’ > auto baseCRS = proj_crs_get_geodetic_crs(ctxt, d->m_pj_crs); > ^~~~~~~~~~~~~~~~~~~~~~~~~ > proj_create_crs_to_crs > ogrspatialreference.cpp:11340:22: error: ‘proj_crs_get_coordinate_system’ > was not declared in this scope > auto baseCRSCS = proj_crs_get_coordinate_system(ctxt, baseCRS); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11346:9: error: ‘proj_cs_get_axis_count’ was not > declared in this scope > if( proj_cs_get_axis_count(ctxt, baseCRSCS) != 3 ) > ^~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11353:20: error: ‘proj_cs_get_axis_count’ was not > declared in this scope > if( !projCS || proj_cs_get_axis_count(ctxt, projCS) != 2 ) > ^~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11369:9: error: ‘proj_cs_get_axis_info’ was not > declared in this scope > proj_cs_get_axis_info(ctxt, > ^~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11369:9: note: suggested alternative: > ‘proj_grid_info’ > proj_cs_get_axis_info(ctxt, > ^~~~~~~~~~~~~~~~~~~~~ > proj_grid_info > ogrspatialreference.cpp:11386:36: error: ‘PJ_CS_TYPE_CARTESIAN’ was not > declared in this scope > auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis); > ^~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11386:36: note: suggested alternative: > ‘OSR_CRS_TYPE_VERTICAL’ > auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis); > ^~~~~~~~~~~~~~~~~~~~ > OSR_CRS_TYPE_VERTICAL > ogrspatialreference.cpp:11386:15: error: ‘proj_create_cs’ was not declared > in this scope > auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis); > ^~~~~~~~~~~~~~ > ogrspatialreference.cpp:11386:15: note: suggested alternative: > ‘proj_create’ > auto cs = proj_create_cs(ctxt, PJ_CS_TYPE_CARTESIAN, 3, axis); > ^~~~~~~~~~~~~~ > proj_create > ogrspatialreference.cpp:11399:23: error: ‘proj_crs_get_coordoperation’ was > not declared in this scope > auto conversion = proj_crs_get_coordoperation(ctxt, d->m_pj_crs); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11399:23: note: suggested alternative: > ‘proj_list_operations’ > auto conversion = proj_crs_get_coordoperation(ctxt, d->m_pj_crs); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > proj_list_operations > ogrspatialreference.cpp:11400:16: error: ‘proj_create_projected_crs’ was > not declared in this scope > auto crs = proj_create_projected_crs(ctxt, > ^~~~~~~~~~~~~~~~~~~~~~~~~ > ogrspatialreference.cpp:11400:16: note: suggested alternative: > ‘proj_create_crs_to_crs’ > auto crs = proj_create_projected_crs(ctxt, > ^~~~~~~~~~~~~~~~~~~~~~~~~ > proj_create_crs_to_crs > ogrspatialreference.cpp: At global scope: > ogrspatialreference.cpp:322:13: warning: ‘bool > isNorthEastAxisOrder(PJ_CONTEXT*, PJ*)’ defined but not used > [-Wunused-function] > static bool isNorthEastAxisOrder(PJ_CONTEXT* ctx, PJ* cs) > ^~~~~~~~~~~~~~~~~~~~ > ../GDALmake.opt:655: recipe for target 'ogrspatialreference.lo' failed > make[1]: *** [ogrspatialreference.lo] Error 1 > make[1]: Leaving directory '/home/ben/software/gdal/gdal-3.1.0/ogr' > GNUmakefile:91: recipe for target 'ogr-target' failed > make: *** [ogr-target] Error 2 > On Tue, May 26, 2020 at 5:05 PM Even Rouault <[email protected]> wrote: > 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 >
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
