strace links opputunistically against libselinux if present, which breaks binary packages for some reason my complation machine had libselinux installed, when I installed strace on other machines using emerge -b libselinux wasn't installed and strace could run becuase of the missing libselinux. it might be a good idea to add a selinux use flag to disable/enable explictely the --with-libselinux configure options (I was about to try that ) Reproducible: Always Steps to Reproduce: 1.install libselinux 2.compile strace 3.generaete binary package 4. install binary package (emerge -G strace) Actual Results: $ strace strace: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory Expected Results: $ strace strace: must have PROG [ARGS] or -p PID Try 'strace -h' for more information. on compilation host : # ldd `which strace` linux-vdso.so.1 (0x00007ffe1fbf6000) librt.so.1 => /lib64/librt.so.1 (0x00007f5fe6d77000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f5fe6d4b000) libc.so.6 => /lib64/libc.so.6 (0x00007f5fe6b86000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5fe6b66000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f5fe6aed000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f5fe6ae7000) /lib64/ld-linux-x86-64.so.2 (0x00007f5fe6fab000) on other host : # ldd `which strace ` linux-vdso.so.1 (0x00007f8f29b0a000) librt.so.1 => /lib64/librt.so.1 (0x00007f8f298d4000) libselinux.so.1 => not found libc.so.6 => /lib64/libc.so.6 (0x00007f8f2970f000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8f296ef000) /lib64/ld-linux-x86-64.so.2 (0x00007f8f29b0c000)
Created attachment 714291 [details, diff] patch to ebuild I wasn't sure about where to put the dependency though. I tested the build and it seems to work: with patched ebuild ldd `which strace` linux-vdso.so.1 (0x00007fff5a5bb000) librt.so.1 => /lib64/librt.so.1 (0x00007fb54255f000) libc.so.6 => /lib64/libc.so.6 (0x00007fb54239a000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb54237a000) /lib64/ld-linux-x86-64.so.2 (0x00007fb542793000)
Created attachment 735571 [details] patch still a problem with 5.13 the attached patch is what I used locally to correct it
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e9c66b7858eef397c69239cac8ea87b2af8c837 commit 5e9c66b7858eef397c69239cac8ea87b2af8c837 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-10-02 22:32:10 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-10-02 22:32:22 +0000 dev-util/strace: fix automagic dependency on libselinux Closes: https://bugs.gentoo.org/794745 Signed-off-by: Sam James <sam@gentoo.org> dev-util/strace/{strace-5.12.ebuild => strace-5.12-r1.ebuild} | 6 ++++-- dev-util/strace/{strace-5.14.ebuild => strace-5.14-r1.ebuild} | 4 +++- dev-util/strace/strace-9999.ebuild | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-)