On 21 Jan 2025, at 09:07, Andrea Venturoli <m...@netfence.it> wrote: > > FYI. > > I've got a 14.2 poudriere box which builds packages from 2025Q1 for 14.2, > 14.1 and 13.3 (all amd64). > devel/electron32 fails on all versions. > > I think the relevant error is: >> ld.lld: error: >> obj/third_party/rust/cxx/v1/lib/libcxx_lib.rlib(libcxx_lib.cxx.d4a704653401c5cd-cgu.0.rcgu.o): >> Invalid attribute group entry (Producer: 'LLVM19.1.1-rust-1.83.0-stable' >> Reader: 'LLVM 18.1.8') >> clang++: error: linker command failed with exit code 1 (use -v to see >> invocation) > > Full log can be found here, anyway: >> https://www.netfence.it/download/electron32.log > > I had to change "LLVM_DEFAULT= 18" to "LLVM_DEFAULT= 19" in order to be able > to build. > While I don't understand the full details, it works (at least for me).
Every time this happens, something in the ports build is mixing up llvm versions, while attempting to do LTO. That won't work. In this case it looks like rust is built against llvm 19, while the linker is lld 18. Hence switching to lld 19 fixes it. -Dimitry