[gdal-dev] Trouble building GDAL 3.12.3 on Linux
Carl Godkin
cgodkin at gmail.com
Mon Apr 6 09:12:12 PDT 2026
Hi Andrew,
Thanks for the reply. The actual command is always hidden by cmake. (I
am obviously not a cmake expert!) Is there a way to get it to reveal more?
But this is what I see after typing "make" following the "cmake" command I
posted earlier:
[ 95%] Linking CXX executable test_ogrsf
/net/raid1/home/local64-rhel8/gcc132-rhel8/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
../libgdal.so.38.3.12.3: undefined reference to
`proj_coordinate_metadata_create'
/net/raid1/home/local64-rhel8/gcc132-rhel8/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
../libgdal.so.38.3.12.3: undefined reference to
`proj_crs_has_point_motion_operation'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/CMakeFiles/test_ogrsf.dir/build.make:98:
apps/test_ogrsf] Error 1
make[1]: *** [CMakeFiles/Makefile2:8644:
apps/CMakeFiles/test_ogrsf.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
The "link.txt" file from this build is this
(i.e., linux64_build/apps/CMakeFiles/test_ogrsf.dir)
/usr/local/gcc132/bin/g++ -fvisibility=hidden -O3 -DNDEBUG
CMakeFiles/test_ogrsf.dir/test_ogrsf.cpp.o -o test_ogrsf
-Wl,-rpath,/home/carl/build/gdal-3.12.3/linux64_build
../libgdal.so.38.3.12.3
Thanks,
carl
On Mon, Apr 6, 2026 at 8:47 AM Andrew Bell <andrew.bell.ia at gmail.com> wrote:
> Hi Carl,
>
> The actual build command from the failing step might be helpful.
>
> On Mon, Apr 6, 2026 at 11:33 AM Carl Godkin via gdal-dev
> <gdal-dev at lists.osgeo.org> wrote:
> >
> > Hi,
> >
> > I'm updating our GDAL and other third party libraries. I'm usually
> pretty adept at this but I am having a problem building GDAL 3.12.3 on
> Linux RHEL8 with GCC 13.2.
> >
> > The shared library builds okay, but once we get to the apps, I am
> getting undefined references to two PROJ functions
> (proj_coordinate_metadata_create & proj_crs_has_point_motion_operation).
> >
> > I was struggling with this last Friday with PROJ 9.8.0 but, after this
> weekend's advice about ETRS89, I switched to PROJ 9.7.1 where I'm having
> the same problem.
> >
> > I haven't seen any similar questions go by and I am stuck. Any advice?
> >
> > My GDAL 3.12.3 cmake command looks like this:
> >
> > cmake \
> > -DCMAKE_BUILD_TYPE=Release \
> > -DCMAKE_C_COMPILER:FILEPATH=/usr/local/gcc132/bin/gcc \
> > -DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/gcc132/bin/g++ \
> > -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
> > -DCMAKE_INSTALL_PREFIX=/usr/local/devlibs/gdal-3.12.3 \
> > -DBUILD_JAVA_BINDINGS:BOOL=OFF \
> > -DSQLite3_INCLUDE_DIR=/usr/local/devlibs/sqlite-3.51.3/include \
> > -DSQLite3_LIBRARY=/usr/local/devlibs/sqlite-3.51.3/lib/libsqlite3.so \
> > -DARCHIVE_INCLUDE_DIR=/usr/local/devlibs/libarchive-3.8.6/include \
> >
> -DARCHIVE_LIBRARY=/usr/local/devlibs/libarchive-3.8.6/lib64/libarchive.so \
> > -DCURL_INCLUDE_DIR=/usr/local/devlibs/curl-8.4.0/include \
> > -DCURL_LIBRARY_RELEASE=/usr/local/devlibs/curl-8.4.0/lib64/libcurl.so
> \
> > -DPROJ_INCLUDE_DIR=/usr/local/devlibs/proj-9.7.1/include \
> > -DPROJ_LIBRARY_RELEASE=/usr/local/devlibs/proj-9.7.1/lib64/libproj.so
> \
> > -DGDAL_USE_GEOTIFF_INTERNAL:BOOL=ON \
> > -DGDAL_USE_WEBP_INTERNAL:BOOL=ON \
> >
> -DMRSID_INCLUDE_DIR=/usr/local/devlibs/MrSID_DSDK-9.5.4.4709-rhel6.x86-64.gcc531/Raster_DSDK/include
> \
> >
> -DMRSID_LIBRARY=/usr/local/devlibs/MrSID_DSDK-9.5.4.4709-rhel6.x86-64.gcc531/Raster_DSDK/lib/libltidsdk.so
> \
> > -DGDAL_ENABLE_DRIVER_JP2MRSID=ON \
> > ..
> >
> > and my PROJ 9.7.0 is pretty basic, and looks like this:
> >
> > cmake \
> > -DCMAKE_BUILD_TYPE=Release \
> > -Wno-dev -Wno-deprecated \
> > -DCMAKE_C_COMPILER:FILEPATH=/usr/local/gcc132/bin/gcc \
> > -DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/gcc132/bin/g++ \
> > -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
> > -DCMAKE_INSTALL_PREFIX=/usr/local/devlibs/proj-9.7.1 \
> > ..
> >
> > Thank you very much,
> >
> > carl
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> --
> Andrew Bell
> andrew.bell.ia at gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20260406/d1e29430/attachment-0001.htm>
More information about the gdal-dev
mailing list