Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2022 18:11:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 262598] www/firefox www/firefox-esr mail/thunderbird: fix build with libc++ 14
Message-ID:  <bug-262598-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262598

            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/fire=
fox,
www/firefox-esr and mail/thunderbird fail to build when the base system lib=
c++
version is >=3D 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/AccessibleN=
ode.cpp:6:
In file included from
/wrkdirs/usr/ports/www/firefox/work/firefox-97.0/accessible/aom/AccessibleN=
ode.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_er=
ror(
                                                          ^
/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++ libra=
ry
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 compil=
ing
for libc++. (It is likely that it will still work with e.g. GNU libstdc++.)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262598-7788>