Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941873 - (audio) www-client/firefox-128.3.1:esr - mail-client/thunderbird -- Incorrect symlink to apulse[sdk]
Summary: (audio) www-client/firefox-128.3.1:esr - mail-client/thunderbird -- Incorrect...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-20 00:50 UTC by castix
Modified: 2024-10-29 11:29 UTC (History)
2 users (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 castix 2024-10-20 00:50:47 UTC
Hello, Just got a `OnMediaSinkAudioError`

Whereas no other program was playing sound. But not at the startup - I didn't check if this changes anything, it shouldn't

Situation after https://bugs.gentoo.org/752387 is not so clear

Because it was probably working in 2023-07-05
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f52fc46e933f32f68a6a00cddffbff41be88fc3


/usr/lib64/firefox/libpulse.so.0: broken symbolic link to ../apulse/libpulse.so.0

---
Ok, found it https://bugs.gentoo.org/760774
But It was reported as an invalid apulse bug

Both firefox and thunderbird ebuilds are forcing USE=sdk and then preinst symlinks with paths to libs assuming a -sdk install

Is the following USE configuration meaningful to you?

apulse? (
    >=media-sound/apulse-0.1.12-r4[sdk=]
)
pulseaudio? (
    || (
        media-libs/libpulse
        >=media-sound/apulse-0.1.12-r4[sdk]
    )
)

So where you do `../apulse` You can (then) do a condition based on the sdk presence and just `../` when sdk is enabled; and you need to set myaudiobackends that would otherwise be alsa to pulseaudio even for apulse new flag; At least, this is what humble me would do, have a nice day :)
Comment 1 castix 2024-10-20 16:55:46 UTC
[sdk=] is wrong, I meant to say [-sdk]
Comment 2 Joonas Niilola gentoo-dev 2024-10-21 16:03:13 UTC
Indeed, I see apulse will probably not work at all in our firefox currently. Even the launcher is missing parts needed for it. 

apulse[sdk] is supposed to completely replace pulseaudio, it has all conflicting files and can't be installed at the same time as pulseaudio. 

apulse[-sdk] installs libraries under /usr/lib64/apulse so it's usable in runtime with hacks, like what's done in firefox-bin ebuild, but you probably can't build firefox with apulse support when using that. So for source-built firefox I'd say we need to depend on apulse[sdk].

This is something I'll most look closer at during the next version bump.
Comment 3 castix 2024-10-21 21:25:59 UTC
Thanks for taking care of this

> you probably can't build firefox with apulse support when using -sdk

Uhm, is it hard to force -DHAVE_PULSEAUDIO after configure? (I've never built firefox without the help of the precious ebuild)
Since it's using dlopen, it's not a linked dependency...
And you don't want to force it if jack is enabled

> the launcher is missing parts needed for it
What is missing? (I guess I'll see)
Aside from setting ``APULSE_PLAYBACK_DEVICE=plughw:0,0`` and APULSE_CAPTURE_DEVICE -- that's user configuration
(and fixing the symlinks)
I did nothingelse to get audio working (with sdk)

I also noticed libxul still links to libasound
Comment 4 Joonas Niilola gentoo-dev 2024-10-29 06:46:24 UTC
I need to grab my mind around this again. So apulse[sdk] is a full 1:1 replacement for pulseaudio. So at simplest we could just always depend on either libpulse, or apulse[sdk]. But to my knowledge it's not possible to have a working, eh, let's say "full desktop experience" using apulse[sdk] because not every package has dependency-support for it. Therefore it'd be nice if firefox-bin also accepted apulse[-sdk] as a dependency, but that then requires these ugly hacks in the ebuilds and the launcher.

So I don't know what to do here. I'd like to get rid of the pulseaudio use flag and just depend on libpulse OR apulse[sdk]. But I'm afraid there's someone using apulse[-sdk] and will face a hard decision between Firefox and rest-of-their-system.

Maybe there could be a transitional period where both apulse[+-sdk] will work for a while, and let's see where that takes us.
Comment 5 Larry the Git Cow gentoo-dev 2024-10-29 11:29:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62917b785d9fa7c4923fa251025f99a70392a471

commit 62917b785d9fa7c4923fa251025f99a70392a471
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2024-10-29 09:59:39 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-10-29 11:27:37 +0000

    www-client/firefox-bin: add 132.0
    
     - simplify logic used when using apulse instead of pulseaudio/pipewire.
    
    Closes: https://bugs.gentoo.org/941873
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox-bin/Manifest                 |  99 +++++++
 www-client/firefox-bin/firefox-bin-132.0.ebuild | 364 ++++++++++++++++++++++++
 2 files changed, 463 insertions(+)