Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 529098

Summary: media-sound/apulse should install libraries in /usr/$LIBDIR/apulse
Product: Gentoo Linux Reporter: pierre <pierre>
Component: Current packagesAssignee: Jauhien Piatlicki (RETIRED) <jauhien>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo, godlike64, mexahotabop, ulm
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
URL: https://github.com/i-rinat/apulse/issues/15
See Also: https://bugs.gentoo.org/show_bug.cgi?id=531350
https://bugs.gentoo.org/show_bug.cgi?id=760774
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: proposed ebuild

Description pierre 2014-11-12 23:58:01 UTC
apulse is essentially focus on making skype usable on a pulseaudio free system. thus it should be installed locally, and should advise users to run "apulse skype" manually, rather than globally, where other programs (like google-chrome for example ) can think pulseaudio is really installed and get confused...
Comment 1 pierre 2014-11-13 00:05:27 UTC
see https://github.com/i-rinat/apulse/issues/15
Comment 2 pierre 2014-11-13 00:13:21 UTC
Portage 2.2.8-r2 (default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.16.5-gentoo x86_64)
=================================================================
System uname: Linux-3.16.5-gentoo-x86_64-AMD_E2-1800_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:     3640652 total,   1801704 free
KiB Swap:    4194300 total,   4191600 free
Timestamp of tree: Wed, 12 Nov 2014 17:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p53
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/ccache:          3.1.9-r3
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.69
sys-devel/automake:       1.11.6, 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.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo mobile
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="-march=k8 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache 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="rsync://mirrors.tera-byte.com/gentoo http://files.gentoo.gr rsync://ftp.jaist.ac.jp/pub/Linux/Gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/"
LANG="fr_FR.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/local/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="/usr/local/portage/cross-i686-pc-mingw32"
SYNC="rsync://rsync1.fr.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa amd64 ati bash-completion berkdb bzip2 cairo ccache cdr cleartype cli consolekit corefonts cracklib crypt cxx dbus dga dri dvd exif ffmpeg flac fontconfig fortran gallium gdbm gif gimp gstreamer gtk iconv imagemagic ipv6 jpeg jpeg2k keyboard lcms libnotify lm_sensors loop-aes mikmod mmx mmxext modules mp3 mpeg ncurses nls nptl ogg opengl openmp pam pcre pdf png policykit radeon radeonsi raw readline sdl session smp sqlite sse sse2 ssl startup-notification svg tcpd thunar tiff truetype type1 udev unicode usb v4l v4l2 vim-syntax vorbis wifi x264 xfce xinerama xml xml2 xpm xv zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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="canon" 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 keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr en fr_FR en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="ati radeon radeonsi" XFCE_PLUGINS="logout clock brightness battery" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 pierre 2014-11-13 02:24:54 UTC
one could change 
local mycmakeargs="-DAPULSEPATH=${EPREFIX}/usr/$(get_libdir)"

for 

local mycmakeargs="-DAPULSEPATH=${EPREFIX}/usr/$(get_libdir)/apulse"

in apulse ebuild. 

but then in amd64 system, /usr/bin/apulse points on the wrong path (/usr/lib64/apulse).

so in amd64, /usr/lib64/apulse/libpulse* should not be compiled (adding -abi_x86_64 , is it possible??) and lib64 should be turn to lib32 in /usr/bin/apulse

if that's the choosen solution, I can't wait to see how you do that in an ebuild!
Comment 4 pierre 2014-11-13 22:42:12 UTC
Created attachment 389270 [details]
proposed ebuild

here is the best I can come with...
I'm not good with ebuild, and worst with multilib!

lib are installed in /usr/lib(32/64)/apulse
if system abi is x84, it does nothing special
if system abi is amd64, it compiles only if abi_x86_32 is set, and removes lib64 files (useless aren't they?) , remove /usr/bin/x_86_64-pc-linux-gnu-apulse, and links /usr/bin/apulse to  /usr/bin/i686-pc-linux-gnu-apulse
Comment 5 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-11-13 22:48:19 UTC
> if system abi is amd64, it compiles only if abi_x86_32 is set, and removes lib64 files (useless aren't they?)

A bad idea. apulse can be usefull for 64-bit software as well. I will just change the installation directory of libraries, nothing more. Then, probably, I will modify skype .desktop file to start skype with the appropriate apulse tool and remind user to use it when skype started from command line (or may be will replace skype executable with the script).
Comment 6 Ulrich Müller gentoo-dev 2014-11-15 08:15:26 UTC
Skype won't find the libs any more when their install location is changed, i.e. it would have to be started with the wrapper which isn't necessary at the moment.

Also chromium[-pulseaudio] shouldn't look for any pulseaudio libs.
Comment 7 Ulrich Müller gentoo-dev 2014-11-15 17:49:57 UTC
Sorry, seems that I missed the last part of comment #5.

> (or may be will replace skype executable with the script).

With this, things would be fine of course.
Comment 8 godlike64 2014-11-19 07:25:53 UTC
Related to this bug, current apulse (media-sound/apulse-0.1.2-r2) breaks Firefox when trying to play back any video (even Youtube). I gather this is because Firefox thinks (naively) that Pulse is installed and tries to call library functions which are not implemented, hence crashing miserably.

Current equery -f for apulse:

# equery f apulse
 * Searching for apulse ...
 * Contents of media-sound/apulse-0.1.2-r2:
/usr
/usr/bin
/usr/bin/apulse -> x86_64-pc-linux-gnu-apulse
/usr/bin/i686-pc-linux-gnu-apulse
/usr/bin/x86_64-pc-linux-gnu-apulse
/usr/lib32
/usr/lib32/libpulse-simple.so -> libpulse-simple.so.0
/usr/lib32/libpulse-simple.so.0
/usr/lib32/libpulse.so -> libpulse.so.0
/usr/lib32/libpulse.so.0
/usr/lib32/libpulsecommon-5.0.so
/usr/lib64
/usr/lib64/libpulse-simple.so -> libpulse-simple.so.0
/usr/lib64/libpulse-simple.so.0
/usr/lib64/libpulse.so -> libpulse.so.0
/usr/lib64/libpulse.so.0
/usr/lib64/libpulsecommon-5.0.so
/usr/share
/usr/share/doc
/usr/share/doc/apulse-0.1.2-r2
/usr/share/doc/apulse-0.1.2-r2/README.md.bz2

Could apulse's library locations/filenames be changed, as well as Skype's .desktop file? Or at least ewarn the user of how Skype should be started when USE=apulse. It is clear from the upstream bug that apulse devs will not implement additional functions (nor should they, since apulse is a way not to use pulse :).

The proposed ebuild in this bugzilla has the following files registered after installed:

# equery f apulse
 * Searching for apulse ...
 * Contents of media-sound/apulse-0.1.2-r3:
/usr
/usr/bin
/usr/bin/apulse -> i686-pc-linux-gnu-apulse
/usr/bin/i686-pc-linux-gnu-apulse
/usr/lib32
/usr/lib32/apulse
/usr/lib32/apulse/libpulse-simple.so -> libpulse-simple.so.0
/usr/lib32/apulse/libpulse-simple.so.0
/usr/lib32/apulse/libpulse.so -> libpulse.so.0
/usr/lib32/apulse/libpulse.so.0
/usr/lib32/apulse/libpulsecommon-5.0.so
/usr/share
/usr/share/doc
/usr/share/doc/apulse-0.1.2-r3
/usr/share/doc/apulse-0.1.2-r3/README.md.bz2

With those, I can confirm that Firefox does not crash anymore, and Skype works normally when started via `apulse skype` (without apulse, as expected, no sound at all).

In case it's needed, my emerge --info: https://bpaste.net/show/a6bb57ef0687
Comment 9 Daniel Solano Gómez 2014-12-01 03:49:07 UTC
I have run into this issue as well.   I have found that simply making the change to the mycmakeargs is good enough.  Launching skype via /usr/bin/i686-pc-linux-gnu-apulse seems to work well enough for me.  Ensuring that the skype ebuild installs a desktop file with the appropriate path when using the apulse flag (and perhaps an ewarn/einfo noting how to launch skype) is probably the best way to resolve this issue.
Comment 10 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-12-01 16:00:51 UTC
Done

>  01 Dec 2014; Jauhien Piatlicki <jauhien@gentoo.org> +apulse-0.1.4.ebuild,
>  -apulse-0.1.1.ebuild, -apulse-0.1.2-r1.ebuild, -apulse-0.1.2-r2.ebuild:
>  version bump (bug #529042), fix bug #529098