Open Bug 1754469 Opened 4 years ago Updated 3 years ago

throw_gcc.h wrappers causing trouble with libc++ 14

Categories

(Firefox Build System :: General: Unsupported Platforms, defect, P5)

Firefox 97
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: dimitry, Unassigned)

References

Details

Steps to reproduce:

Building the FreeBSD www/firefox port (which is at 97.0) against libc++ 14 (due to be released soon), runs into trouble with the throw_gcc.h wrappers __throw_length_error and __throw_out_of_range:

In file included from Unified_cpp_accessible_base0.cpp:2:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/firefox-97.0/accessible/base/ARIAMap.cpp:8:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/firefox-97.0/accessible/base/ARIAMap.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsAtom.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsISupports.h:82:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsISupportsUtils.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsDebug.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/mozilla/DbgMacro.h:13:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/mozilla/Span.h:30:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/stl_wrappers/string:64:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/system_wrappers/string:3:
/usr/include/c++/v1/string:1721:9: error: call to '__throw_length_error' is ambiguous
_VSTD::__throw_length_error("basic_string");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__config:824:15: note: expanded from macro '_VSTD'
#define _VSTD std
^
/wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/mozilla/throw_gcc.h:92:59: note: candidate function
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_length_error(
^
/usr/include/c++/v1/stdexcept:253:6: note: candidate function
void __throw_length_error(const char*__msg)
^
In file included from Unified_cpp_accessible_base0.cpp:2:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/firefox-97.0/accessible/base/ARIAMap.cpp:8:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/firefox-97.0/accessible/base/ARIAMap.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsAtom.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsISupports.h:82:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsISupportsUtils.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/nsDebug.h:15:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/mozilla/DbgMacro.h:13:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/mozilla/Span.h:30:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/stl_wrappers/string:64:
In file included from /wrkdirs/share/dim/ports/www/firefox/work/.build/dist/system_wrappers/string:3:
/usr/include/c++/v1/string:1726:9: error: call to '__throw_out_of_range' is ambiguous
_VSTD::__throw_out_of_range("basic_string");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__config:824:15: note: expanded from macro '_VSTD'
#define _VSTD std
^
/wrkdirs/share/dim/ports/www/firefox/work/.build/dist/include/mozilla/throw_gcc.h:97:59: note: candidate function
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range(
^
/usr/include/c++/v1/stdexcept:264:6: note: candidate function
void __throw_out_of_range(const char*__msg)
^

Currently I'm not sure what to do about this, except #ifdef out the mozilla wrappers, as the libc++ headers no longer have the possibility to remove or rename its own inline implementations from <stdexcept>.

The Bugbug bot thinks this bug should belong to the 'Core::Disability Access APIs' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Disability Access APIs
Product: Firefox → Core

Note that the incompatibility was probably introduced with https://github.com/llvm/llvm-project/commit/453620f55ea38186cdf165b1ca2deb6c6b226132 ("[libc++] Make _VSTD and alias for std") and its follow-up https://github.com/llvm/llvm-project/commit/5173f43cc892539271c34c5612fe783b51025da9 ("[libc++] Remove the std::string base class").

Not sure if this is the right component, but it should be closer.

Component: Disability Access APIs → Toolchains
Product: Core → Firefox Build System

this patch from freebsd ports does fix this issue, but the build errors out with the problem stated in bug 1761560 next.

Component: Toolchains → General: Unsupported Platforms

The severity field is not set for this bug.
:ahochheiden, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahochheiden)
Severity: -- → S4
Flags: needinfo?(ahochheiden)
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.