Closed Bug 1723953 Opened 3 years ago Closed 3 years ago

Build on Linux (any arch) using GCC fails in configure

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr78 unaffected, firefox-esr91 unaffected, firefox90 unaffected, firefox91 unaffected, firefox92 wontfix, firefox93 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox90 --- unaffected
firefox91 --- unaffected
firefox92 --- wontfix
firefox93 --- fixed

People

(Reporter: jseward, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

(w/ apologies for incorrect Product/Component choice; please re-target)

Builds of m-c of one day ago (3 Aug 2021) on Linux, that use GCC, fail in
configure. Mozconfig and config.log are attached. The end of the log is:

0:09.87 checking for new enough STL headers from libstdc++...
 0:09.87 DEBUG: <truncated - see config.log for full output>
 0:09.87 DEBUG: | #endif
 0:09.87 DEBUG: | #if defined(_GLIBCXX_RELEASE)
 0:09.87 DEBUG: | #  if _GLIBCXX_RELEASE < 7
 0:09.87 DEBUG: | #    error libstdc++ not new enough
 0:09.87 DEBUG: | #  else
 0:09.87 DEBUG: |      (void) 0
 0:09.87 DEBUG: | #  endif
 0:09.87 DEBUG: | #endif
 0:09.87 DEBUG: |                   ;
 0:09.87 DEBUG: |                   return 0;
 0:09.87 DEBUG: |                 }
 0:09.87 DEBUG: Executing: `/usr/lib64/ccache/g++ --sysroot /home/sewardj/mozbuild/sysroot-x86_64-linux-gnu -Og -g -std=gnu++17 /tmp/conftest.kfd9m595.cpp -c`
 0:09.87 DEBUG: The command returned non-zero exit status 1.
 0:09.87 DEBUG: Its error output was:
 0:09.87 DEBUG: | In file included from /usr/include/c++/10/cstddef:49,
 0:09.87 DEBUG: |                  from /tmp/conftest.kfd9m595.cpp:1:
 0:09.87 DEBUG: | /usr/include/c++/10/x86_64-redhat-linux/bits/c++config.h:3:10: fatal error: bits/wordsize.h: No such file or directory
 0:09.87 DEBUG: |     3 | #include <bits/wordsize.h>
 0:09.87 DEBUG: |       |          ^~~~~~~~~~~~~~~~~
 0:09.87 DEBUG: | compilation terminated.
 0:09.87 ERROR: The libstdc++ in use is not new enough.  Please run ./mach bootstrap to update your compiler, or update your system libstdc++ installation.
Attached file mozconfig
Attached file config.log

I should add:
Fedora 33, x86_64, gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1)

Assignee: nobody → mh+mozilla
Product: Core → Firefox Build System
Regressed by: 1720806
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1720806

Depends on: 1724372
Depends on: 1724374

While some custom builds of GCC work successfully, system GCC builds
usually don't, because of several factors:

  • they don't use the C++ headers or libstdc++.so from the sysroot
  • they don't necessarily know to use the multiarch directories in the
    sysroot

Why should they use any libstdc++.so files from sysroot? Are those some modified versions for clang?
If they should use those, why are those paths not added to the compiler flags to pick them up?

Sadly, building with clang (12.0.1) errors out too (mozilla/obj-x86_64-pc-linux-gnu/dist/system_wrappers/glibconfig.h:3:15: fatal error: 'glibconfig.h' file not found), so there is no usable way to build right now.

Please file a separate bug for clang, with more information (like the full output from a clobber build)

there is no usable way to build right now.

Try --without-sysroot or --disable-bootstrap

Thanks, but that didn't help clang.

Also the attached gcc patch does not apply properly right now.

(In reply to :aceman from comment #10)

Thanks, but that didn't help clang.

--without-sysroot is currently broken (bug 1723956). --disable-bootstrap should work if you remove ~/.mozbuild/sysroot-x86_64-linux-gnu.

Also the attached gcc patch does not apply properly right now.

The patch doesn't apply because of dependencies.

Please file a separate bug, cf. comment 8.

Depends on: 1724830
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/129bf0e5d3c0
pre: Add min/max to the python configure sandbox. r=firefox-build-system-reviewers,andi
https://hg.mozilla.org/integration/autoland/rev/08ed331bf713
Fix using the bootstrapped sysroot with GCC. r=firefox-build-system-reviewers,andi
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Thanks, that makes the configure pass.
There are still come compile errors (similar to clang) so I hunt those in other bugs.

Thanks

The patch landed in nightly and beta is affected.
:glandium, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(mh+mozilla)
Flags: needinfo?(mh+mozilla)

Thanks, this helped and it seems the upgrade to GCC 11 solved the other issues, the app builds completely now.

Mike, is there way how to backport it to 92? It's blocking all Fedora Firefox builds right now as Fedora uses GCC 11 everywhere.
Thanks.

Flags: needinfo?(mh+mozilla)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #18)

Mike, is there way how to backport it to 92? It's blocking all Fedora Firefox builds right now as Fedora uses GCC 11 everywhere.
Thanks.

It's too late for that, but this bug shouldn't affect you.

Flags: needinfo?(mh+mozilla)

(In reply to Mike Hommey [:glandium] from comment #19)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #18)

Mike, is there way how to backport it to 92? It's blocking all Fedora Firefox builds right now as Fedora uses GCC 11 everywhere.
Thanks.

It's too late for that, but this bug shouldn't affect you.

Unfortunately it does, Firefox 92 can't be built with system GCC 11.
I see the exact error messages from https://bugzilla.mozilla.org/show_bug.cgi?id=1723953#c0
I tried to backport the patches here but it seems to have long list of dependencies - is there a way how to backport it to 92 or perhaps backout Bug 1720806?

Flags: needinfo?(mh+mozilla)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #20)

Unfortunately it does, Firefox 92 can't be built with system GCC 11.
I see the exact error messages from https://bugzilla.mozilla.org/show_bug.cgi?id=1723953#c0
I tried to backport the patches here but it seems to have long list of dependencies - is there a way how to backport it to 92 or perhaps backout Bug 1720806?

Are you manually enabling bootstrap? Is $HOME/.mozbuild non-empty?

Flags: needinfo?(mh+mozilla)

Yes, $HOME/.mozbuild is non-empty as I also use the system to build nightly there. Do you say it will work when I remove ~/.mozbuild ?
I haven't done any changes in Fedora packages build setup so I use the same config as I have for 91.

you might want to peek into the gentoo ebuild+patchset, we don't have any problems building 92.0 with gcc.

Flags: needinfo?(mh+mozilla)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #22)

Yes, $HOME/.mozbuild is non-empty as I also use the system to build nightly there. Do you say it will work when I remove ~/.mozbuild ?

Yes.

Flags: needinfo?(mh+mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: