LDC 0.14.0 shared library sonames
Konstantinos Margaritis via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Wed Aug 20 02:42:01 PDT 2014
I'm preparing the Debian packages for ldc 0.14 and I've run into a
peculiar issue that I don't think I can decide on my own.
I've modifed the packaging to produce both static and shared libs of
phobos2 and provide them in separate packages -with a small change
needed in the tarball (patch attached). However, when building the
shared libs although the soname is of the type
build-shared/lib/libphobos2-ldc.so.2.0.65, and symlinks .so
and .so.65 are provided the libs themselves are linked with the .so.65
one. Let me explain:
# ls -l build-shared/lib/lib*-ldc.so*
lrwxrwxrwx 1 root root 21 Aug 20 09:09 build-shared/lib/libdruntime-ldc.so -> libdruntime-ldc.so.65
-rwxr-xr-x 1 root root 1013180 Aug 20 09:09 build-shared/lib/libdruntime-ldc.so.2.0.65
lrwxrwxrwx 1 root root 25 Aug 20 09:09 build-shared/lib/libdruntime-ldc.so.65 -> libdruntime-ldc.so.2.0.65
lrwxrwxrwx 1 root root 20 Aug 20 09:11 build-shared/lib/libphobos2-ldc.so -> libphobos2-ldc.so.65
-rwxr-xr-x 1 root root 5822596 Aug 20 09:11 build-shared/lib/libphobos2-ldc.so.2.0.65
lrwxrwxrwx 1 root root 24 Aug 20 09:11 build-shared/lib/libphobos2-ldc.so.65 -> libphobos2-ldc.so.2.0.65
# ldd build-shared/lib/libphobos2-ldc.so.2.0.65 |grep ldc.so
libdruntime-ldc.so.65 => /root/ldc-0.14.0/build-shared/lib/libdruntime-ldc.so.65 (0x00007ffe6e585000)
So, which one is the "proper" soversion to be used? 2.0.65 or .65?
Nitpicking I know, but I can only include one in the libs package and
the symlinks to the -dev package or lintian complains.
Something more important, zlib appears to be embedded inside the shared
libs, which ended in the Debian archive bots rejecting my original packages
as there has to be a good reason to embed zlib inside a shared lib.
To be honest I think this one was a mistake so I provided a simple fix
in the patch attached -it only embeds zlib in the static libs,
and I guess even that might be removed.
I'm almost ready with the packages, I just need those to fix and I'll
upload them to the archive.
Again thumbs up for the good work!
PS. My simple yet non exhaustive tests showed that shared libs work fine
and result in massive size reductions over the static binaries :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the digitalmars-d-ldc