[Bug 262598] www/firefox www/firefox-esr mail/thunderbird: fix build with libc++ 14
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Mar 2022 18:11:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262598 Bug ID: 262598 Summary: www/firefox www/firefox-esr mail/thunderbird: fix build with libc++ 14 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: gecko@FreeBSD.org Reporter: dim@FreeBSD.org Flags: maintainer-feedback?(gecko@FreeBSD.org) Assignee: gecko@FreeBSD.org During an exp-run for llvm 14 (see bug 261742), it turned out that www/firefox, www/firefox-esr and mail/thunderbird fail to build when the base system libc++ version is >= 14: In file included from Unified_cpp_accessible_aom0.cpp:2: In file included from /wrkdirs/usr/ports/www/firefox/work/firefox-97.0/accessible/aom/AccessibleNode.cpp:6: In file included from /wrkdirs/usr/ports/www/firefox/work/firefox-97.0/accessible/aom/AccessibleNode.h:10: In file included from /wrkdirs/usr/ports/www/firefox/work/.build/dist/include/nsTHashMap.h:11: In file included from /wrkdirs/usr/ports/www/firefox/work/.build/dist/include/mozilla/RefPtr.h:13: In file included from /wrkdirs/usr/ports/www/firefox/work/.build/dist/include/mozilla/DbgMacro.h:13: In file included from /wrkdirs/usr/ports/www/firefox/work/.build/dist/include/mozilla/Span.h:30: In file included from /wrkdirs/usr/ports/www/firefox/work/.build/dist/stl_wrappers/string:64: In file included from /wrkdirs/usr/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/usr/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) ^ [... a bunch more of these ...] This is because Mozilla attempts to redefine a number of internal C++ library functions, which was always a little dodgy, but is now broken with libc++ 14 and higher. If propose fixing this by avoiding to redefine those functions, when compiling for libc++. (It is likely that it will still work with e.g. GNU libstdc++.) -- You are receiving this mail because: You are the assignee for the bug.