www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC 0.14.0 shared library sonames

Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,

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-ld=
c.so -> libdruntime-ldc.so.65
-rwxr-xr-x 1 root root 1013180 Aug 20 09:09 build-shared/lib/libdruntime-ld=
lrwxrwxrwx 1 root root      25 Aug 20 09:09 build-shared/lib/libdruntime-ld=
c.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=
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 =3D> /root/ldc-0.14.0/build-shared/lib/libdruntime-l=
dc.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 :)
Aug 20 2014