Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689204 - media-sound/qmmp[mad] mixes odd use of || ( ) in RDEPEND where depclean removal of one breaks qmmp
Summary: media-sound/qmmp[mad] mixes odd use of || ( ) in RDEPEND where depclean remov...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-03 17:44 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2020-09-29 18:27 UTC (History)
2 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 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-07-03 17:44:40 UTC
I recently performed a depclean, which removed libmad

>>> package: media-libs/libmad-0.15.1b-r9
 *  - /usr/lib64/libmad.so.0
 *  - /usr/lib64/libmad.so.0.2.1
 *      used by /usr/lib64/qmmp-1.3/Input/libmpeg.so (media-sound/qmmp-1.3.3)


	mad? ( || (
		media-libs/libmad
		media-sound/mpg123
	) )


This appears to have happened because I have mpg123 installed elsewhere, and portage thus decided that either case can be satisfied by mpg123, and thus, depcleaned libmad, even though it was actually still necessary.

readelf -d /usr/lib64/qmmp-1.3/Input/libmpeg.so 

Dynamic section at offset 0x36d10 contains 33 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libqmmp.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libtag.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libmad.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libmpg123.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Widgets.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Gui.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libQt5Core.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

This adds to confusion in that both mpg123 and mad are linked in...

If it wasn't for preserved-rebuild, qmmp would now be broken.

I synthetically made it happen with:

sudo mv /usr/lib64/libmad.so.0{,.disabled}

And afterwards, I was no longer able to play MP3s:

QmmpPluginCache: error: Cannot load library /usr/lib64/qmmp-1.3/Input/libmpeg.so: (libmad.so.0: cannot open shared object file: No such file or directory)
QmmpPluginCache: unknown plugin type: /usr/lib64/qmmp-1.3/Input/libmpeg.so

This *might* be classifiable as an inadequacy in portage itself, so if you're sure its that, make sure to ring portage team into this...



Portage 2.3.66 (python 3.7.3-final-0, default/linux/amd64/17.0, gcc-9.1.0, glibc-2.29-r2, 5.0.2-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.0.2-gentoo-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.6
KiB Mem:     8004716 total,    673056 free
KiB Swap:   20478972 total,  17759844 free
Timestamp of repository gentoo: Fri, 21 Jun 2019 13:00:01 +0000
Head commit of repository gentoo: 26e44933f80f8d0a9c1589e387fa4d7571d5dc7d
sh bash 5.0_p7
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.1 [disabled]
app-shells/bash:          5.0_p7::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/ccache:          3.7.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            6.4.0-r5::gentoo, 9.1.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage/
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: --delete-delay --fuzzy --temp-dir=/var/tmp/rsync/
    sync-rsync-verify-metamanifest: yes

~~~
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=native -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -mtune=native -march=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alert y --changed-deps y --changed-use --complete-graph=n --with-bdeps=n --deep --dynamic-deps n --keep-going y --newuse --verbose-conflicts --unordered-display --autounmask n --backtrack=0 --autounmask-write n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs cgroup clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned sandbox sfperms sign split-elog split-log splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ember./ http://distfiles.gentoo.org/ "
INSTALL_MASK="/usr/lib/debug/.build-id/"
LANG="en_NZ.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS=" -j3 --load-average=4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--delete-delay --fuzzy --temp-dir=/var/tmp/rsync/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
~~~
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

=================================================================
                        Package Settings
=================================================================

media-sound/qmmp-1.3.3::gentoo was built with the following:
USE="aac alsa analyzer bs2b cdda cover crossfade cue curl dbus enca ffmpeg flac game ladspa lyrics mad midi mms modplug musepack notifier opus projectm pulseaudio scrobbler sndfile stereo tray udisks vorbis wavpack -archive -gnome -jack -libav -mplayer -oss -qsui -qtmedia -shout -sid -soxr" ABI_X86="(64)"
Comment 1 Miroslav Šulc gentoo-dev 2020-09-29 17:54:53 UTC
can portage team please comment on this?
Comment 2 Zac Medico gentoo-dev 2020-09-29 18:06:10 UTC
This looks like a good use for a media-libs/libmad:= slot operator dependency, but slot operator dependencies are not allowed inside || ( ... ) according to PMS. Given the soname dependency, it seems appropriate to change the dependency to this:

mad? ( media-libs/libmad:= )
Comment 3 Miroslav Šulc gentoo-dev 2020-09-29 18:25:49 UTC
thank you for the insight. in the end i found out that libmpeg.so links against BOTH of the libraries so the || ( ) is not correct here which enables me to use := on both libraries and also solves the issue:

# lddtree /usr/lib64/qmmp-1.4/Input/libmpeg.so 
libmpeg.so => /usr/lib64/qmmp-1.4/Input/libmpeg.so (interpreter => none)
    libqmmp.so.1 => /usr/lib64/libqmmp.so.1
        libm.so.6 => /lib64/libm.so.6
            ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
    libtag.so.1 => /usr/lib64/libtag.so.1
        libz.so.1 => /lib64/libz.so.1
    libmad.so.0 => /usr/lib64/libmad.so.0
    libmpg123.so.0 => /usr/lib64/libmpg123.so.0
    libQt5Widgets.so.5 => /usr/lib64/libQt5Widgets.so.5
    libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5
        libpthread.so.0 => /lib64/libpthread.so.0
        libGL.so.1 => /usr/lib64/libGL.so.1
            libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0
                libdl.so.2 => /lib64/libdl.so.2
            libGLX.so.0 => /usr/lib64/libGLX.so.0
                libX11.so.6 => /usr/lib64/libX11.so.6
                    libxcb.so.1 => /usr/lib64/libxcb.so.1
                        libXau.so.6 => /usr/lib64/libXau.so.6
                        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6
                            libbsd.so.0 => /usr/lib64/libbsd.so.0
        libpng16.so.16 => /usr/lib64/libpng16.so.16
        libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0
            libfreetype.so.6 => /usr/lib64/libfreetype.so.6
                libbz2.so.1 => /lib64/libbz2.so.1
            libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3
            libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0
                libpcre.so.1 => /lib64/libpcre.so.1
    libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5
        libdouble-conversion.so.3 => /usr/lib64/libdouble-conversion.so.3
        libicui18n.so.67 => /usr/lib64/libicui18n.so.67
        libicuuc.so.67 => /usr/lib64/libicuuc.so.67
            libicudata.so.67 => /usr/lib64/libicudata.so.67
        libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0
    libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libstdc++.so.6
    libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libgcc_s.so.1
    libc.so.6 => /lib64/libc.so.6
Comment 4 Larry the Git Cow gentoo-dev 2020-09-29 18:27:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be9e5c6a60708de9513d1a235e8668de53d78df8

commit be9e5c6a60708de9513d1a235e8668de53d78df8
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-09-29 18:27:01 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-09-29 18:27:01 +0000

    media-sound/qmmp: fixed mad deps
    
    Closes: https://bugs.gentoo.org/689204
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 media-sound/qmmp/qmmp-1.4.1.ebuild | 8 ++++----
 media-sound/qmmp/qmmp-1.4.2.ebuild | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)