Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[Solved]: firefox 146.0 146.0.1 and 147.0.2 fail to compile

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

[Solved]: firefox 146.0 146.0.1 and 147.0.2 fail to compile

  • Quote

Post by andi456 » Fri Dec 19, 2025 2:37 pm

Hi,

maybe I missed something, but my latest try to compile firefox 146.0 failed.

Examining the corresponding build.log, I found the following error message:

Code: Select all

0:38.63 /var/tmp/portage/www-client/firefox-146.0/work/firefox-146.0/mozglue/misc/SSE.cpp:
261:33: error: use of undeclared identifier 'has_avx'
So, just to be sure, I checked, if my cpu has avx support by issuing grep -o 'avx[^ ]*' /proc/cpuinfo
:

Code: Select all

avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
avx
avx2
So apparently my cpu(s) are capable of avx and avx2, and I have set them both in my /etc/portage/make.conf. Or should I set them somewhere else?

Kind regards,

Andreas
Last edited by andi456 on Thu Feb 12, 2026 12:44 pm, edited 2 times in total.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Fri Dec 19, 2025 2:45 pm

Can you post your emerge --info?
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Fri Dec 19, 2025 2:52 pm

Sure, I wgetpasted it to:

https://bpa.st/WLNA
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Fri Dec 19, 2025 3:09 pm

Probably the cause is the option -mno-bmi2 in your cflags.
If you look at line 261 of the firefox-146.0/mozglue/misc/SSE.cpp file you can see that it has something to do with bmi

Code: Select all

#  if !defined(MOZILLA_PRESUME_BMI2)
MOZ_RUNINIT bool bmi2_enabled = has_avx() &&
                                has_cpuid_bits(7u, ebx, (1u << 3)) &&
                                has_cpuid_bits(7u, ebx, (1u << 8));
#  endif
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Fri Dec 19, 2025 3:29 pm

Ok,

I've never dived too deep into the business of cflags and stuff like that, but after looking at my cpuinfo again, it seems that bmi2 is part of the supported flags. So maybe I should remove "-mno-bmi2" from my cflags and see what happens?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Dec 19, 2025 3:47 pm

andi456,

firefox 146.0 is broken. firefox 146.0.1 has the fix.
It's still building here. It takes a while on a Pi5

Hmm ... that won't fix your error.
Last edited by NeddySeagoon on Fri Dec 19, 2025 3:48 pm, edited 1 time in total.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Fri Dec 19, 2025 3:48 pm

andi456 wrote:So maybe I should remove "-mno-bmi2" from my cflags and see what happens?
Yes, that’s a good idea.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Sun Dec 28, 2025 5:14 pm

Ok, so i will wait until, firefox 146.0.1 or above will be available. Maybe next week or so....

Kind regards.
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Tue Feb 10, 2026 7:26 pm

Unfortunately, the same error as reported above endures up to firefox 147.0.2. The build process fails telling me that somewhere in SSE.cpp there's an undeclared identifier "has_avx"

Code: Select all

work/firefox-147.0.2/mozglue/misc/SSE.cpp:261:33:
 use of undeclared identifier 'has_avx'
Should I consider changing my CFLAGS or should I file a bug report to mozilla?

Kind regards,

Andreas
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Tue Feb 10, 2026 7:38 pm

andi456 wrote:Unfortunately, the same error as reported above endures up to firefox 147.0.2. The build process fails telling me that somewhere in SSE.cpp there's an undeclared identifier "has_avx"

Code: Select all

work/firefox-147.0.2/mozglue/misc/SSE.cpp:261:33:
 use of undeclared identifier 'has_avx'
Should I consider changing my CFLAGS or should I file a bug report to mozilla?

Kind regards,

Andreas
This error has only so much to do with avx as the name of the identifier includes it. The error is about use of such an identifier while it's undeclared.

Could you please wgetpaste your emerge --info again? Also do you have some custom per-package configuration?

Best Regards,
Georgi
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Wed Feb 11, 2026 12:34 pm

Sure,

the paste of emerge --info is here:

http://0x0.st/PAxc.txt

per package configuration for firefox amounts to:

www-client/firefox bindist clang

Kind regards,

Andreas
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Wed Feb 11, 2026 3:15 pm

