Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936246 - thunderbird-115.13.0 does not compile with clang18+libcxx18+lld18
Summary: thunderbird-115.13.0 does not compile with clang18+libcxx18+lld18
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-18 09:02 UTC by David Carlos Manuelda
Modified: 2024-08-15 08:05 UTC (History)
7 users (show)

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


Attachments
emerge --info (emergeinfo.txt,21.08 KB, text/plain)
2024-07-18 09:03 UTC, David Carlos Manuelda
Details
Full build log (build.log.xz,465.09 KB, application/x-xz)
2024-07-18 09:04 UTC, David Carlos Manuelda
Details
build.log with -fvisibility=hidden fvisibility-inlines-hidden` (fvisibility=hidden_fvisibility-inlines-hidden_build.log.xz,493.57 KB, application/x-xz)
2024-07-25 17:01 UTC, Frederik Pfautsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2024-07-18 09:02:55 UTC
When trying to compile thunderbird with LLVM profile (slot 18 only), I am getting a lot of undefined references in linkage (with and without LTO) like:

5:38.96 ld.lld: error: undefined hidden symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::assign(char const*)
 5:38.96 >>> referenced by Unified_cpp_linux_launch0.cpp
 5:38.96 >>>               /tmp/portage/mail-client/thunderbird-115.13.0/work/thunderbird_build/toolkit/library/build/../../../security/sandbox/linux/launch/Unified_cpp_linux_launch0.o:(mozilla::SandboxLaunchPrepare(GeckoProcessType, base::LaunchOptions*))
 5:38.96 >>> referenced by Unified_cpp_linux_launch0.cpp
 5:38.96 >>>               /tmp/portage/mail-client/thunderbird-115.13.0/work/thunderbird_build/toolkit/library/build/../../../security/sandbox/linux/launch/Unified_cpp_linux_launch0.o:(mozilla::SandboxLaunchPrepare(GeckoProcessType, base::LaunchOptions*))
 5:38.96 >>> referenced by Unified_cpp_linux_launch0.cpp
 5:38.96 >>>               /tmp/portage/mail-client/thunderbird-115.13.0/work/thunderbird_build/toolkit/library/build/../../../security/sandbox/linux/launch/Unified_cpp_linux_launch0.o:(mozilla::SandboxLaunchPrepare(GeckoProcessType, base::LaunchOptions*))
 5:38.96 >>> referenced 291 more times
 5:38.96 >>> did you mean: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::assign(char const*, unsigned long)
 5:38.96 >>> defined in: /lib/libc++_shared.so

Will attach a full build log, is this probably upstream related to LLVM's libcxx or can something be done here?
Comment 1 David Carlos Manuelda 2024-07-18 09:03:31 UTC
Created attachment 897920 [details]
emerge --info
Comment 2 David Carlos Manuelda 2024-07-18 09:04:28 UTC
Created attachment 897921 [details]
Full build log
Comment 3 Joonas Niilola gentoo-dev 2024-07-19 12:17:40 UTC
It is libcxx related, but I thought this was fixed by:

  0031-bmo-1873379-fix-libc++-18-ignore-tuple-harder.patch

  https://bugzilla.mozilla.org/show_bug.cgi?id=1873379

but I see someone hitting the same issue as you in the bug:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1873379#c9

You / I need to find whether it was patched afterwards and it'd be great if you tested the patch.
Comment 4 Joonas Niilola gentoo-dev 2024-07-19 12:23:13 UTC
https://bugzilla.mozilla.org/show_bug.cgi?id=1874059 this is the bug. There's no solution as it seems it's llvm-related after all:

  https://github.com/llvm/llvm-project/issues/79027

you can try to add '-fvisibility=hidden fvisibility-inlines-hidden' to your CFLAGS if that helps (as hinted in the bug), but I'm not sure how "correct" that fix is.
Comment 5 Frederik Pfautsch 2024-07-25 17:01:40 UTC
Created attachment 898312 [details]
build.log with -fvisibility=hidden fvisibility-inlines-hidden`

Adding `-fvisibility=hidden fvisibility-inlines-hidden` in CFLAGS and CXXFLAGS gives me the following result (still failing), see build.log
Comment 6 Joonas Niilola gentoo-dev 2024-07-30 06:40:27 UTC
Sorry, it should've been:
  -fvisibility=hidden -fvisibility-inlines-hidden

(small typo)
Comment 7 Gino McCarty 2024-08-08 06:20:30 UTC
looks like the same issue, llvm-18 for thunderbird-115.14 as well
profile is 23.0/llvm

f1a40.nserror.42646df832eed6dd-cgu.0.rcgu.o at 96436844)' is 'x86_64-unknown-linux-gnu'
10:35.12 ld.lld: error: undefined hidden symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::append(char const*)
10:35.12 >>> referenced by TranslatorGLSL.cpp
10:35.12 >>>               /var/tmp/portage-ondisk/portage/mail-client/thunderbird-115.14.0/work/thunderbird_build/gfx/angle/targets/translator/libxul.so.lto.TranslatorGLSL.o:(sh::TranslatorGLSL::translate(sh::TIntermBlock*, ShCompileOptions const&, sh::PerformanceDiagnostics*))
10:35.12 >>> referenced by TranslatorGLSL.cpp
10:35.12 >>>               /var/tmp/portage-ondisk/portage/mail-client/thunderbird-115.14.0/work/thunderbird_build/gfx/angle/targets/translator/libxul.so.lto.TranslatorGLSL.o:(sh::TranslatorGLSL::translate(sh::TIntermBlock*, ShCompileOptions const&, sh::PerformanceDiagnostics*))
10:35.12 >>> referenced by TranslatorGLSL.cpp
10:35.12 >>>               /var/tmp/portage-ondisk/portage/mail-client/thunderbird-115.14.0/work/thunderbird_build/gfx/angle/targets/translator/libxul.so.lto.TranslatorGLSL.o:(sh::TranslatorGLSL::translate(sh::TIntermBlock*, ShCompileOptions const&, sh::PerformanceDiagnostics*))
10:35.12 >>> referenced 1452 more times
10:35.12 ld.lld: error: undefined hidden symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::append(char const*, unsigned long)
10:35.12 >>> referenced by TranslatorGLSL.cpp
10:35.12 >>>               /var/tmp/portage-ondisk/portage/mail-client/thunderbird-115.14.0/work/thunderbird_build/gfx/angle/targets/translator/libxul.so.lto.TranslatorGLSL.o:(sh::TranslatorGLSL::translate(sh::TIntermBlock*, ShCompileOptions const&, sh::PerformanceDiagnostics*))
10:35.12 >>> referenced by TranslatorGLSL.cpp
10:35.12 >>>               /var/tmp/portage-ondisk/portage/mail-client/thunderbird-115.14.0/work/thunderbird_build/gfx/angle/targets/translator/libxul.so.lto.TranslatorGLSL.o:(sh::TranslatorGLSL::translate(sh::TIntermBlock*, ShCompileOptions const&, sh::PerformanceDiagnostics*))
10:35.12 >>> referenced by common.cc
10:35.12 >>>               /var/tmp/portage-ondisk/portage/mail-client/thunderbird-115.14.0/work/thunderbird_build/toolkit/components/protobuf/libxul.so.lto.common.o:(google::protobuf::internal::LogMessage::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&))
10:35.12 >>> referenced 351 more times
10:35.12 ld.lld: error: undefined hidden symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
10:35.12 >>> referenced by DirectiveParser.cpp
10:35.12 >>>               /var/tmp/portage-ondisk/portage/mail-client/thunderbird-115.14.0/work/thunderbird_build/gfx/angle/targets/preprocessor/libxul.so.lto.DirectiveParser.o:(angle::pp::DirectiveParser::lex(angle::pp::Token*))