[gdal-dev] Trouble building GDAL 3.12.3 on Linux
Andrew Bell
andrew.bell.ia at gmail.com
Mon Apr 6 10:50:49 PDT 2026
Hi,
You need to make sure that the reference to the proj library that's in
libgdal can be found at link time for the test_ogrsf executable. You
can do this by setting LD_LIBRARY_PATH environment variable to the
directory containing the relevant proj library. You could also edit
the link line to include a reference to that directory (see the
-rpath-link option). I would think that an RPATH entry would be
created in the GDAL library when it's built, which would take care of
this, but I'm not sure why this wouldn't be happening without a bunch
of investigation.
This might be helpful:
https://www.kaizou.org/2015/01/linux-libraries.html
On Mon, Apr 6, 2026 at 12:42 PM Carl Godkin via gdal-dev
<gdal-dev at lists.osgeo.org> wrote:
>
> Thanks to Seabastiaan's advice, I've rerun the cmake command and now the "make" gives this for the failing step:
>
> [ 95%] Linking CXX executable test_ogrsf
> cd /home/carl/build/gdal-3.12.3/linux64_build/apps && /usr/bin/cmake -E cmake_link_script CMakeFiles/test_ogrsf.dir/link.txt --verbose=1
> /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
> /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:101: apps/test_ogrsf] Error 1
> make[2]: Leaving directory '/home/carl/build/gdal-3.12.3/linux64_build'
> make[1]: *** [CMakeFiles/Makefile2:8647: apps/CMakeFiles/test_ogrsf.dir/all] Error 2
> make[1]: Leaving directory '/home/carl/build/gdal-3.12.3/linux64_build'
> make: *** [Makefile:149: all] Error 2
>
> Does that help? Thanks a lot,
>
> carl
>
>
> On Mon, Apr 6, 2026 at 9:28 AM Sebastiaan Couwenberg <sebastic at xs4all.nl> wrote:
>>
>> On 4/6/26 6:12 PM, Carl Godkin via gdal-dev wrote:
>> > 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?
>>
>> -DCMAKE_VERBOSE_MAKEFILE=ON
>>
>> https://cmake.org/cmake/help/latest/variable/CMAKE_VERBOSE_MAKEFILE.html
>>
>> Kind Regards,
>>
>> Bas
>>
>> --
>> PGP Key ID: 4096R/6750F10AE88D4AF1
>> Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
>
> _______________________________________________
> 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
More information about the gdal-dev
mailing list