Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 676658 - media-sound/sox will always compile with a dependency on libsox.so even if -magic is specified if magic.h is on the system.
Summary: media-sound/sox will always compile with a dependency on libsox.so even if -m...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-01-28 20:03 UTC by Brandon Mayer
Modified: 2019-02-16 06:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Mayer 2019-01-28 20:03:42 UTC
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
Comment 1 Brandon Mayer 2019-01-28 21:48:28 UTC
PR with potential fix: https://github.com/gentoo/gentoo/pull/10923
Comment 2 Brandon Mayer 2019-01-29 21:31:39 UTC
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]