Installing net-misc/openvswitch on a host that has sys-libs/libunwind installed results in at least /usr/bin/ovsdb-tool linking against libunwind.so.8. # ldd /usr/bin/ovsdb-tool /lib/ld-musl-x86_64.so.1 (0x7f4d6592c000) libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x7f4d657ec000) libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x7f4d65400000) libcap-ng.so.0 => /usr/lib/libcap-ng.so.0 (0x7f4d657e4000) libunwind.so.8 => /usr/lib/libunwind.so.8 (0x7f4d657c4000) libc.so => /lib/ld-musl-x86_64.so.1 (0x7f4d6592c000) libgcc_s.so.1 => //usr/lib/gcc/x86_64-gentoo-linux-musl/12/libgcc_s.so.1 (0x7f4d657a4000) libz.so.1 => /lib/libz.so.1 (0x7f4d65784000) Installing a binpkg built on such host, on another host that doesn't have libunwind installed, results in a failure running emerge --config openvswitch: # emerge --config =net-misc/openvswitch-2.17.2-r1 Configuring pkg... * Creating new database '/var/lib/openvswitch/conf.db'... Error loading shared library libunwind.so.8: No such file or directory (needed by /usr/bin/ovsdb-tool) Error relocating /usr/bin/ovsdb-tool: _Ux86_64_getcontext: symbol not found Error relocating /usr/bin/ovsdb-tool: _ULx86_64_get_proc_name: symbol not found Error relocating /usr/bin/ovsdb-tool: _ULx86_64_get_reg: symbol not found Error relocating /usr/bin/ovsdb-tool: _ULx86_64_step: symbol not found Error relocating /usr/bin/ovsdb-tool: _ULx86_64_init_local: symbol not found * ERROR: net-misc/openvswitch-2.17.2-r1::gentoo failed (config phase): * creating database failed * * Call stack: * ebuild.sh, line 136: Called pkg_config * environment, line 3065: Called die * The specific snippet of code: * ovsdb-tool create "${db}" "${EROOT}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"; * * If you need support, post the output of `emerge --info '=net-misc/openvswitch-2.17.2-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-misc/openvswitch-2.17.2-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-misc/openvswitch-2.17.2-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-misc/openvswitch-2.17.2-r1/temp/environment'. * Working directory: '/var/tmp/portage/net-misc/openvswitch-2.17.2-r1/empty' * S: '/var/tmp/portage/net-misc/openvswitch-2.17.2-r1/work/openvswitch-2.17.2' Reproducible: Always
I can do a PR, but what is preferred? There is no configure option to disable libunwind, but I suspect ac_cv_lib_unwind_unw_backtrace can be used to disable it. So 2 options: add unconditional libunwind dependency - this is what upstream does in the RPM spec. Or add a libunwind USE flag and use ac_cv_lib_unwind_unw_backtrace to toggle?
Latter please, as libunwind isn't supported on all arches
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b20b5bab12d0085e0c1e92c34ab1a1c39c2b01ce commit b20b5bab12d0085e0c1e92c34ab1a1c39c2b01ce Author: Stijn Tintel <stijn@linux-ipv6.be> AuthorDate: 2023-02-02 00:17:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-02 04:49:56 +0000 net-misc/openvswitch: add USE=unwind Building net-misc/openvswitch on a host with sys-libs/libunwind installed results in several binaries being linked to libunwind.so. As net-misc/openvswitch lacks a dependency on sys-libs/libunwind, installing a binpkg created on such host will result in broken binaries. There is no configure option to disable libunwind, and upstream enables the dependency unconditionally in their RPM spec, but as we support architectures that do not support libunwind, this is not an option. Add a USE flag to toggle libunwind via the autoconf macro. Closes: https://bugs.gentoo.org/892389 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Closes: https://github.com/gentoo/gentoo/pull/29385 Signed-off-by: Sam James <sam@gentoo.org> .../{openvswitch-2.17.2-r1.ebuild => openvswitch-2.17.2-r2.ebuild} | 5 ++++- profiles/arch/alpha/package.use.mask | 5 +++++ profiles/arch/m68k/package.use.mask | 5 +++++ profiles/arch/sparc/package.use.mask | 5 +++++ 4 files changed, 19 insertions(+), 1 deletion(-)