Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 891621 - www-client/firefox-109.0: build fails with ffast-math enabled (error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined)
Summary: www-client/firefox-109.0: build fails with ffast-math enabled (error Cannot b...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-21 17:06 UTC by Alex Pushkin
Modified: 2023-01-24 12:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
firefox ffast-math error txt (firefox-ffast-math-error.txt,550.54 KB, text/plain)
2023-01-21 17:06 UTC, Alex Pushkin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Pushkin 2023-01-21 17:06:47 UTC
Created attachment 848937 [details]
firefox ffast-math error txt

Firefox will not compile with 'ffast-math' enabled on a fresh stage3 snapshot.

Error: error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined.

I split the build.log file into parts and also added emerge --info at the top. 

File content (line number):
- emerge --info: 1;
- error ffast-math: 78;
- head -1000 build.log: 285;
- tail -1000 build.log: 1292.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-21 17:08:13 UTC
So, our options are:
1. Filter it out
2. Add FLOAT_APPROX to CPPFLAGS or similar
3. Add a build system patch and upstream it to Mozilla to pass 2. onto opus automatically when building with Ofast (as Mozilla's build system handles optimisation)
Comment 2 Joonas Niilola gentoo-dev 2023-01-24 12:23:13 UTC
Can you build media-libs/opus with these settings? I wonder if this is best reported at https://gitlab.xiph.org/xiph/opus/-/issues and then Firefox could ship the upstream-fixed release. Looks like the current version shipped with Firefox is pretty up-to-date, 
https://gitlab.xiph.org/xiph/opus/-/commit/997fdf54e781ae1c04dee42018f35388a04fe483 (version based on this commit).

Well of course it doesn't guarantee -ffast-math will work throughout the build, but at least one down...