Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 665470 - www-client/firefox-52.9.0: impossible to build with apulse
Summary: www-client/firefox-52.9.0: impossible to build with apulse
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-07 22:36 UTC by Sergey 'L29Ah' Alirzaev
Modified: 2018-09-22 21:07 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 Sergey 'L29Ah' Alirzaev 2018-09-07 22:36:59 UTC
Since USE=pulseaudio unconditionally pulls pulseaudio, seemingly from mozconfig-v6.52.eclass DEPEND:

Calculating dependencies... done!
[ebuild  N     ] net-libs/libasyncns-0.8-r4::gentoo  USE="-debug -doc" ABI_X86="32 (64) (-x32)" 334 KiB
[ebuild  N     ] media-libs/webrtc-audio-processing-0.3.1::gentoo  USE="-static-libs" ABI_X86="(64) -32 (-x32)" 680 KiB
[ebuild  N     ] media-sound/pulseaudio-12.2::gentoo  USE="X alsa asyncns bluetooth caps dbus gdbm glib gtk ipv6 jack libsamplerate native-headset ssl tcpd udev webrtc-aec -alsa-plugin -doc -equalizer -gconf -libressl -lirc (-neon) -ofono-headset -orc (-oss) -qt5 -realtime (-selinux) -sox (-system-wide) -systemd -test -zeroconf" ABI_X86="32 (64) (-x32)" 1627 KiB
[ebuild   R    ] www-client/firefox-52.9.0::gentoo  USE="dbus hardened jack jemalloc pulseaudio* system-icu system-jpeg system-sqlite -bindist -custom-cflags -custom-optimization -debug -eme-free (-gmp-autoupdate) -gtk2 -hwaccel (-neon) -pgo (-rust) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-libevent -system-libvpx -test -wifi" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB
[blocks B      ] media-sound/pulseaudio ("media-sound/pulseaudio" is blocking media-sound/apulse-0.1.12)



	pulseaudio? ( media-sound/pulseaudio )
Comment 1 Sergey 'L29Ah' Alirzaev 2018-09-08 00:37:05 UTC
By the way, with USE=-pulseaudio even though libasound.so is loaded by firefox (as seen in strace), it doesn't try producing sounds with it.
Comment 2 Sergey 'L29Ah' Alirzaev 2018-09-08 02:04:17 UTC
(In reply to Sergey 'L29Ah' Alirzaev from comment #1)
> By the way, with USE=-pulseaudio even though libasound.so is loaded by
> firefox (as seen in strace), it doesn't try producing sounds with it.

Okay, nvm, the sound works in youtube at least.
Comment 3 Thomas Deutschmann gentoo-dev Security 2018-09-08 13:50:22 UTC
(In reply to Sergey 'L29Ah' Alirzaev from comment #2)
> Okay, nvm, the sound works in youtube at least.

I understand this as "report is invalid, it works for me". If that's wrong, please re-open. But please focus on next ESR version (firefox-60.2.0), 52.x has reached EOL since 3 days.
Comment 4 Sergey 'L29Ah' Alirzaev 2018-09-08 16:39:49 UTC
The comments about working alsa have nothing to do with inability to build it w/ apulse.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2018-09-10 21:26:56 UTC
Dependency on media-sound/pulseaudio was motivated by media-sound/apulse not installing PulseAudio headers.
This has changed in >=media-sound/apulse-0.1.12 which has "pa-headers" USE flag (enabled by default):
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54cd339b91bc2008c8d21797a5f7e1daac12b160


Make this change in DEPEND:
-  pulseaudio? ( media-sound/pulseaudio )
+  pulseaudio? ( || (
+    media-sound/pulseaudio
+    >=media-sound/apulse-0.1.12[pa-headers]
+  ) )
... And check if building www-client/firefox with >=media-sound/apulse-0.1.12[pa-headers] will be successful.
Comment 6 Sergey 'L29Ah' Alirzaev 2018-09-11 02:35:21 UTC
I was trying to build against media-sound/apulse[pa-headers] and it failed in configure complaining about pulseaudio's inavailability.
Comment 7 Sergey 'L29Ah' Alirzaev 2018-09-11 03:04:26 UTC
 0:08.25 checking for libpulse... no
 0:08.25 ERROR: Package libpulse was not found in the pkg-config search path.
 0:08.25 ERROR: Perhaps you should add the directory containing `libpulse.pc'
 0:08.25 ERROR: to the PKG_CONFIG_PATH environment variable
 0:08.25 ERROR: No package 'libpulse' found
 0:08.30 *** Fix above errors and then restart with\
 0:08.30                "/usr/bin/gmake -f client.mk build"
 0:08.30 gmake: *** [client.mk:127: configure] Error 1
Comment 8 Sergey 'L29Ah' Alirzaev 2018-09-11 03:14:08 UTC
https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/apulse/pressureaudio.nix creates a few .pc files, i'll have a try doing the same.
Comment 9 Andrew Savchenko gentoo-dev 2018-09-11 09:46:54 UTC
Sergey, I'll try to add libpulse.pc file to apulse this weekend.
Comment 10 Andrew Savchenko gentoo-dev 2018-09-22 21:07:59 UTC
(In reply to Andrew Savchenko from comment #9)
> Sergey, I'll try to add libpulse.pc file to apulse this weekend.

Done! See apulse-0.12-r1[sdk].

In SDK mode apulse attempts to replace pulseaudio: headers and pkg-config files are provided, and libraries are installed in the same paths (/usr/$(get_libdir) instead of /usr/$(get_libdir)/apulse). This way the apulse wrapper script is no longer needed.

I tested it as binary replacement with firefox-bin and steam — works fine with both. Build with apulse[sdk] was tested with espeak and sox, the latter needs small patching to build and _sometimes_ fails at runtime :/. Can't test with firefox right now, since I have unrelated build problems with rust.

Please test if firefox builds and works with apulse[sdk]. You need to remove apulse symlinks generation from pkg_preinst(), though, because in SDK mode library paths are standard.