[Proj] [gdal-dev] gdalinfo error and subsequent segfault with proj-5.0.x

Even Rouault even.rouault at spatialys.com
Sun Apr 15 15:07:43 EST 2018

> OK, I recompiled gdal-2.2.4 --with-static-proj4 and got
> ldd libgdal.so | grep proj
>     libproj.so.13 => /usr/local/lib64/libproj.so.13 (0x00007fe2ff181000)
>     libproj.so.12 => /lib64/libproj.so.12 (0x00007fe2f31c7000)
> ???
> gdalinfo now runs fine and produces expected results.
> I'm still concerned about the output of ldd libgdal.so

Yes that's not sane. That means that GDAL links to a library that links to the 
system libproj (/lib64/libproj.so.12), whereas GDAL directly links to your 
custom libproj 5 build ( /usr/local/lib64/libproj.so.13) . That may crash as 
As proj 5.0.1 is (I believe) ABI compatible with previous releases, one 
potential hack is to make
sudo ln -s /usr/local/lib64/libproj.so.13 /usr/local/lib64/libproj.so.12
and define LD_LIBRARY_PATH to point to /usr/local/lib64/
A cleaner solution would be to identify the GDAL dependenci(es) that link to  
/lib64/libproj.so.12 and rebuild them against the one in  /usr/local/lib64/

Spatialys - Geospatial professional services

More information about the Proj mailing list