Created attachment 903106 [details] Build log, with output of emerge --info and emerge -pqv Since Friday (2024-09-13), llvm-18.1.8 does not build on a musl-based Gentoo, which I have used under WSL 2 since February without any problems before. Build logs are attached. The FAILED lines in the main build log all seem related to tablegen generated files for AMDGPU. Switching from r1 to r4 gives the same failure.
Failure looks the same as in bug 939746: [1671/3494] cd /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-.arm64 && /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-.arm64/bin/llvm-tblgen -gen-asm-matcher -I /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target/AMDGPU -I/var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-.arm64/include -I/var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/include -I /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target/AMDGPU/AMDGPU.td --write-if-changed -o lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc -d lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc.d ninja: build stopped: subcommand failed. * ERROR: sys-devel/llvm-18.1.8-r1::gentoo failed (compile phase): * ninja -v -j4 -l4 distribution failed
Created attachment 903112 [details] build.log.tgz
Sorry, I've messed up two browser tabs and uploaded build.log from my bug, but the failure is essentially the same.
Building llvm from llvmorg-18.1.8 tarball on Github (https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz) also fails on the AMDGPU files. It works if only the X86 target is enabled. However, building llvm 19.1.0 (released today), works with all targets enabled.
Now, llvm-19.1.0 is testing on amd64, but many packages do not have the 19 slot.
There's a history of tblgen being miscompiled. But your compiler flags look vanilla to me. Did you change them recently?
Created attachment 903497 [details] (empty)