[gdal-dev] CMAKE_INSTALL_PREFIX gdalinfo still looks for .dylib in /usr/lib

Even Rouault even.rouault at spatialys.com
Mon Jul 4 02:11:59 PDT 2022


Le 04/07/2022 à 07:32, Brad Hards a écrit :
> On Monday, 4 July 2022 3:19:55 PM AEST Nik Sands wrote:
>> Is it expected that these GDAL utilities (such as gdalinfo) would look for
>> GDAL in /usr/lib instead of the location in which it was actually built?
> No.
>
> I think your conceptual problem is expecting that the GDAL utilities are doing
> the looking. That isn't how it works. Instead, the system loader does the
> search based on what the utility says it needs.
>
> That is, a dynamically linked gdalinfo says the "what", not the "where".
>
> If you put your libraries somewhere non-standard, you need to tell the system
> where to get them from. Usually LD_LIBRARY_PATH environment variable or
> something like that will help.

That would rather be DYLD_LIBRARY_PATH on Mac

Building GDAL with "cmake -DGDAL_SET_INSTALL_RELATIVE_RPATH=ON" might 
also help. Cf 
https://gdal.org/build_hints.html#cmdoption-arg-GDAL_SET_INSTALL_RELATIVE_RPATH

> This isn't anything specific to GDAL.
>
> Brad
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220704/cf5dd7dd/attachment.htm>


More information about the gdal-dev mailing list