=www-client/firefox-132.0.2 does not build with USE=wasm Builds fine without USE=wasm Error log and emerge --info attached. Reproducible: Always
Created attachment 910403 [details] Build log (xz compressed)
Created attachment 910404 [details] emerge --info
Always try without ccache first when the build fails with it.
0:42.20 In file included from Unified_cpp_gfx_graphite2_src0.cpp:29: 0:42.20 In file included from /var/tmp/portage/www-client/firefox-132.0.2/work/firefox-132.0.2/gfx/graphite2/src/Collider.cpp:31: 0:42.20 In file included from /var/tmp/portage/www-client/firefox-132.0.2/work/firefox_build/dist/stl_wrappers/functional:62: 0:42.20 In file included from /usr/include/c++/v1/functional:526: 0:42.21 In file included from /usr/include/c++/v1/__functional/boyer_moore_searcher.h:27: 0:42.21 In file included from /var/tmp/portage/www-client/firefox-132.0.2/work/firefox_build/dist/stl_wrappers/vector:62: 0:42.21 In file included from /usr/include/c++/v1/vector:325: 0:42.21 In file included from /usr/include/c++/v1/__format/formatter_bool.h:20: 0:42.21 In file included from /usr/include/c++/v1/__format/formatter_integral.h:35: 0:42.21 /usr/include/c++/v1/locale:2429:26: error: no member named 'moz_xrealloc' in namespace 'std'; did you mean simply 'moz_xrealloc'? 0:42.21 2429 | _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);
Do you have USE=default-libcxx on sys-devel/clang-common or something?
(In reply to Sam James from comment #5) > Do you have USE=default-libcxx on sys-devel/clang-common or something? Yes, apparently I do.
I'd just suggest not doing that.
(In reply to Sam James from comment #7) > I'd just suggest not doing that. For us few foolish enough to run llvm profiles is there a work around here? sys-devel/clang-common-18.1.8-r3::gentoo USE="cet (default-compiler-rt) (default-libcxx) (default-lld) (llvm-libunwind) -bootstrap-prefix -hardened -verify-sig" I could try setting an profile.env?
If it happens on LLVM profiles too (rather than those mix-and-matching where they're seemingly accidentally using default-libcxx), then it's more interesting, but I don't yet have an answer. Needs investigation.
Created attachment 912207 [details] llvm-profile -default/linux/amd64/23.0/llvm - build.log.bz2 (In reply to Sam James from comment #9) > If it happens on LLVM profiles too (rather than those mix-and-matching where > they're seemingly accidentally using default-libcxx), then it's more > interesting, but I don't yet have an answer. > > Needs investigation. Attached build.log for llvm profile, appears to be the same error 819:12.34 In file included from /usr/include/c++/v1/__format/formatter_integral.h:35: 819:12.34 /usr/include/c++/v1/locale:2429:26: error: no member named 'moz_xrealloc' in namespace 'std'; did you mean simply 'moz_xrealloc'? 819:12.34 2429 | _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap); 819:12.35 | ^~~~~
This is a bundled graphite2 problem. For whatever reason using the system-graphite2 works, however wasm is going to use the bundled one because system-graphite2 can't obviously be rlboxed when compiling Firefox. So to clarify: -system-harfbuzz OR +wasm is broken on llvm profiles due to this issue. Upstream probably doesn't support libc++ so if you find a patch, let me know and it can be added.
There might be a patch on our graphite2 package that fixes libcxx issues, something like https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/graphite2/files/graphite2-1.3.14-fix-nodefaultlibs-deux.patch that could be applied to firefox's bundled graphite2 too. If someone wants to give it a try.
A simple fix: --- a/gfx/graphite2/src/MozGrMalloc.h +++ b/gfx/graphite2/src/MozGrMalloc.h @@ -12,7 +12,7 @@ #include "mozilla/mozalloc.h" -#if defined(XP_LINUX) && !defined(ANDROID) +#if defined(XP_LINUX) && !defined(_LIBCPP_VERSION) #define malloc moz_xmalloc #define calloc moz_xcalloc See also: https://phabricator.services.mozilla.com/D216900 https://bugzilla.mozilla.org/show_bug.cgi?id=1893001