Firefox fails to build with libcxx 18, with various hidden symbol errors. Reproducible: Always Steps to Reproduce: 1. build firefox with libc++ 18
See also llvm bug: https://github.com/llvm/llvm-project/issues/79027
Created attachment 887781 [details, diff] fix-libcxx-18.patch I've made a patch based on the freeBSD solution as mentioned on the upstream bug report, instead of using the gcc_hidden.h file, the "-fvisibility=hidden", "-fvisibility-inlines-hidden" CFLAGS are used instead when the compiler is clang and it's greater than version 17. This is a bit of a workaround until an upstream solution is identified (I tried looking into the suggestion of checking via the "does this compiler flag work" mechanism, and I couldn't get my head around the mozilla build system in a reasonable timeframe)
Created attachment 887782 [details] build.log.xz build.log - without the patch applied Firefox builds and runs with the attached patch applied as a user patch.
I'll see about including this in 124.0 which is out next week.
*** Bug 925502 has been marked as a duplicate of this bug. ***
I think the patch `fix-libcxx-18.patch` might not work when building firefox with Clang <= 16 (LLVM Slot 16) and libc++ >= 18 as the if condition checks for the current C compiler version.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0140e8055efe738995965ccaad8b9948f2a601a4 commit 0140e8055efe738995965ccaad8b9948f2a601a4 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2024-03-19 09:41:07 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2024-03-19 09:44:43 +0000 www-client/firefox: add 124.0 - include libcxx-18 patches, although llvm_slot_18 is still masked so couldn't test that, - rebase some patches (like always), - update, simplify and combine sandbox addpredict conditions with +pgo. Closes: https://bugs.gentoo.org/927148 Closes: https://bugs.gentoo.org/917694 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 101 +++ www-client/firefox/firefox-124.0.ebuild | 1425 +++++++++++++++++++++++++++++++ 2 files changed, 1526 insertions(+)