[gdal-dev] Fwd: Re: No SONAME in libgdal.so when building with --without-libtool

Even Rouault even.rouault at spatialys.com
Tue Aug 9 05:43:56 PDT 2016


Forwarding to the list.

----------  Message transmis  ----------

Sujet : Re: [gdal-dev] No SONAME in libgdal.so when building with --without-
libtool
Date : mardi 09 août 2016, 14:38:00
De : Gareth Francis <gfrancis.dev at gmail.com>
À : Even Rouault <even.rouault at spatialys.com>

Not having a SONAME entry doesn't directly cause any problems, however
libraries linked to libgdal.so can end up having a DT_NEEDED entry
containing the library path '../../build/lib64/libgdal.so' instead of just
'libgdal.so.20'. This happens when linking with GNU ld using CMake's
default behaviour. Linking without rpaths/etc probably avoids the issue.

Any executable which doesn't directly link to libgdal.so will then try to
look for '../../build/lib64/libgdal.so', regardless of the LD_LIBRARY_PATH
contents.

The only special case I can think of is Android, where the SONAME should
just be 'libgdal.so' without any version numbers.

I'll have to double-check what our version of libtool generated, I probably
just made a mistake.


On 9 August 2016 at 13:10, Even Rouault <even.rouault at spatialys.com> wrote:

> Gareth,
>
> What sort of issue do you encounter with SONAME not being defined ?
>
> I've tested your patch and it doesn't generate the same soname as libtool.
> libtool generates libgdal.so.20 deduced from the LIBGDAL_CURRENT /
> LIBGDAL_REVISION / LIBGDAL_AGE variables.
>
> Digging into history, it seems to be a voluntary choice not to define by
> default the soname in non-libtool builds, but I'm not sure why :
> https://trac.osgeo.org/gdal/changeset/4855
>
> Even
>
> > Encountered on Centos 6, x86_64
> >
> > configured with --without-libtool, resulting libgdal.so has no SONAME
> entry
> >
> > The link command for libgdal.so uses the variable 'GDAL_SLIB_SONAME'
> which
> > isn't defined in GDALmake.opt.in
> >
> > The attached patch fixes the issue, and I believe will generate the same
> > name as libtool.
> >
> > Thanks
> > Gareth Francis
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>



-- 
--------------------
Gareth Francis
www.gfrancisdev.co.uk

-------------------------------------------------------
-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list