I'd like to look at your make.conf too.

On an unrelated note, it's there s particular reason you've enabled bindist?

What about clang? Isn't it on by default?

Best Regards,
Georgi
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Wed Feb 11, 2026 4:30 pm

So here's my make.conf:

Code: Select all

COMMON_FLAGS="-O2 -march=znver2 -pipe -mno-bmi2"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
#FEATURES="protect-owned"
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3"

L10N="de en-GB"
USE="mmx sse sse2 portage bash-completion vim-syntax 3dnow 3dnowext cjk tk xetex -ldap sasl gtk3 fpm icu opencl lua java pulseaudio ffmpeg dvb openssl objc objc++ objc-gc -libav jpeg2k perl djvu nsplugin samba matroska sftp musepack twolame cddb theora speex opus xvmc -jack vdpau lame libsamplerate egl opengl threads javafx vaapi elogind -consolekit designer libuvc -mesh -systemd -wayland xft btrfs -vulkan qml lvm"
ABI_X86="64 32"
VIDEO_CARDS="nouveau nvidia" # radeon radeonsi amdgpu intel nvidia
INPUT_DEVICES="evdev libinput"
The bindist is just enabled to avoid the warning, that i could not redistribute firefox on my network. I don't remember, why I set clang, though.
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Feb 12, 2026 10:22 am

wgetpaste -c 'ls -aR /etc/portage/'

wgetpaste -c 'emerge -pvt firefox'

On a side, likely unrelated note, your USE is convoluted. To me it looks like you're including use flags for single packages in it. I'd recommend cleaning it up by commenting it and seeing which packages trigger use changes. Transfer as much as possible in package.use. Maybe it's not related to the current issue, but it'll make future support requests way easier to handle.

Also why are you compiling your whole system with 32bit ABI support?

I'm not sure what warning you're avoiding with bindist on firefox, but this should be related to branding and should apply only if you're distributing the package publicly. In your private network it doesn't matter.

Best Regards,
Georgi
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Feb 12, 2026 10:40 am

Using your CFLAGS I just got the same error:

Code: Select all

 0:37.72 /var/tmp/portage/www-client/firefox-147.0.3/work/firefox-147.0.3/mozglue/misc/SSE.cpp:261:33: error: use of undeclared identifier 'has_avx'
 0:37.72   261 | MOZ_RUNINIT bool bmi2_enabled = has_avx() &&
 0:37.72       |                                 ^~~~~~~
 0:37.72 1 error generated.
Best Regards,
Georgi
Last edited by logrusx on Thu Feb 12, 2026 10:53 am, edited 1 time in total.
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Thu Feb 12, 2026 10:51 am

Ok,

so the output of ls -aR /etc/portage can be seen here:
https://bpa.st/UFBQ

and the output of emerge -pvt firefox here:
https://bpa.st/CDLQ

The system is a little older and had a "cave" (an alternative package manager) phase, and one where I experimented with building packages for a raspberrypi. That's why it all got a little convoluted over time, especially regarding the directories.
Should I put the USE="..." variable in package.use?

Kind regards,

Andreas
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Feb 12, 2026 10:56 am

andi456 wrote: Should I put the USE="..." variable in package.use?
No: https://wiki.gentoo.org/wiki//etc/portage/package.use

I edited my post above. Indeed the build is broken with your COMMON_FLAGS.

Removing -mno-bmi2 solved the issue. Do you remember why do you have that first place? How did you test it previously? If it was putting the variable on the command line, you should edit it in make.conf. I'm not sure why, but putting it on the command line didn't alter my COMMON_FLAGS.

Best Regards,
Georgi
Top
andi456
Apprentice
Apprentice
Posts: 259
Joined: Sun Mar 06, 2005 12:23 pm
Location: Germany

  • Quote

Post by andi456 » Thu Feb 12, 2026 12:43 pm

Thanks, I can now confirm that firefox compiles without the -mno-bmi2 flag in my COMMON_FLAGS.

Btw., I do not remember exactly, why I added -mno-bmi2 to my COMMON_FLAGS. I guess it was some compatibility issue from the time, when my computer was rather new.

Kind regards.

Andreas
Top
Post Reply

18 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic