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?
Created attachment 897920 [details] emerge --info
Created attachment 897921 [details] Full build log
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.
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.
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
Sorry, it should've been: -fvisibility=hidden -fvisibility-inlines-hidden (small typo)
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*))
Do the patches in https://lore.kernel.org/all/20240904054937.2097000-1-raj.khem@gmail.com/ help?
For information: This is fixed and compiles fine in 128.2.2 version