Closed Bug 1832708 Opened 2 years ago Closed 2 years ago

error: call to '__throw_out_of_range' is ambiguous

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr102 unaffected, firefox113 unaffected, firefox114 wontfix, firefox115 fixed)

RESOLVED FIXED
115 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox113 --- unaffected
firefox114 --- wontfix
firefox115 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When building with MacOS13.3.sdk, the build fails with errors like:

 0:03.30 /home/glandium/.mozbuild/MacOSX13.3.sdk/usr/include/c++/v1/vector:2319:9: error: call to '__throw_out_of_range' is ambiguous
 0:03.30         _VSTD::__throw_out_of_range("vector");
 0:03.30         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:03.30 /home/glandium/.mozbuild/MacOSX13.3.sdk/usr/include/c++/v1/__config:695:17: note: expanded from macro '_VSTD'
 0:03.30 #  define _VSTD std
 0:03.30                 ^
 0:03.30 /tmp/gecko/obj-x86_64-apple-darwin/dist/include/mozilla/throw_gcc.h:99:59: note: candidate function
 0:03.31 MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range(
 0:03.31                                                           ^
 0:03.31 /home/glandium/.mozbuild/MacOSX13.3.sdk/usr/include/c++/v1/stdexcept:265:6: note: candidate function
 0:03.31 void __throw_out_of_range(const char*__msg)
 0:03.31      ^

This is the same thing that was worked around in bug 1829050.

As of libc++ 14, the functions are defined in the std namespace rather
than std::<something>, which makes them conflict with our wrapping. This
is not a problem on libstdc++ because the functions are defined in the
library itself rather than the headers.

This was the real reason behind the addition of #ifndef wasm ; this
is a more generic fix for the same problem.

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

hey, the fix works on freebsd aswell.
Guessing it would also solve this bug (with the same errormessage) 1754469 ?

Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/ea506df9751c Disable std::__throw_* wrapping on libc++ >= 14.0. r=firefox-build-system-reviewers,andi
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

The patch landed in nightly and beta is affected.
:glandium, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox114 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(mh+mozilla)

Comment on attachment 9333228 [details]
Bug 1832708 - Disable std::_throw* wrapping on libc++ >= 14.0.

Beta/Release Uplift Approval Request

  • User impact if declined: Build failure when using macOS 13.3 SDK
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): As far as our builds are concerned, this is a no-op.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(mh+mozilla)
Attachment #9333228 - Flags: approval-mozilla-beta?

:glandium there is a merge conflict when grafting this to beta, introduced by Bug 1829050.

Flags: needinfo?(mh+mozilla)

Ok, let's wontfix this for beta. It's not worth the bother.

Flags: needinfo?(mh+mozilla)
Attachment #9333228 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: