Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927148 - www-client/firefox-123.0.1-r1 fails to build with libcxx 18
Summary: www-client/firefox-123.0.1-r1 fails to build with libcxx 18
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
: 925502 (view as bug list)
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2024-03-16 21:07 UTC by Chris Pritchard
Modified: 2024-03-19 09:44 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix-libcxx-18.patch (file_927148.txt,785 bytes, patch)
2024-03-17 00:32 UTC, Chris Pritchard
Details | Diff
build.log.xz (firefox-build.log.xz,438.85 KB, application/x-xz)
2024-03-17 01:13 UTC, Chris Pritchard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Pritchard 2024-03-16 21:07:23 UTC
Firefox fails to build with libcxx 18, with various hidden symbol errors.

Reproducible: Always

Steps to Reproduce:
1. build firefox with libc++ 18
Comment 1 Chris Pritchard 2024-03-16 21:10:18 UTC
See also llvm bug: https://github.com/llvm/llvm-project/issues/79027
Comment 2 Chris Pritchard 2024-03-17 00:32:58 UTC
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)
Comment 3 Chris Pritchard 2024-03-17 01:13:56 UTC
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.
Comment 4 Joonas Niilola gentoo-dev 2024-03-17 08:14:09 UTC
I'll see about including this in 124.0 which is out next week.
Comment 5 hugegameartgd 2024-03-17 14:54:47 UTC
*** Bug 925502 has been marked as a duplicate of this bug. ***
Comment 6 hugegameartgd 2024-03-17 15:02:48 UTC
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.
Comment 7 Larry the Git Cow gentoo-dev 2024-03-19 09:44:47 UTC
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(+)