[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#968525: lintian: breakout-link reported for /usr/lib/$(DEB_HOST_MULTIARCH) -> /lib/$(DEB_HOST_MULTIARCH) symlinks



Hi Daniel,

On Thu, Sep 16, 2021 at 9:39 AM Daniel Kahn Gillmor <dkg@debian.org> wrote:
>
>
> The fact that silencing this warning in the expected way ended up
> injecting a grave bug seems problematic.

Isn't that an issue with the library paths in libgpg-error?

On sid, libgpg-error0_1.42-3_amd64.deb installs the shared library into /lib:

/lib/x86_64-linux-gnu/libgpg-error.so.0
/lib/x86_64-linux-gnu/libgpg-error.so.0.32.0

But the corresponding -dev installs the 'breakout-link' and the static
library into /usr/lib

/usr/lib/x86_64-linux-gnu/libgpg-error.so
/usr/lib/x86_64-linux-gnu/libgpg-error.a

I usually see all four files in the same directory. For my own
libwolfssl-dev—which is arguably much less used, if at all—the files
are all in /usr/lib:

/usr/lib/x86_64-linux-gnu/libwolfssl.a (from libwolfssl-dev)
/usr/lib/x86_64-linux-gnu/libwolfssl.so (from libwolfssl-dev)
/usr/lib/x86_64-linux-gnu/libwolfssl.so.24 (from libwolfssl24)
/usr/lib/x86_64-linux-gnu/libwolfssl.so.24.3.0 (from libwolfssl24)

Perhaps more significant, the Pkgconfig file for your libpg-error-dev
points consuming packages to /usr, but the shared libraries are
shipped in /lib:

$ more usr/lib/x86_64-linux-gnu/pkgconfig/gpg-error.pc
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu
host=x86_64-pc-linux-gnu
mtcflags=
mtlibs=-pthread

Name: gpg-error
Description: GPG Runtime
Version: 1.42
Cflags:
Libs: -L${prefix}/lib/x86_64-linux-gnu -lgpg-error
Libs.private:
URL: https://www.gnupg.org/software/libgpg-error/index.html

When the link is dropped in an attempt to cure the Lintian tag [1]
Simon Josephson's build attempt of shishi [2] resorts to the static
version, which results—quite logically—in this relocation error:

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libgpg-error.a    <---
(libgpg_error_la-init.o): relocation R_X86_64_PC32 against symbol
`stderr@@GLIBC_2.2.5' can not be used when making a shared object;
recompile with -fPIC

What happens, please, if you ship the libraries in /usr/lib instead?
Alternatively, you could also ship the following link in /lib, move
the static library to /lib, and adjust the prefix in your Pkgconfig.

    dh_link -plibgpg-error-dev
lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so.0
lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so

I am not familiar with all the intricacies of RPATH and related ld.so
features, but I am reading up on this blog page [3].

Kind regards
Felix Lechner

[1] https://salsa.debian.org/debian/libgpg-error/-/commit/7c408ba0968c14492b6f087c57c6d44af4878de6#8756c63497c8dc39f7773438edf53b220c773f67_34_33
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992573#5
[3] http://blog.tremily.us/posts/rpath/


Reply to: