Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524498 - media-plugins/alsaequal-0.6-r2 USE=abi_x86_32 tries to load libraries from /usr/lib
Summary: media-plugins/alsaequal-0.6-r2 USE=abi_x86_32 tries to load libraries from /u...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Professional Audio Applications Maintainers
URL:
Whiteboard: Pending removal: 2018-12-01
Keywords: PATCH, PMASKED, PullRequest
Depends on:
Blocks:
 
Reported: 2014-10-05 08:05 UTC by Stefan Reuter
Modified: 2018-12-01 18:18 UTC (History)
2 users (show)

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


Attachments
alsaequal-0.6-r2.ebuild (alsaequal-0.6-r2.ebuild,1.67 KB, text/plain)
2014-10-05 08:05 UTC, Stefan Reuter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Reuter 2014-10-05 08:05:20 UTC
Created attachment 386068 [details]
alsaequal-0.6-r2.ebuild

When trying to use a 32bit application like wine with WINEARCH="win32" i get the following error while trying to use sound in wine:
Failed to load plugin "/usr/lib/ladspa/caps.so": /usr/lib/ladspa/caps.so: wrong ELF class: ELFCLASS64

Reproducible: Always

Steps to Reproduce:
1. emerge media-plugins/alsaequal with abi_x86_32

2. make alsaequal the default plugin for alsa. see:
http://www.thedigitalmachine.net/alsaequal.html under the section USAGE

2. open winecfg with the variable WINEARCH="win32" (make sure that ~/.wine was deleted beforehand so that it creates a valid win32 prefix)

3. click on the "Audio" tab

4. winecfg will crash with the output:
Failed to load plugin "/usr/lib/ladspa/caps.so": /usr/lib/ladspa/caps.so: wrong ELF class: ELFCLASS64

Expected Results:
Showing the Audio tab

The problem seems to be hardcoded paths in pcm_equal.c and ctl_equal.c.
I made a workaraound with sed in the attached ebuild.

emerge --info

Portage 2.2.14_rc1 (python 2.7.8-final-0, default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.19-r1, 3.16.3-gentoo x86_64)
=================================================================
System uname: Linux-3.16.3-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.2
KiB Mem:     4039956 total,   1046872 free
KiB Swap:    4194300 total,   4184824 free
Timestamp of tree: Sun, 05 Oct 2014 03:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p52
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.1
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
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 abendbrot roslin steam-overlay mva kde qt x11 multimedia private
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -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/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=5 --keep-going=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://de-mirror.org/gentoo/ http://de-mirror.org/gentoo/ rsync://de-mirror.org/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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/abendbrot /var/lib/layman/roslin /var/lib/layman/steam /var/lib/layman/mva /var/lib/layman/kde /var/lib/layman/qt /var/lib/layman/x11 /var/lib/layman/multimedia /usr/local/portage/private"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3dnowprefetch X a52 aac aacplus aacs aalib abm acl acpi alsa amd64 amr amrenc aperfmperf apic autotrace berkdb bluetooth bluray branding bzip2 cairo cdda cdio cdr celt cjk clang clflush cli cmov cmp_legacy constant_tsc corefonts cpb cr8_legacy cracklib crypt cups curl cx16 cx8 cxx dbus de demosaic dpi dri dts dvd dvdnav dvdr ebook egl emboss emf encode epub exif extapic extd_apicid faac fam ffmpeg fftw firefox flac flash flite fontconfig fortran fpu fpx frei0r fxsr fxsr_opt gbm gdbm gif git glamor gles gles1 gles2 gme gnutls gpm graphviz gsm gtk gtkstyle hdri ht hw_pstate ibs iconv imagemagick infinality inotify ipv6 jbig jit jpeg jpeg2k kvm ladspa lahf_lm lame lbrv lcms ldap lensfun libass libguess libnotify libsamplerate libvisual lm lqr lua luajit lzma lzo mac mad mca mce minizip misalignsse mjpeg mms mmx mmxext mng mobi modplug modules monitor moodbar mp3 mp4 mpeg msr mtp mtrr multilib musepack musicbrainz natspec ncurses networkmanager nls nonstop_tsc nopl npt nptl nrip_save numa nx offensive ogg openal opencl openexr opengl openmax openmp openssl openvg opus osmesa osvw pae pam pango pat pausefilter pcre pdf pdpe1gb pge plotutils png pni policykit popcnt postproc postscript ppds pptx projectm pse pse36 qemu qt3support qt4 qt5 quicktime quvi r600-llvm-compiler rar raw rdtscp readline rep_good replaygain rtmp schroedinger sdl sep session skinit smp snappy sndfile speex spell spice sse sse2 sse4a ssh ssl startup-notification svg svm svm_lock syscall systemd taglib tcpd theora threads thumbnail tiff truetype tsc tta twolame udev udisks umfpack unicode upower usb vaapi vcd vdpau vme vorbis vpx wavpack wayland wdt webgl webp windeco wmf wxwidgets x264 x265 xa xcb xcomposite xinerama xml xpm xscreensaver xv xvid xvmc zlib zvbi" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="de de_DE en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="radeon" XFCE_PLUGINS="brightness clock trash" 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_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-05 08:13:29 UTC
Comment on attachment 386068 [details]
alsaequal-0.6-r2.ebuild

--- alsaequal-0.6-r2.ebuild
+++ alsaequal-0.6-r2.ebuild
@@ -29,12 +29,29 @@
        multilib_copy_sources
 }

+multilib_src_configure() {
+       sed -i ctl_equal.c \
+               -e "s:/usr/lib/:/usr/$(get_libdir)/:" \
+               || die
+       sed -i pcm_equal.c \
+               -e "s:/usr/lib/:/usr/$(get_libdir)/:" \
+               || die
+       if ! multilib_is_native_abi; then
+               sed -i ctl_equal.c \
+                       -e "s:\".alsaequal.bin\":\".alsaequal.bin$(get_libdir)\":" \
+                       || die
+               sed -i pcm_equal.c \
+                       -e "s:\".alsaequal.bin\":\".alsaequal.bin$(get_libdir)\":" \
+                       || die
+       fi
+}
+
 multilib_src_compile() {
        emake \
                CC="$(tc-getCC)" \
                CFLAGS="${CFLAGS} -Wall -fPIC -DPIC" \
                LD="$(tc-getCC)" \
-               LDFLAGS="${LDFLAGS} -shared" \
+               LDFLAGS="${LDFLAGS} -shared -L/usr/$(get_libdir)" \
                Q= \
                SND_PCM_LIBS="-lasound" \
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-12-01 18:18:20 UTC
Removal ongoing wrt bug #499298.