Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 829376 - www-client/firefox-91.4.0-r1 fails to build on x86
Summary: www-client/firefox-91.4.0-r1 fails to build on x86
Status: RESOLVED DUPLICATE of bug 816975
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-16 20:05 UTC by berni.lakeroe
Modified: 2021-12-26 10:38 UTC (History)
1 user (show)

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


Attachments
emerge --info '=www-client/firefox-91.4.0-r1::gentoo' (info1.txt,4.28 KB, text/plain)
2021-12-16 20:06 UTC, berni.lakeroe
Details
emerge -pqv '=www-client/firefox-91.4.0-r1::gentoo' (info2.txt,783 bytes, text/plain)
2021-12-16 20:08 UTC, berni.lakeroe
Details
Build log (www-client:firefox-91.4.0:20211212-154707.log.lzma,578.17 KB, application/octet-stream)
2021-12-16 20:13 UTC, berni.lakeroe
Details
emerge --info '=www-client/firefox-91.4.0-r1::gentoo' (info1.txt,4.29 KB, text/plain)
2021-12-18 09:30 UTC, berni.lakeroe
Details
emerge -pqv '=www-client/firefox-91.4.0-r1::gentoo' (info2.txt,783 bytes, text/plain)
2021-12-18 09:31 UTC, berni.lakeroe
Details
Build log (www-client:firefox-91.4.0-r1:20211217-195249.log.lzma,571.84 KB, application/octet-stream)
2021-12-18 09:32 UTC, berni.lakeroe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description berni.lakeroe 2021-12-16 20:05:23 UTC
www-client/firefox-91.4.0-r1 fails to build on x86 with the following error:

ERROR: www-client/firefox-91.4.0-r1::gentoo failed (compile phase): (no error message)

Attached is output of `emerge --info '=www-client/firefox-91.4.0-r1::gentoo'`
            output of `emerge -pqv '=www-client/firefox-91.4.0-r1::gentoo'`
and the complete build log.

Reproducible: Always

Steps to Reproduce:
1. emerge -v www-client/firefox-91.4.0-r1
Actual Results:  
Compilation fails

Expected Results:  
Compilation finishes without error
Comment 1 berni.lakeroe 2021-12-16 20:06:35 UTC
Created attachment 759376 [details]
emerge --info '=www-client/firefox-91.4.0-r1::gentoo'
Comment 2 berni.lakeroe 2021-12-16 20:08:01 UTC
Created attachment 759377 [details]
emerge -pqv '=www-client/firefox-91.4.0-r1::gentoo'
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-16 20:10:20 UTC
Please attach the full build.log.
Comment 4 berni.lakeroe 2021-12-16 20:13:29 UTC
Created attachment 759378 [details]
Build log
Comment 5 Joonas Niilola gentoo-dev 2021-12-17 13:30:51 UTC
Looks like bug https://bugs.gentoo.org/816975 to me. There's a patch provided to help you, but the main reason seems to be either emulated or cross-compile environment? 

I'd suggest setting matching CFLAGS and CXXFLAGS (they seem to differ for you), use setarch i686, and/or use -m32 in C(XX)FLAGS.

*** This bug has been marked as a duplicate of bug 816975 ***
Comment 6 berni.lakeroe 2021-12-17 15:25:42 UTC
It's neither emulated nor cross-compile environment.

But thanks for the CFLAGS/CXXFLAGS tip.
I'll try your suggestion and report back ...
Comment 7 berni.lakeroe 2021-12-18 09:30:22 UTC
Setting matching CFLAGS and CXXFLAGS does NOT solve the issue.
As I've also written before it's neither emulated nor cross-compile environment.

New logs are attached.

