Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536208 - >=media-sound/audacity-2.0.3 USE=libsoxr has no effect
Summary: >=media-sound/audacity-2.0.3 USE=libsoxr has no effect
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Richard Ash
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-10 13:40 UTC by Marc Joliet
Modified: 2015-10-30 15:22 UTC (History)
3 users (show)

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


Attachments
Patch to remove unnecessary option from configuration (simple-resampling.diff,393 bytes, patch)
2015-01-25 21:45 UTC, Richard Ash
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Joliet 2015-01-10 13:40:45 UTC
The libsoxr USE flag for audacity versions >=2.0.3 is ineffective.  The problem is that the ebuilds will *always* set either --with-libresample or --with-libsamplerate, depending on the "libsamplerate" USE flag:

	$(use_with libsamplerate) \
	$(use_with !libsamplerate libresample) \
	$(use_with libsoxr) \

However, the release notes (http://wiki.audacityteam.org/wiki/Release_Notes_2.0.3#Compiling, but the same holds for all versions up to and including 2.0.6) say:

    "Only one resampling library is permitted. If you enable either libresample or libsamplerate in configure, libsoxr will not be enabled. Any configure of resampling libraries other than libsoxr only will enable one only of libresample, libsamplerate or libsoxr in that order of precedence; however the intermediate configure output may suggest that other libraries will be favored."

So the way the ebuild sets the configure options, libsoxr will never be used.  As a user of audacity, I would expect libsoxr to be given precedence.

(Note: I noticed this problem after upgrading to audacity 2.0.5 from 2.0.2.)

Reproducible: Always

Steps to Reproduce:
1. emerge >=media-sound/audacity-2.0.3 with +libsoxr
2. run ldd /usr/bin/audacity | grep soxr
3. run ldd /usr/bin/audacity | grep sample
Actual Results:  
The output shows that audacity only links to libsamplerate. (If the libsamplerate USE flag is unset, then the output should show libresample instead, I think, but definitely not libsoxr.)

Expected Results:  
The output shows that audacity only links to libsoxr.

# emerge --info audacity

Portage 2.2.14 (python 3.3.5-final-0, default/linux/amd64/13.0/no-emul-linux-x86/desktop, gcc-4.8.3, glibc-2.19-r1, 3.17.8-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.17.8-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.2
KiB Mem:     4046044 total,    439156 free
KiB Swap:    4194300 total,   4193888 free
Timestamp of tree: Fri, 09 Jan 2015 21:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6-r1, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo science sunrise proaudio pd-overlay chemoelectric mjoliet
Installed sets: @audio, @audio-base, @desktop-apps, @desktop-base, @desktop-misc, @devel, @devel-audio, @devel-base, @devel-c_cpp, @devel-doc, @devel-python, @games, @latex, @local-marcec, @matlab, @science, @server, @sys-base, @sys-utils, @temp
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=y --nospinner --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://de-mirror.org/distro/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirror.muntinternet.net/pub/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-s -j3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/sunrise /var/lib/layman/pro-audio /var/lib/layman/pd-overlay /var/lib/layman/chemoelectric /usr/local/portage/marcec"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 avahi berkdb branding bzip2 cairo caps cdda cdinstall cdr cjk cli consolekit cracklib crypt css cups cxx dbus dga djvu dri dssi dts dvd dvdr emboss encode exif fbcon ffmpeg fftw firefox fish-completion flac fortran ftp fuse gdbm gif glamor gmp gnuplot gnutls gtk iconv idn imlib inotify ipv6 jack jackmidi jpeg jpeg2k kipi ladspa lapack lash latex lcms libnotify libsamplerate logrotate lzma mad mmx mmxext mng modplug modules mp3 mp4 mpeg multilib musepack musicbrainz ncurses nls nptl offensive ogg openexr opengl openmp opus osc pam pango pcre pdf plotutils png policykit ppds pulseaudio qt3support qt4 quicktime rar readline rtsp samba sasl session sid slang smp sndfile speex spell sse sse2 sse3 ssl startup-notification svg taglib tcpd theora threads tiff timidity truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vorbis vpx webkit wma x264 xattr xcb xcomposite xface xft xml xmp xpm xscreensaver xv xvid zeroconf zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ice1724 hda-intel usb-audio" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en en_GB de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

media-sound/audacity-2.0.5 was built with the following:
USE="alsa flac id3tag jack ladspa libsamplerate libsoxr midi mp3 soundtouch vamp vorbis (-ffmpeg) -sbsms -twolame" ABI_X86="64"
Comment 1 Marc Joliet 2015-01-10 13:44:08 UTC
Oh, and apparently the ebuilds are missing a build time dependency on CMake, which is also explicitly mentioned in the release notes.  So even if the configure options were set correctly by the ebuild, compilation would still fail if you don't already have CMake installed.
Comment 2 Marc Joliet 2015-01-10 20:43:10 UTC
(In reply to Marc Joliet from comment #1)
> Oh, and apparently the ebuilds are missing a build time dependency on CMake,
> which is also explicitly mentioned in the release notes.  So even if the
> configure options were set correctly by the ebuild, compilation would still
> fail if you don't already have CMake installed.

Ugh, sorry, of course that should only go for the *bundled* version of libsoxr.  However, the release notes make no mention of using an external/system version of libsoxr, so I can't help but wonder if that's even supported.
Comment 3 Richard Ash 2015-01-25 21:44:59 UTC
The issue with configure flags is correct (I wrote the autoconf code, I didn't write the ebuild).

I think the ebuild code is working round a point in the past where use-flags could not be defaulted on, and so we wanted to ensure something was enabled. Now that defaults can be specified (and libsoxr defaults on), this isn't a problem.

Libresample is depreciated and will disappear in future releases, so I don't want to add a USE flag for it now - it's never been a good choice. So we only need support libresample and libsoxr, which already have flags. One of them defaults on, so default builds have a resampler available (good).

So it should just be a case of removing the libresample line from the ebuild.
Comment 4 Richard Ash 2015-01-25 21:45:44 UTC
Created attachment 394872 [details, diff]
Patch to remove unnecessary option from configuration

Like this in fact. Test?
Comment 5 Marc Joliet 2015-01-26 22:12:10 UTC
(In reply to Richard Ash from comment #4)
> Created attachment 394872 [details, diff] [details, diff]
> Patch to remove unnecessary option from configuration
> 
> Like this in fact. Test?

That works (thanks!), but from my perspective as a user I think it would make sense to make the USE flags exclusive, e.g., by extending REQUIRED_USE like so:

    REQUIRED_USE="soundtouch? ( midi )
        ^^ ( libsoxr libsamplerate )"

or, more simply, by also removing the libsamplerate USE flag, in which case you would control the resampling library solely through the "libsoxr" USE flag.  My reasoning is that the configure options are exclusive (enabling both enables only libsoxr support), and hence that depending on libsamplerate when using libsoxr (and vice versa) makes no sense.
Comment 6 Alexis Ballier gentoo-dev 2015-10-30 15:22:34 UTC
fixed by yourself, thx!