With lld 17, samba-4.19.0 fails to build, in the linking phase. Reproducible: Always Steps to Reproduce: 1. On llvm profile, be on llvm:17 2. Emerge net-fs/samba-4.19.0 Actual Results: ld.lld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined ld.lld: error: version script assignment of 'local' to symbol '__bss_start' failed: symbol not defined ld.lld: error: version script assignment of 'local' to symbol '_edata' failed: symbol not defined clang: error: linker command failed with exit code 1 (use -v to see invocation) Expected Results: Build completes
Created attachment 871689 [details] Build log and emerge --info
Created attachment 871690 [details, diff] For now, this is a workaround.
I can confirm this patch works at samba-4.19.4. Using regular profile with clang as default compiler and lld as default linker
I can confirm this patch still works in net-fs/samba-4.20.0
Hello, I can confirm that this fix is still possible in samba-4.20.2. Here is a way to "apply" the patch without modifying the ebuild or the samba's source code. 1) Create a file in /etc/portage/env/fix-samba-clang (the name of the file is completely optional, but it should be in the /etc/portage/env directory) 2) Inside the file, insert the following line and save the file: LDFLAGS="${LDFLAGS} -Wl,--undefined-version" 3) Add the following line into /etc/portage/package.env file to make samba use the LDFLAGS defined above during emerge: net-fs/samba fix-samba-clang 4) Compile samba -> it should be fine now