When building mozilla projects such as firefox and thunderbird, when building with clang we hit a bug where the type_traits from libstdc++ cannot be found. This is also an issue when building the bundled mozjs from 0ad.
As a workaround we are using libc++ in firefox and thunderbird currently.
Error message from 0ad
running: "/usr/lib64/ccache/bin/clang++" "-std=gnu++17" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=x86_64-unknown-linux-gnu" "-I/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/system_wrappers" "-include" "/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/config/gcc_hidden.h" "-fstack-protector-strong" "-ftrivial-auto-var-init=pattern" "-DDEBUG=1" "-DEXPORT_JS_API" "-DMOZ_HAS_MOZGLUE" "-I/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/rust" "-I/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src/rust" "-I/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include" "-fPIC" "-DMOZILLA_CLIENT" "-include" "/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src/js-confdefs.h" "-Qunused-arguments" "-Qunused-arguments" "-Wall" "-Wbitfield-enum-conversion" "-Wempty-body" "-Wignored-qualifiers" "-Woverloaded-virtual" "-Wpointer-arith" "-Wshadow-field-in-constructor-modified" "-Wsign-compare" "-Wtype-limits" "-Wunreachable-code" "-Wunreachable-code-return" "-Wwrite-strings" "-Wno-invalid-offsetof" "-Wclass-varargs" "-Wempty-init-stmt" "-Wfloat-overflow-conversion" "-Wfloat-zero-conversion" "-Wloop-analysis" "-Wc++2a-compat" "-Wcomma" "-Wimplicit-fallthrough" "-Wunused-function" "-Wunused-variable" "-Wstring-conversion" "-Wtautological-overlap-compare" "-Wtautological-unsigned-enum-zero-compare" "-Wtautological-unsigned-zero-compare" "-Wno-error=tautological-type-limit-compare" "-Wno-inline-new-delete" "-Wno-error=deprecated-declarations" "-Wno-error=array-bounds" "-Wno-error=backend-plugin" "-Wno-error=free-nonheap-object" "-Wno-error=return-std-move" "-Wno-error=atomic-alignment" "-Wno-error=deprecated-copy" "-Wformat" "-Wformat-security" "-Wno-gnu-zero-variadic-macro-arguments" "-Wno-noexcept-type" "-Wno-unknown-warning-option" "-fno-sized-deallocation" "-fno-aligned-new" "-mtune=generic" "-march=x86-64" "-g2" "-O2" "-fno-plt" "-pipe" "-fPIC" "-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "--param=ssp-buffer-size=32" "-fasynchronous-unwind-tables" "-ftree-vectorize" "-feliminate-unused-debug-types" "-Wall" "-Wno-error" "-Wp,-D_REENTRANT" "-fno-rtti" "-ffunction-sections" "-fdata-sections" "-fno-exceptions" "-fno-math-errno" "-pthread" "-pipe" "-g" "-fno-omit-frame-pointer" "-funwind-tables" "-fexperimental-new-pass-manager" "-DMOZILLA_CONFIG_H" "-I" "/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src" "-I" "/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include" "-DMOZ_HAS_MOZGLUE" "-o" "/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/x86_64-unknown-linux-gnu/debug/build/mozglue-static-f6570a138dd09dff/out/wrappers.o" "-c" "wrappers.cpp" cargo:warning=In file included from wrappers.cpp:11: cargo:warning=In file included from /home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include/mozilla/Assertions.h:418: cargo:warning=/home/build/YPKG/root/0ad/build/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/system_wrappers/type_traits:3:15: fatal error: 'type_traits' file not found cargo:warning=#include_next <type_traits> cargo:warning= ^~~~~~~~~~~~~ cargo:warning=1 error generated. exit status: 1
Similar issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1628567