proj 6.2.0 compatibility?

I’m trying to help out a fellow Fedora packager. I maintain FreeCAD for Fedora which uses vtk. One of it’s dependencies is of course proj which has been updated to 6.2.0.

While trying to build vtk 8.2.0 with proj 6.2.0 the following error occured:

[ 85%] Building CXX object Geovis/Core/CMakeFiles/vtkGeovisCore.dir/vtkGeoProjection.cxx.o
cd /builddir/build/BUILD/VTK-8.2.0/build/Geovis/Core && /usr/bin/c++ -DVTK_IN_VTK -DvtkGeovisCore_EXPORTS -I/builddir/build/BUILD/VTK-8.2.0/build/Geovis/Core -I/builddir/build/BUILD/VTK-8.2.0/Geovis/Core -I/builddir/build/BUILD/VTK-8.2.0/build/Common/Core -I/builddir/build/BUILD/VTK-8.2.0/Common/Core -I/builddir/build/BUILD/VTK-8.2.0/build/Utilities/KWIML -I/builddir/build/BUILD/VTK-8.2.0/Utilities/KWIML -I/builddir/build/BUILD/VTK-8.2.0/build/Utilities/KWSys -I/builddir/build/BUILD/VTK-8.2.0/Utilities/KWSys -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/utf8 -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/utf8 -I/builddir/build/BUILD/VTK-8.2.0/build/Common/DataModel -I/builddir/build/BUILD/VTK-8.2.0/Common/DataModel -I/builddir/build/BUILD/VTK-8.2.0/build/Common/Math -I/builddir/build/BUILD/VTK-8.2.0/Common/Math -I/builddir/build/BUILD/VTK-8.2.0/build/Common/Misc -I/builddir/build/BUILD/VTK-8.2.0/Common/Misc -I/builddir/build/BUILD/VTK-8.2.0/build/Common/System -I/builddir/build/BUILD/VTK-8.2.0/Common/System -I/builddir/build/BUILD/VTK-8.2.0/build/Common/Transforms -I/builddir/build/BUILD/VTK-8.2.0/Common/Transforms -I/builddir/build/BUILD/VTK-8.2.0/build/Common/ExecutionModel -I/builddir/build/BUILD/VTK-8.2.0/Common/ExecutionModel -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/Core -I/builddir/build/BUILD/VTK-8.2.0/Filters/Core -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/General -I/builddir/build/BUILD/VTK-8.2.0/Filters/General -I/builddir/build/BUILD/VTK-8.2.0/build/Common/ComputationalGeometry -I/builddir/build/BUILD/VTK-8.2.0/Common/ComputationalGeometry -I/builddir/build/BUILD/VTK-8.2.0/build/IO/Image -I/builddir/build/BUILD/VTK-8.2.0/IO/Image -I/builddir/build/BUILD/VTK-8.2.0/build/Utilities/DICOMParser -I/builddir/build/BUILD/VTK-8.2.0/Utilities/DICOMParser -I/builddir/build/BUILD/VTK-8.2.0/build/Utilities/MetaIO/vtkmetaio -I/builddir/build/BUILD/VTK-8.2.0/build/Utilities/MetaIO -I/builddir/build/BUILD/VTK-8.2.0/Utilities/MetaIO -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/zlib -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/zlib -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/jpeg -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/jpeg -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/png -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/png -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/tiff -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/tiff -I/builddir/build/BUILD/VTK-8.2.0/build/IO/XML -I/builddir/build/BUILD/VTK-8.2.0/IO/XML -I/builddir/build/BUILD/VTK-8.2.0/build/IO/Core -I/builddir/build/BUILD/VTK-8.2.0/IO/Core -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/doubleconversion -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/doubleconversion -I/usr/include/double-conversion -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/lz4 -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/lz4 -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/lzma -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/lzma -I/builddir/build/BUILD/VTK-8.2.0/build/IO/XMLParser -I/builddir/build/BUILD/VTK-8.2.0/IO/XMLParser -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/expat -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/expat -I/builddir/build/BUILD/VTK-8.2.0/build/Imaging/Core -I/builddir/build/BUILD/VTK-8.2.0/Imaging/Core -I/builddir/build/BUILD/VTK-8.2.0/build/Imaging/Sources -I/builddir/build/BUILD/VTK-8.2.0/Imaging/Sources -I/builddir/build/BUILD/VTK-8.2.0/build/Infovis/Core -I/builddir/build/BUILD/VTK-8.2.0/Infovis/Core -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/Extraction -I/builddir/build/BUILD/VTK-8.2.0/Filters/Extraction -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/Statistics -I/builddir/build/BUILD/VTK-8.2.0/Filters/Statistics -I/builddir/build/BUILD/VTK-8.2.0/build/Imaging/Fourier -I/builddir/build/BUILD/VTK-8.2.0/Imaging/Fourier -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/eigen -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/eigen -I/usr/include/eigen3 -I/builddir/build/BUILD/VTK-8.2.0/build/Infovis/Layout -I/builddir/build/BUILD/VTK-8.2.0/Infovis/Layout -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/Modeling -I/builddir/build/BUILD/VTK-8.2.0/Filters/Modeling -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/Sources -I/builddir/build/BUILD/VTK-8.2.0/Filters/Sources -I/builddir/build/BUILD/VTK-8.2.0/build/Imaging/Hybrid -I/builddir/build/BUILD/VTK-8.2.0/Imaging/Hybrid -I/builddir/build/BUILD/VTK-8.2.0/build/Interaction/Style -I/builddir/build/BUILD/VTK-8.2.0/Interaction/Style -I/builddir/build/BUILD/VTK-8.2.0/build/Rendering/Core -I/builddir/build/BUILD/VTK-8.2.0/Rendering/Core -I/builddir/build/BUILD/VTK-8.2.0/build/Common/Color -I/builddir/build/BUILD/VTK-8.2.0/Common/Color -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/Geometry -I/builddir/build/BUILD/VTK-8.2.0/Filters/Geometry -I/builddir/build/BUILD/VTK-8.2.0/build/Interaction/Widgets -I/builddir/build/BUILD/VTK-8.2.0/Interaction/Widgets -I/builddir/build/BUILD/VTK-8.2.0/build/Filters/Hybrid -I/builddir/build/BUILD/VTK-8.2.0/Filters/Hybrid -I/builddir/build/BUILD/VTK-8.2.0/build/Imaging/Color -I/builddir/build/BUILD/VTK-8.2.0/Imaging/Color -I/builddir/build/BUILD/VTK-8.2.0/build/Imaging/General -I/builddir/build/BUILD/VTK-8.2.0/Imaging/General -I/builddir/build/BUILD/VTK-8.2.0/build/Rendering/Annotation -I/builddir/build/BUILD/VTK-8.2.0/Rendering/Annotation -I/builddir/build/BUILD/VTK-8.2.0/build/Rendering/FreeType -I/builddir/build/BUILD/VTK-8.2.0/Rendering/FreeType -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/freetype -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/freetype -I/usr/include/freetype2 -I/builddir/build/BUILD/VTK-8.2.0/build/Rendering/Volume -I/builddir/build/BUILD/VTK-8.2.0/Rendering/Volume -I/builddir/build/BUILD/VTK-8.2.0/build/Views/Core -I/builddir/build/BUILD/VTK-8.2.0/Views/Core -I/builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/libproj -I/builddir/build/BUILD/VTK-8.2.0/ThirdParty/libproj -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_UNICODE -DHAVE_UINTPTR_T -g -fPIC -fvisibility=hidden -std=c++11 -o CMakeFiles/vtkGeovisCore.dir/vtkGeoProjection.cxx.o -c /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx
BUILDSTDERR: In file included from /builddir/build/BUILD/VTK-8.2.0/build/ThirdParty/libproj/vtk_libproj.h:22,
BUILDSTDERR: from /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:30:
BUILDSTDERR: /usr/include/proj_api.h:115:19: error: conflicting declaration ‘typedef void* projPJ’
BUILDSTDERR: 115 | typedef void *projPJ;
BUILDSTDERR: | ^~~~~~
BUILDSTDERR: In file included from /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:21:
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.h:37:13: note: previous declaration as ‘typedef PJ* projPJ’
BUILDSTDERR: 37 | typedef PJ* projPJ;
BUILDSTDERR: | ^~~~~~
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx: In static member function ‘static int vtkGeoProjection::GetNumberOfProjections()’:
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:83:17: error: ‘PJ_LIST’ does not name a type
BUILDSTDERR: 83 | for ( const PJ_LIST* pj = pj_get_list_ref(); pj && pj->id; ++ pj )
BUILDSTDERR: | ^~~~~~~
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:83:49: error: expected ‘;’ before ‘pj’
BUILDSTDERR: 83 | for ( const PJ_LIST* pj = pj_get_list_ref(); pj && pj->id; ++ pj )
BUILDSTDERR: | ^~~
BUILDSTDERR: | ;
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:83:50: error: ‘pj’ was not declared in this scope
BUILDSTDERR: 83 | for ( const PJ_LIST* pj = pj_get_list_ref(); pj && pj->id; ++ pj )
BUILDSTDERR: | ^~
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx: In static member function ‘static const char* vtkGeoProjection::GetProjectionName(int)’:
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:94:10: error: ‘pj_get_list_ref’ was not declared in this scope; did you mean ‘pj_get_errno_ref’?
BUILDSTDERR: 94 | return pj_get_list_ref()[projection].id;
BUILDSTDERR: | ^~~~~~~~~~~~~~~
BUILDSTDERR: | pj_get_errno_ref
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx: In static member function ‘static const char* vtkGeoProjection::GetProjectionDescription(int)’:
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:102:10: error: ‘pj_get_list_ref’ was not declared in this scope; did you mean ‘pj_get_errno_ref’?
BUILDSTDERR: 102 | return pj_get_list_ref()[projection].descr[0];
BUILDSTDERR: | ^~~~~~~~~~~~~~~
BUILDSTDERR: | pj_get_errno_ref
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx: In member function ‘int vtkGeoProjection::GetIndex()’:
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:147:15: error: ‘PJ_LIST’ does not name a type
BUILDSTDERR: 147 | for ( const PJ_LIST* proj = pj_get_list_ref(); proj && proj->id; ++ proj, ++ i )
BUILDSTDERR: | ^~~~~~~
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:147:49: error: expected ‘;’ before ‘proj’
BUILDSTDERR: 147 | for ( const PJ_LIST* proj = pj_get_list_ref(); proj && proj->id; ++ proj, ++ i )
BUILDSTDERR: | ^~~~~
BUILDSTDERR: | ;
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:147:50: error: ‘proj’ was not declared in this scope; did you mean ‘projUV’?
BUILDSTDERR: 147 | for ( const PJ_LIST* proj = pj_get_list_ref(); proj && proj->id; ++ proj, ++ i )
BUILDSTDERR: | ^~~~
BUILDSTDERR: | projUV
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx: In member function ‘const char* vtkGeoProjection::GetDescription()’:
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:164:26: error: invalid use of incomplete type ‘PJ’ {aka ‘struct PJconsts’}
BUILDSTDERR: 164 | return this->Projection->descr;
BUILDSTDERR: | ^~
BUILDSTDERR: In file included from /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.cxx:21:
BUILDSTDERR: /builddir/build/BUILD/VTK-8.2.0/Geovis/Core/vtkGeoProjection.h:35:8: note: forward declaration of ‘PJ’ {aka ‘struct PJconsts’}
BUILDSTDERR: 35 | struct PJconsts;
BUILDSTDERR: | ^~~~~~~~

The full and lengthy log can be found here:
https://kojipkgs.fedoraproject.org//work/tasks/2716/37552716/build.log

GCC 9.2.1…

Thanks,
Richard