Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486328 - media-sound/pulseaudio - padsp hardcodes LD_PRELOAD to lib64 - will not work for 32 bit programs
Summary: media-sound/pulseaudio - padsp hardcodes LD_PRELOAD to lib64 - will not work ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-28 13:57 UTC by Marc Joliet
Modified: 2018-07-27 11:50 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 Marc Joliet 2013-09-28 13:57:12 UTC
padsp on amd64 (maybe others, too?) hardcodes the path to libpulsedsp.so to /usr/lib64/pulseaudio/libpulsedsp.so. This is problematic for 32 bit applications, for which the LD_PRELOAD obviously fails. This can be fixed by substituting "\$LIB" for lib64 (which ld.so will expand correctly [0]).

The only related upstream bug I found so far is https://bugzilla.redhat.com/show_bug.cgi?id=476865, however from the discussion I gather that at the time (2008) padsp used "LD_PRELOAD=libpulsedsp.so" (which won't work because /usr/\$LIB/pulseaudio is apparently not in the search path), so I didn't put it in $URL.

Note that this can of course be worked around by setting LD_PRELOAD manually.

[0] I could not find this mentioned in ld.so(8), I found out about this via the discussion at https://sourceware.org/ml/libc-alpha/2011-08/msg00095.html (which interestingly contains a patch to extend the man page to document \$LIB, amongst others). Google also found me this related discussion: http://www.spinics.net/lists/linux-man/msg02358.html.

Reproducible: Always

Steps to Reproduce:
1. run padsp with a 32 bit application as its argument
2.
3.
Actual Results:  
padsp will give the following error: "ERROR: ld.so: object '/usr/lib64/pulseaudio/libpulsedsp.so' from LD_PRELOAD cannot be preloaded: ignored."

Expected Results:  
LD_PRELOAD (and hence padsp) succeeds

% emerge --info pulseaudio
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.10.7-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.2
KiB Mem:     4047292 total,    144540 free
KiB Swap:    4194300 total,   4164812 free
Timestamp of tree: Fri, 27 Sep 2013 20:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo science sunrise overnight ladi proaudio pd-overlay mjoliet
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"
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="en_US.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="/usr/local/portage/layman/science /usr/local/portage/layman/sunrise /usr/local/portage/layman/overnight /usr/local/portage/layman/ladi /usr/local/portage/layman/pro-audio /usr/local/portage/layman/pd-overlay /usr/local/portage/marcec"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl alsa amd64 avahi berkdb branding bzip2 cairo caps cdinstall cjk cli consolekit cracklib crypt css cups cxx dbus dga djvu dri dssi dts dvd encode exif fbcon ffmpeg fftw flac fortran ftp fuse gdbm gif gmp gnuplot gnutls gtk iconv idn imlib inotify ipv6 jack jackmidi jpeg jpeg2k kipi ladspa lapack lash latex lcms libnotify libsamplerate logrotate lzma mad mjpeg mmx mmxext mng modplug modules mp3 mp4 mpeg mudflap multilib musepack musicbrainz ncurses nfs nls nptl ntp offensive ogg openexr opengl openmp opus osc pam pango pcre pdf plotutils png policykit pulseaudio qt4 quicktime rar readline rtsp samba sasl session sid slang smp sndfile speex spell sse sse2 sse3 ssl startup-notification svg sysfs taglib tcpd theora threads tiff timidity truetype unicode 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 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_2" 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/pulseaudio-2.1-r1 was built with the following:
USE="X alsa asyncns avahi caps dbus gdbm glib gtk ipv6 jack libsamplerate orc realtime ssl tcpd udev webrtc-aec -bluetooth -doc -equalizer -gnome -lirc (-oss) (-system-wide) -systemd -test -xen"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed"
Comment 1 Pacho Ramos gentoo-dev 2014-02-16 21:25:02 UTC
Still valid with 4.99.4? If still valid looks like an upstream problem to me that should be reported to bugzilla.freedesktop.org and, once it's done, you could paste the link here for letting us to track the issue
Comment 2 Marc Joliet 2014-03-09 20:02:36 UTC
(In reply to Pacho Ramos from comment #1)
> Still valid with 4.99.4? If still valid looks like an upstream problem to me
> that should be reported to bugzilla.freedesktop.org and, once it's done, you
> could paste the link here for letting us to track the issue

Sorry for the belated reply, I just upgraded to PA 5.0 and the library path is still hard-coded in padsp.  I'll report upstream when I get the chance, however it is pretty much a non-issue for me now.
Comment 3 Marc Joliet 2017-09-23 13:13:31 UTC
Welp, I never got around to reporting this upstream, but I noticed that they did fix it in 11.0.  See the heading "Support for 32-bit applications on 64-bit systems in padsp" at https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/11.0/.  Would it make sense for the fix to be enabled in Gentoo?
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-09-27 07:14:54 UTC
Not sure what your suggest, we have 11.1 in tree is there anything else we need to do ?
Comment 5 Mart Raudsepp gentoo-dev 2017-09-27 07:31:08 UTC
Yes, https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/11.0/#notesforpackagers talks what we need to do (pass an extra configure argument on glibc systems only), but maybe you already did that.
Comment 6 Mart Raudsepp gentoo-dev 2017-11-01 12:58:29 UTC
re-opening for actually getting this fixed at some point. Currently will stabilize 11.1 without pushing and including this fix (I don't feel comfortable to immediately stabilize it). Hopefully we get to including a fix in a revbump though based on this reopened report soon.
Comment 7 Mart Raudsepp gentoo-dev 2018-07-27 10:05:16 UTC
After applying ebuild changes for glibc, I'm now getting this from LD_DEBUG=libs when using padsp with a 32bit binary:

calling init: /usr/lib32/pulseaudio/libpulsedsp.so
/usr/lib32/pulseaudio/libpulsedsp.so: error: symbol lookup error: undefined symbol: __padsp_disabled__ (fatal)


and lib64 when using a 64bit binary.


So I guess it works now, that __padsp_disabled__ symbol lookup error looks normal (PA daemon actually has code to trigger things based on that symbol being present or not, and if present, containing a bitmask about padsp or something).

I have not tested with any actual program that uses OSS and actually needs padsp to function, not 64bit nor 32bit. Please test and confirm after the 12.2 version is available in your tree with the configure changes. There will be an automatic comment added by a bot once the bump is available in git, will need a bit more time to finalize other fixes and push.
Comment 8 Larry the Git Cow gentoo-dev 2018-07-27 11:50:24 UTC
The bug has been closed via the following commit(s):

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

commit 2f79bc944a2dedb1e8ca2b56c53ca9c2a5354aa8
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2018-07-27 10:11:04 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2018-07-27 11:44:28 +0000

    media-sound/pulseaudio: fix padsp OSS wrapper for non-native multilib
    
    Pass the new (in v11) configure argument with glibc per upstream release notes.
    
    Closes: https://bugs.gentoo.org/486328
    Package-Manager: Portage-2.3.43, Repoman-2.3.10

 media-sound/pulseaudio/pulseaudio-12.2.ebuild | 5 +++++
 1 file changed, 5 insertions(+)