Currently, libsox.so is always built with a dependency on libmagic.so if magic.h can be located by the configuration script. However, this should be toggled by a USE flag so that libsox.so can be built with/without the libmagic.so dependency depending on the user preferences. Example: USE="-magic" emerge media-sound/sox And then running: readelf -d /<path to sox>/libsox.so lists libmagic.so as a needed runtime dep: Tag Type Name/Value 0x0000000000000003 (PLTGOT) 0x79960 0x0000000000000002 (PLTRELSZ) 4992 (bytes) 0x0000000000000017 (JMPREL) 0x3668 0x0000000000000014 (PLTREL) RELA 0x0000000000000007 (RELA) 0x2f08 0x0000000000000008 (RELASZ) 1560 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x0000000000000024 (RELR) 0x3520 0x0000000000000023 (RELRSZ) 0x148 0x0000000000000025 (RELRENT) 0x8 0x000000006ffffff8 (RELRCOUNT) 0x4d0 0x0000000000000006 (SYMTAB) 0x228 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000005 (STRTAB) 0x1a40 0x000000000000000a (STRSZ) 3863 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x2958 0x0000000000000001 (NEEDED) Shared library: [libltdl.so.7] 0x0000000000000001 (NEEDED) Shared library: [libmagic.so.1] 0x0000000000000001 (NEEDED) Shared library: [libasound.so.2] 0x0000000000000001 (NEEDED) Shared library: [libgsm.so.1] 0x0000000000000001 (NEEDED) Shared library: [libvorbisenc.so.2] 0x0000000000000001 (NEEDED) Shared library: [libvorbisfile.so.3] 0x0000000000000001 (NEEDED) Shared library: [libvorbis.so.0] 0x0000000000000001 (NEEDED) Shared library: [libogg.so.0] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000e (SONAME) Library soname: [libsox.so.3] 0x000000000000000c (INIT) 0x49e8 0x000000000000000d (FINI) 0x5fb18 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW 0x000000006ffffff0 (VERSYM) 0x2c18 0x000000006ffffffc (VERDEF) 0x2e1c 0x000000006ffffffd (VERDEFNUM) 1 0x000000006ffffffe (VERNEED) 0x2e38 0x000000006fffffff (VERNEEDNUM) 3 0x0000000000000000 (NULL) 0x0
PR with potential fix: https://github.com/gentoo/gentoo/pull/10923
After applying patch: (named local portage repo localrepo) USE="-magic" emerge media-sound/sox::localrepo readelf -d /usr/lib64/libsox.so Dynamic section at offset 0x7ed90 contains 31 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libltdl.so.7] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libgsm.so.1] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libgomp.so.1] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000e (SONAME) Library soname: [libsox.so.3] ... And building with magic support: USE="magic" emerge media-sound/sox::localrepo readelf -d /usr/lib64/libsox.so Dynamic section at offset 0x7ed70 contains 32 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libltdl.so.7] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libmagic.so.1] 0x0000000000000001 (NEEDED) Shared library: [libgsm.so.1] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libgomp.so.1] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000e (SONAME) Library soname: [libsox.so.3]
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b88e86157c92fbd0ff4ad6e76a14f3e0aedab9b6 commit b88e86157c92fbd0ff4ad6e76a14f3e0aedab9b6 Author: Pacho Ramos <pacho@gentoo.org> AuthorDate: 2022-12-18 10:31:48 +0000 Commit: Pacho Ramos <pacho@gentoo.org> CommitDate: 2022-12-18 10:34:42 +0000 media-sound/sox: Don't use .la files, fix automagic dep Closes: https://bugs.gentoo.org/676658 Closes: https://bugs.gentoo.org/593776 Signed-off-by: Pacho Ramos <pacho@gentoo.org> media-sound/sox/sox-14.4.2_p20210509-r2.ebuild | 110 +++++++++++++++++++++++++ 1 file changed, 110 insertions(+)