Created attachment 867748 [details] /var/tmp/portage/dev-cpp/tbb-2021.9.0/temp/build.log TBB fails to build with llvm 18.0.0.9999 and lld. I also have enabled libc++/compiler-rt/llvm-libunwind globally. Here is an example of the errors in the build.log attached: ld.lld: error: version script assignment of 'local' to symbol 'TBB_runtime_interface_version' failed: symbol not defined ld.lld: error: version script assignment of 'local' to symbol 'get_memcpy_largest_cachelinesize' failed: symbol not defined I'm not sure if this is related but I cannot seem to build SDL3 manually using cmake with the same llvm version because it fails to detect version script support in the compiler - requiring a patch to the SDL3 CMakeLists.txt file.
Please consider testing with LLVM 17 until it's released (ideally until LLVM 17.0.6 or so, i.e. until LLVM 17's stable branch is closed) given we really want to make sure it's in a good state, especially as upstream don't maintain the stable branch for long, then moving to 18. But of course you're free to use what you want too. Please also include emerge --info for completeness. Anyway, in this case, this is indeed the default change in lld 17 for -Wl,--no-undefined-symbols. Could you report that upstream to TBB and link it here? Thanks!
Small chance that https://github.com/oneapi-src/oneTBB/pull/1114 fixes it.
(In reply to Sam James from comment #1) > Please consider testing with LLVM 17 until it's released (ideally until LLVM > 17.0.6 or so, i.e. until LLVM 17's stable branch is closed) given we really > want to make sure it's in a good state, especially as upstream don't > maintain the stable branch for long, then moving to 18. But of course you're > free to use what you want too. > > Please also include emerge --info for completeness. > > Anyway, in this case, this is indeed the default change in lld 17 for > -Wl,--no-undefined-symbols. Could you report that upstream to TBB and link > it here? Thanks! I just tested =dev-cpp/tbb-2021.10.0 it with LLVM 17.0.0._rc3 on ~arm64 using LDFLAGS="${LDFLAGS} -Wl,--undefined-version" via package.env - interestingly did let it merge.
(In reply to Stuart Meya from comment #3) > (In reply to Sam James from comment #1) > > Please consider testing with LLVM 17 until it's released (ideally until LLVM > > 17.0.6 or so, i.e. until LLVM 17's stable branch is closed) given we really > > want to make sure it's in a good state, especially as upstream don't > > maintain the stable branch for long, then moving to 18. But of course you're > > free to use what you want too. > > > > Please also include emerge --info for completeness. > > > > Anyway, in this case, this is indeed the default change in lld 17 for > > -Wl,--no-undefined-symbols. Could you report that upstream to TBB and link > > it here? Thanks! > > I just tested =dev-cpp/tbb-2021.10.0 it with LLVM 17.0.0._rc3 on ~arm64 > using LDFLAGS="${LDFLAGS} -Wl,--undefined-version" via package.env - > interestingly did let it merge. Ok, my original target was to emerge dev-cpp/tbb to get mold running on the LLVM profile, but emerging mold using mold itself (LDFLAGS="${LDFLAGS} -fuse-ld=mold" in make.conf) produced the following outcome: -- Check for working C compiler: /usr/lib/llvm/17/bin/clang - broken CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message): The C compiler "/usr/lib/llvm/17/bin/clang" is not able to compile a simple test program. It fails with the following output: Change Dir: '/var/tmp/portage/sys-devel/mold-2.1.0/work/mold-2.1.0_build/CMakeFiles/CMakeScratch/TryCompile-xSDhCX' Run Build Command(s): /usr/bin/ninja -v cmTC_0ed9c [1/2] /usr/lib/llvm/17/bin/clang -O3 -pipe -flto=thin -MD -MT CMakeFiles/cmTC_0ed9c.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_0ed9c.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_0ed9c.dir/testCCompiler.c.o -c /var/tmp/portage/sys-devel/mold-2.1.0/work/mold-2.1.0_build/CMakeFiles/CMakeScratch/TryCompile-xSDhCX/testCCompiler.c [2/2] : && /usr/lib/llvm/17/bin/clang -O3 -pipe -flto=thin -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -fuse-ld=mold CMakeFiles/cmTC_0ed9c.dir/testCCompiler.c.o -o cmTC_0ed9c && : FAILED: cmTC_0ed9c: && /usr/lib/llvm/17/bin/clang -O3 -pipe -flto=thin -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -fuse-ld=mold CMakeFiles/cmTC_0ed9c.dir/testCCompiler.c.o -o cmTC_0ed9c && :mold: fatal: could not open plugin file: /usr/lib/llvm/17/bin/../lib64/LLVMgold.so: cannot open shared object file: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. I'll add emerge --info etc. Greetings
Created attachment 869065 [details] emerge --info '=sys-devel/mold-2.1.0::gentoo'
Created attachment 869066 [details] emerge -pqv '=sys-devel/mold-2.1.0::gentoo'
Created attachment 869067 [details] /var/tmp/portage/sys-devel/mold-2.1.0/temp/build.log
Not any better with tbb-2021.11.0.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02d9351d758b8e0e604e347f6068bcbb3c8f8f03 commit 02d9351d758b8e0e604e347f6068bcbb3c8f8f03 Author: Sv. Lockal <lockalsash@gmail.com> AuthorDate: 2024-01-27 19:49:15 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-28 22:13:41 +0000 dev-cpp/tbb: fix build with ld.lld (error: version script assignment of 'local' to symbol ...) Closes: https://bugs.gentoo.org/912210 Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35048 Signed-off-by: Sam James <sam@gentoo.org> dev-cpp/tbb/tbb-2020.3.ebuild | 7 +++++-- dev-cpp/tbb/tbb-2021.10.0.ebuild | 7 +++++-- dev-cpp/tbb/tbb-2021.11.0.ebuild | 7 +++++-- dev-cpp/tbb/tbb-2021.5.0-r1.ebuild | 10 ++++++++-- dev-cpp/tbb/tbb-2021.7.0-r1.ebuild | 7 +++++-- dev-cpp/tbb/tbb-2021.7.0.ebuild | 5 ++++- dev-cpp/tbb/tbb-2021.8.0.ebuild | 7 +++++-- dev-cpp/tbb/tbb-2021.9.0.ebuild | 7 +++++-- 8 files changed, 42 insertions(+), 15 deletions(-)