Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383263 - media-sound/alsa-utils-1.0.24.2-r1: has automagic dependency on media-libs/libsamplerate
Summary: media-sound/alsa-utils-1.0.24.2-r1: has automagic dependency on media-libs/li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo ALSA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 20:06 UTC by Hans
Modified: 2012-02-03 12:31 UTC (History)
1 user (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 Hans 2011-09-16 20:06:40 UTC
The alsa-utils ebuild does not state any dependency on libsamplerate. If the latter is installed, then alsa-utils (rather, alsaloop, to be exact) links against it:

$ readelf -d /usr/bin/alsaloop 

Dynamic section at offset 0x108d0 contains 25 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libsamplerate.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libasound.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
[...]

Thus, if libsamplerate is uninstalled, the following error occurs:

$ alsaloop 
alsaloop: error while loading shared libraries: libsamplerate.so.0: cannot open shared object file: No such file or directory

If alsa-utils is being installed while libsamplerate is not present, alsaloop tells me the following:

$ alsaloop 
No libsamplerate support.

So it seems rather useless without it, actually.


I'd like the ability to hide this behind the "minimal" USE flag, but then, I don't know how maintainable this is.

Thanks.
Comment 1 Hans 2011-09-17 06:59:56 UTC
A small correction: alsaloop isn't useless without libsamplerate, just less capable.
Comment 2 Fab 2011-10-02 08:33:34 UTC
Confirming :

> checking for alsa/mixer.h... yes
> checking for alsa/rawmidi.h... yes
> checking for alsa/seq.h... yes
> checking for samplerate.h... yes

When reading the configure.in we can find :

> AC_CHECK_HEADERS([samplerate.h], [have_samplerate="yes"],
> [have_samplerate="no"], [#include <samplerate.h>])
>
> AM_CONDITIONAL(HAVE_SAMPLERATE, test "$have_samplerate" = "yes")

Thus the dependency is not optional, there's no way to disable it, please add it to the DEPEND list.
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2012-02-03 12:31:08 UTC
+*alsa-utils-1.0.25 (03 Feb 2012)
+
+  03 Feb 2012; Tony Vroon <chainsaw@gentoo.org> +alsa-utils-1.0.25.ebuild,
+  +files/alsa-utils-1.0.25-separate-usr-var-fs.patch:
+  Version bump. Add missed libsamplerate dependency, closes bug #383263 by
+  Hans. Patch by Martin van Gagern silences warnings when using a separate /usr
+  or /var partition, closes bug #384375. Upstream changes fix build breakage
+  when SED is set in the environment, closes bug #366587 by Nils Kneuper.
+  Automatic module loading & unloading is unsupported and may be removed soon.