besser82/libxcrypt

Wrong SONAME for alpha

Opened this issue · 5 comments

A Debian porter noticed that alpha and ia64 use libcrypt.so.1.1 instead of libcrypt.so.1.
I am not even sure that it is possible for libcrypt to use a SONAME like this, so for the time being I am patching libtool in the build directory:

perl -i -pe '/^(library_names_spec|soname_spec)=/ and s/major/major.1/'

zackw commented

Good catch, thanks. Unfortunately I don't think libtool supports sonames like this at all. I've got an experimental branch in which we build with meson instead, and I'll see if that can do it. (However, is it a potential problem for porters and/or new architectures if we use meson instead of autotools? You'd know better than me/)

I have no experience at all with Meson, but since it is written in pure Python I suppose that it works on all Debian architectures.

From the perspective of bootstrapping new architectures from scratch there shouldn't be any problems as they need to be cross-compiled, which is perfectly supported by meson, on some existing system with a working Python3 to get a basic stage-1 image/tarball anyways.

Actually the soname is wrong only on alpha, ia64 is "standard".

I can confirm that glibc installs libcrypt.so.1.1 on alpha (and libc.so.6.1, presumably due to the same SONAME bump long ago):

$ qlist glibc | grep libcrypt.so.1
/lib/libcrypt.so.1.1
/usr/lib/libcrypt.so

while libxcrypt installs libcrypt.so.1:

$ qlist libxcrypt | grep libcrypt.so.1
/lib/libcrypt.so.1.1.0
/lib/libcrypt.so.1

On Gentoo, we rebuilt reverse dependencies of libcrypt when doing this transition, so it was not a problem for us. I believe this would have been a problem for a binary distribution that would necessitate a rebuild, since the SONAME in binaries is indeed libcrypt.so.1.1:

$ readelf -a /usr/sbin/sshd  |& grep libcrypt.so
 0x0000000000000001 (NEEDED)             Shared library: [libcrypt.so.1.1]
  000000: Version: 1  File: libcrypt.so.1.1  Cnt: 1

On ia64, glibc installs libcrypt.so.1 and libxcrypt does the same:

$ qlist glibc | grep libcrypt.so.1
/lib/libcrypt.so.1
$ qlist libxcrypt | grep libcrypt.so.1
/lib/libcrypt.so.1.1.0
/lib/libcrypt.so.1