Summary: | net-libs/glib-networking-2.76.1: can't find libpxbackend-1.0.so while in EPREFIX | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Maciej Barć <xgqt> |
Component: | Current packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | chewi, esteve.varela, nbowler |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=933387 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build_log
meson-log.txt emerge_--info_glib-networking.txt |
Description
Maciej Barć
2023-09-02 10:42:06 UTC
Created attachment 869215 [details]
build_log
May need meson-log.txt too please if you can. Also emerge --info. Created attachment 869216 [details]
meson-log.txt
Created attachment 869217 [details]
emerge_--info_glib-networking.txt
Seems upstream libproxy changed the location of libpxbackend-1.0.so at some point in the version history. Making a symlink works in the meantime : cd usr/lib64/ ln -s libproxy/libpxbackend-1.0.so . So it is either a bug in libproxy or meson. The problem is that when the GNU linker pulls in RUNPATH from a shared library, it prepends the sysroot before looking for transitive dependencies there. In the case of prefix, this is probably a bug in the linker. This can be easily seen by running ld with the --verbose option to see where it is looking for libraries: % echo $EPREFIX /SCRATCH/gentoo % gcc -Wl,--verbose test.c -lproxy [...] attempt to open /SCRATCH/gentoo/SCRATCH/gentoo/usr/lib64/libproxy/libpxbackend-1.0.so failed [...] In a typical --sysroot usage for the cross compilation scenario, this is correct behaviour, but it does not work on prefix. This affects any shared library which has transitive dependencies that are not located in the default library search path. As a workaround, you can create a symbolic link so the redundant prefix is harmless: % ln -s /SCRATCH /SCRATCH/gentoo/SCRATCH Or this could also be worked around in libproxy, by avoiding the use of an absolute DT_RUNPATH the linker will not prepend sysroot and look in the right place: % patchelf --set-rpath '$ORIGIN/libproxy' /SCRATCH/gentoo/usr/lib64/libproxy.so This could also be worked around in the libproxy-1.0.pc file, if it included -L/SCRATCH/gentoo/usr/lib64/libproxy amongst the library flags then the linker would find the dependency. I have reproduced this and will look into it, but as a workaround, you can probably use any linker other than bfd. I recommend mold. Reproduced it, and the patchelf solution worked rather well. |