Any other suggestions ?
Comment 8 berni.lakeroe 2021-12-18 09:30:57 UTC
Created attachment 759530 [details]
emerge --info '=www-client/firefox-91.4.0-r1::gentoo'
Comment 9 berni.lakeroe 2021-12-18 09:31:20 UTC
Created attachment 759531 [details]
emerge -pqv '=www-client/firefox-91.4.0-r1::gentoo'
Comment 10 berni.lakeroe 2021-12-18 09:32:47 UTC
Created attachment 759532 [details]
Build log
Comment 11 Joonas Niilola gentoo-dev 2021-12-18 10:04:18 UTC
(In reply to berni.lakeroe from comment #7)
> 
> Any other suggestions ?

I gave you plenty in #c5 including a path to a patch if everything else fails. 

Your CPU is 64-bit so it's not a "real" 32-bit env, also I can't reproduce so it's something in your system. Please check the linked bug for discussion. 

You may find more success by setting -march=native too.

*** This bug has been marked as a duplicate of bug 816975 ***
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-18 10:06:22 UTC
(In reply to Joonas Niilola from comment #11)
> (In reply to berni.lakeroe from comment #7)
> > 
> > Any other suggestions ?
> 
> I gave you plenty in #c5 including a path to a patch if everything else
> fails. 
> 
> Your CPU is 64-bit so it's not a "real" 32-bit env, also I can't reproduce
> so it's something in your system. Please check the linked bug for
> discussion. 

If they're booted into an x86 kernel, I don't think this is really true. For years we had lots of people running x86 on technically-capable-of-64-bit CPUs.

If booted in, it should make no difference.

> 
> You may find more success by setting -march=native too.
> 
> *** This bug has been marked as a duplicate of bug 816975 ***
Comment 13 berni.lakeroe 2021-12-18 13:10:53 UTC
(In reply to Joonas Niilola from comment #11)
> (In reply to berni.lakeroe from comment #7)
> > 
> > Any other suggestions ?
> 
> I gave you plenty in #c5 including a path to a patch if everything else
> fails. 
> 
> Your CPU is 64-bit so it's not a "real" 32-bit env, also I can't reproduce
> so it's something in your system. Please check the linked bug for
> discussion. 
> 
> You may find more success by setting -march=native too.
> 
> *** This bug has been marked as a duplicate of bug 816975 ***

Why do you think this is a duplicate of bug 816975 ?
I get a completely different error message ...
Comment 14 Joonas Niilola gentoo-dev 2021-12-18 15:36:27 UTC
(In reply to berni.lakeroe from comment #13)
> 
> Why do you think this is a duplicate of bug 816975 ?
> I get a completely different error message ...

I see this, even in your latest build.log:
78[1G[K[34m168:37.61[m [01m[K/var/tmp/portage/www-client/firefox-91.4.0-r1/work/firefox-91.4.0/modules/fdlibm/src/math_private.h:34:21:[m[K [01;31m[Kerror: [m[Kconflicting declaration '[01m[Ktypedef __double_t double_t[m[K'[m
78[1G[K[34m168:37.61[m    34 | typedef __double_t  [01;31m[Kdouble_t[m[K;[m
78[1G[K[34m168:37.61[m       |                     [01;31m[K^~~~~~~~[m[K[m
78[1G[K[34m168:37.61[m In file included from [01m[K/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/cmath:45[m[K,[m
78[1G[K[34m168:37.61[m                  from [01m[K/var/tmp/portage/www-client/firefox-91.4.0-r1/work/firefox_build/dist/system_wrappers/cmath:3[m[K,[m
78[1G[K[34m168:37.61[m                  from [01m[K/var/tmp/portage/www-client/firefox-91.4.0-r1/work/firefox_build/dist/stl_wrappers/cmath:60[m[K,[m
78[1G[K[34m168:37.61[m                  from [01m[K/var/tmp/portage/www-client/firefox-91.4.0-r1/work/firefox-91.4.0/modules/fdlibm/src/e_acos.cpp:41[m[K:[m
78[1G[K[34m168:37.62[m [01m[K/usr/include/math.h:156:21:[m[K [01;36m[Knote: [m[Kprevious declaration as '[01m[Ktypedef long double double_t[m[K'[m
78[1G[K[34m168:37.62[m   156 | typedef long double [01;36m[Kdouble_t[m[K;[m
78[1G[K[34m168:37.62[m       |                     [01;36m[K^~~~~~~~[m[K[m
78[1G[K[34m168:37.86[m gmake[4]: *** [/var/tmp/portage/www-client/firefox-91.4.0-r1/work/firefox-91.4.0/config/rules.mk:675: e_acos.o] Error 1[m

(don't mind the stupid unicode mess)

That was also the exact error in the other bug. Also the provided patch should work for this. 

Anyway, I offered to carry this patch into our firefox release but haven't heard back from our x86 team to test it doesn't break on *real* x86 hw. I guess I should ping them again.
Comment 15 berni.lakeroe 2021-12-18 17:38:53 UTC
Ah I see, I simply overlooked this error and now I know what to do.

Thanks for clarifying things !
Comment 16 berni.lakeroe 2021-12-26 10:38:38 UTC
I can confirm now this is a duplicate of bug 816975.

After changing

typedef double __double_t;

to

#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
typedef long double __double_t;
#else
typedef double __double_t;
#endif

in /var/tmp/portage/www-client/firefox-91.4.0-r1/work/firefox-91.4.0/modules/fdlibm/src/math_private.h

it compiles without issues.

Setting matching CFLAGS and CXXFLAGS, -march=native or -march=i686 and -m32 did not work for me.