Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USE codes for firefox-bin[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Fri Nov 20, 2020 6:58 pm    Post subject: USE codes for firefox-bin[SOLVED] Reply with quote

I find that firefox-bin works better across sites than the firefox I build myself. Is there a way to know what USE codes are being used to build firefox-bin?

Alternatively, what USE codes (other than default for 17.1 desktop profile) are users finding the most happiness with?
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi


Last edited by figueroa on Sun Nov 22, 2020 5:26 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30887
Location: here

PostPosted: Fri Nov 20, 2020 7:07 pm    Post subject: Reply with quote

firefox-bin is official binary release, it's not like libreoffice-bin because you can't build a firefox version and redistibute it with firefox trademark.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2716

PostPosted: Fri Nov 20, 2020 7:26 pm    Post subject: Reply with quote

Do you mean what you'd need to somewhat replicate firefox-bin with your own build?

As pointed above it's upstream's release as-is, but it notably use clang + lto + pgo (or so I've read anyway).

GCC builds being hardly tested by mozilla often brings regressions, "if" you are getting obscure segfaults it's often related. Gentoo does go out of its way to fix build failures but fixing runtime issues is hard, I strongly suggest USE=clang myself.

Performance-wise pgo should be much more significant than what -march=native would give you, so if you build with USE=-pgo you already have a worse firefox than firefox-bin (but pgo doubles build time.. so if that's a problem you may as well use firefox-bin in my opinion, unless you need other build-time changes -- personally I do custom patch firefox so.. :)).

If want to use firefox's vaapi, that "currently" requires firefox to be built with USE=wayland (even on x11, or else vaapi code doesn't get built in). Not an issue with firefox-bin because it's built with wayland support in the first place even if you USE=-wayland that won't break it.

If you need alsa, it still works but firefox's native alsa is suffering from bit rot and unusable on a few sites, so like firefox-bin you're often better off using apulse (either through apulse[sdk] or the ebuild's workaround).

firefox-bin does use less system libraries but there's little sense in copying that behavior.

On a side-note, like -march, you can use RUSTFLAGS="-Ctarget-cpu=native" which firefox-bin wouldn't use (there's no need to specify the opt-level in RUSTFLAGS, appropriate one will be added).
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Fri Nov 20, 2020 7:50 pm    Post subject: Reply with quote

Ionen wrote:
Do you mean what you'd need to somewhat replicate firefox-bin with your own build?

As pointed above it's upstream's release as-is, but it notably use clang + lto + pgo (or so I've read anyway).

etc


Yes, that -- how to more-or-less duplicate the firefox-bin build, but build it myself. With my self-build firefox, I'm getting certain sites that don't resolve correctly or completely, especially if firefox has been up and running on other sites for a while. (notably facebook, publix.com)

My current firefox use codes are:
Code:
USE="dbus gmp-autoupdate openh264 system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp -clang -debug -eme-free -geckodriver -hardened -hwaccel -jack -lto -pgo -pulseaudio (-screencast) (-selinux) -wayland -wifi"


I recognize that building firefox (stable) locally gives me 78.5.0esr, and firefox-bin gets me 83.0 so I should expect some differences.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2716

PostPosted: Fri Nov 20, 2020 8:25 pm    Post subject: Reply with quote

When it comes to odd runtime issues I tend to suspect the lack of USE=clang, also not entirely impossible it's related to system-* libraries but I doubt it.

I'd like to tell you if I'm affected by the same issue (with my firefox 83 built with clang), but I have no idea how to reproduce especially if it's something that takes a while to happen. I haven't had any firefox issues in over 2 years though.

I doubt most of my flags have relevance on this but using:
Code:
$ emerge -pvq firefox
[ebuild   R   ] www-client/firefox-83.0  USE="clang gmp-autoupdate lto pgo pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp -dbus -debug -eme-free -geckodriver -hardened -hwaccel -jack -openh264 -screencast (-selinux) -wayland -wifi"

Edit: for testing if it's version-related, you could emerge firefox-bin:0/esr78 to match your built version. These new 0/esr* subslots exist to allow you to more easily select a ESR branch.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Fri Nov 20, 2020 9:04 pm    Post subject: Reply with quote

Ionen wrote:
When it comes to odd runtime issues I tend to suspect the lack of USE=clang, also not entirely impossible it's related to system-* libraries but I doubt it. etc. etc.

Very helpful and gives me several things to work on. I'll change one thing at a time, +clang first, and see where it leads me. Will post results.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Fri Nov 20, 2020 10:09 pm    Post subject: Reply with quote

You can see and compare the build options if you go to about:buildconfig in Firefox.

Of course you'd need to map them back to USE flags.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Sat Nov 21, 2020 6:19 pm    Post subject: Reply with quote

I've rebuilt firefox 78.5.0 several times, now with USE +clang -dbus -openh264 giving me:
Code:
www-client/firefox-78.5.0:0/esr78::gentoo  USE="clang gmp-autoupdate system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp -dbus -debug -eme-free -geckodriver -hardened -hwaccel -jack -lto -openh264 -pgo -pulseaudio (-screencast) (-selinux) -wayland -wifi"

Running from the commandline I get flooded with the following error messages watching Youtube:
Code:
[Child 23191, MediaDecoderStateMachine #1] WARNING: Decoder=7fef2b64f000 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /var/tmp/portage/www-client/firefox-78.5.0/work/firefox-78.5.0/dom/media/MediaDecoderStateMachine.cpp, line 3470

The only thing in /var/tmp/portage is ._unmerge directory so I'm guessing this is reporting a build-time error.

Subsequently, Faecbook and publix.com don't come up usably. If I close Firefox and go to either site directly, they work fine.

Firefox-bin always works fine. I'll proceed to do +lto and +pgo. After that, I'll pretty much match Ionen's use flags with the exception of me using -pulseaudio. I do have apulse installed and sound always works fine.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2716

PostPosted: Sat Nov 21, 2020 6:32 pm    Post subject: Reply with quote

Personally not getting any console warnings playing youtube with built firefox-83.0 (or at least not with the videos I tried), console is entirely silent (checked in-browser console too, but nothing similar).

Have you been comparing with firefox-bin:esr/78 now or only 83.0? Just to be sure if it's not ESR78 vs 83.0

That aside, note that USE=pulseaudio is needed to use apulse with built firefox, it enables the native alsa bit rotting support if you disable it. Will need to install pulseaudio anyway because need pulseaudio headers to build firefox but then use apulse at runtime if detected.
Code:
    if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then
        einfo "APULSE found; Generating library symlinks for sound support ..."
Alternatively, apulse with USE=sdk provides pulseaudio headers as well, albeit not many packages know about it (firefox does, allows to build with USE=pulseaudio without pulseaudio). It essentially try to pretend to be pulseaudio even for building by providing libraries in normal path, pkg-config file, includes, etc... then neither workarounds nor apulse wrapper are needed anymore. Also blocks pulseaudio installation given it'd conflict.

Edit: clarified things a bit


Last edited by Ionen on Sat Nov 21, 2020 6:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Sat Nov 21, 2020 6:48 pm    Post subject: Reply with quote

Ionen wrote:
Have you been comparing with firefox-bin:esr/78 now or only 83.0? Just to be sure if it's not ESR78 vs 83.0

Actually, I did it the other way around. I built firefox-bin-78.5 and firefox-78.5 for a concurrent comparison earlier yesterday and noted no difference. Since then, I've let firefox-bin go back to v83.

I'm currently building firefox-78.5 with +pgo. I couldn't add +lto because I'm using rust-bin and got this error trying to add both +pgo and +lto:
Code:
$ cat /var/log/portage/elog/www-client:firefox-78.5.0:20201121-182945.log
ERROR: setup
Rust is using LLVM version 10 but ld.lld version belongs to LLVM version 11.
You will be unable to link www-client/firefox. To proceed you have the following options:
  - Manually switch rust version using 'eselect rust' to match used LLVM version
  - Switch to dev-lang/rust[system-llvm] which will guarantee matching version
  - Build www-client/firefox without USE=lto


Ionen wrote:
That aside, note that USE=pulseaudio is needed to use apulse with built firefox, it enables native alsa if you disable it. It will need to install pulseaudio anyway because needs pulseaudio headers to build firefox but then use apulse at runtime if detected. Alternatively, apulse[sdk] provides pulseaudio headers as well, albeit not many packages support it (firefox does).
Code:
    if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then
        einfo "APULSE found; Generating library symlinks for sound support ..."


That's very interesting. I've been using USE="-pulseaudio" in make.conf for something like a year, with apulse installed, and alsa sound works fine with both source and bin versions of firefox.

If the current build of 78-5, in progress, doesn't pan out, I'll next move up to www-client:firefox-83.0. In the meantime, source built mail-client/thunderbird-78.4.2 is working just perfectly as far as I can tell. Thanks for posting on this thread. I'm giving my machine a good workout and I'm learning some things in the process.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2716

PostPosted: Sat Nov 21, 2020 6:59 pm    Post subject: Reply with quote

Yeah currently that needs rust-1.47.0 (which can use llvm11, 1.46.0 is pinned at 10), but I kinda doubt lto/pgo have anything to do with it.

If it's media playback-related I guess it's "possible" apulse vs native alsa is related though. From previous threads "think" I remember you have a rather intensive alsa setup and firefox's half broken native alsa support may not necessarily play well with it.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Sat Nov 21, 2020 7:24 pm    Post subject: Reply with quote

Ionen wrote:
From previous threads "think" I remember you have a rather intensive alsa setup and firefox's half broken native alsa support may not necessarily play well with it.

Not too intensive alsa setup, just trying to keep a normal pre-pulseaudio alsa setup, so more persistent than intensive. These days, with USE -pulseaudio and apulse installed, the firefox-bin startup scripts take care of all the business and source built firefox just works anyway without any special configuration or scripts on my part.

That error I posted from when watching a Youtube video doesn't come up when watching the video, but instead when using the back allow key to leave a video when it's playing. I get the same behavior from other sites with video hosted on Youtube as well, such as France's News24, https://www.france24.com/en/. If I stop the video before leaving, I do not consistently see the error. That's probably not useful information.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Sat Nov 21, 2020 8:32 pm    Post subject: Reply with quote

Finding: I get a similar error abruptly stopping a Youtube video running firefox-bin from the commandline. Only thing is that I don't experience the usability issues with firefox-bin. Unlike source built firefox, firefox-bin has been steady as a rock.

This is the error tossed while running firefox-bin:
Code:
[Child 8100, MediaDecoderStateMachine #1] WARNING: Decoder=7f5eb8ccb400 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3471

_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2958
Location: Edge of marsh USA

PostPosted: Sun Nov 22, 2020 5:25 am    Post subject: Reply with quote

Late this afternoon, I upgraded firefox to www-client:firefox-83.0 ~amd64. I've been running it for hours with no apparent usability problems. After testing with numerous Youtube videos, Facebook and publix.com, the two sites that would not resolve correctly after watching Youtube videos, continue to work predictably.

I'll mark this solved, though I don't like running major software as ~amd64.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum