Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Firefox installation failed :/
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Thu Jun 06, 2024 10:20 am    Post subject: [solved] Firefox installation failed :/ Reply with quote

Hi folks

Well, this is a stinker :/

After nearly four hours of compiling, the firefox build failed, with this compiler error (and many others much like it):

Code:

...
88:32.28 In file included from /var/tmp/portage/www-client/firefox-115.11.0/work/firefox-115.11.0/gfx/skia/skia/src/core/SkOpts.cpp:46:
88:32.28 /var/tmp/portage/www-client/firefox-115.11.0/work/firefox-115.11.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h:406:40: error: always_inline function '_mm256_fmadd_ps' requires target feature 'fma', but would be inlined into function 'mad' that is compiled without support for 'fma'
88:32.28   406 |     SI F   mad(F f, F m, F a) { return _mm256_fmadd_ps(f, m, a); }


I'm not certain, but I think this is a bug/limitation in GCC, triggered by using '--march=native'. It's trying to use macros associated with the AVX instruction set, but support for them has not been built into the various GCC libraries. Still, at compile time, the compiler is trying to use them. The CPU does support AVX (at least, /proc/cpuinfo says it does), but GCC has done something freaky.

I think, from earlier experience, that this problem might be solved by removing '--march=native'; but the use of this flag is recommended in the Gentoo set-up instructions. It's not been a problem until now.

I'm currently trying to rebuild like this, without --march=native :

# CFLAGS=-O2 CXXFLAGS=-O2 emerge firefox

I guess I'll know in another four hours or so whether it's successful.

What I'm getting around to is: is the use of `--march=native` generally such a good idea? Am I likely to run into other problems using this? How much difference is it likely to make, if I don't?

BR, Lars


Last edited by lars_the_bear on Thu Jun 06, 2024 9:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Thu Jun 06, 2024 1:49 pm    Post subject: Reply with quote

For the record,

# CFLAGS=-O2 CXXFLAGS=-O2 emerge firefox

worked, and firefox is now running. So I guess '--march=native' was the culprit.

Weird. But I've seen this kind of thing before, so I wasn't entirely surprised.

BR, Lars.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5118
Location: Bavaria

PostPosted: Thu Jun 06, 2024 2:01 pm    Post subject: Reply with quote

It would be interesting to see what happens if you use the CPU architecture instead of “native”. Example from my box (intel 13th gen):
Code:
COMMON_FLAGS="-march=raptorlake -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22687

PostPosted: Thu Jun 06, 2024 2:36 pm    Post subject: Re: Firefox installation failed :/ Reply with quote

lars_the_bear wrote:
What I'm getting around to is: is the use of `--march=native` generally such a good idea?
Use of -march=native is generally recommended. I would consider it a bug that Firefox fails with this option. Specifically, it is Firefox 120.0 failed to build under VirtualBox: error: always_inline function '_mm256_fmadd_ps' requires target feature 'fma', but would be inlined into function 'mad' that is compiled without support for 'fma'. That bug is supposedly about clang, but since you did not show your emerge options, it is possible that Firefox has picked clang for you (not gcc).
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Thu Jun 06, 2024 2:57 pm    Post subject: Reply with quote

pietinger wrote:
It would be interesting to see what happens if you use the CPU architecture instead of “native”.


Indeed. But, since it takes two hours to get to the failure point, I don't think I'm going to have the patience to try ;)

BR, Lars.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20485

PostPosted: Thu Jun 06, 2024 4:10 pm    Post subject: Reply with quote

lars_the_bear wrote:
Indeed. But, since it takes two hours to get to the failure point, I don't think I'm going to have the patience to try ;)

BR, Lars.
You may be somewhat surprised how much more frequently firefox seems to need updates when compiling it :) If it works, the next one will be along soon enough.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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