Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931996 - sys-devel/llvm-18.1.5-r1 - clang -cc1as: fatal error: error in backend: ZMM registers are not supported without EVEX512
Summary: sys-devel/llvm-18.1.5-r1 - clang -cc1as: fatal error: error in backend: ZMM r...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-16 16:32 UTC by Toralf Förster
Modified: 2024-05-17 10:22 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,20.21 KB, text/plain)
2024-05-16 16:32 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,40.65 KB, text/plain)
2024-05-16 16:32 UTC, Toralf Förster
Details
environment (environment,185.29 KB, text/plain)
2024-05-16 16:32 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.19 KB, application/x-xz)
2024-05-16 16:32 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,22.40 KB, application/x-xz)
2024-05-16 16:32 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,101.70 KB, text/plain)
2024-05-16 16:32 UTC, Toralf Förster
Details
sys-devel:llvm-18.1.5-r1:20240516-151454.log (sys-devel:llvm-18.1.5-r1:20240516-151454.log,226.46 KB, text/plain)
2024-05-16 16:32 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,61.74 KB, application/x-xz)
2024-05-16 16:32 UTC, Toralf Förster
Details
var.tmp.clang.tar.xz (var.tmp.clang.tar.xz,3.04 KB, application/x-xz)
2024-05-16 16:32 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-05-16 16:32:47 UTC
too long lines were shrinked:

[152/3498] /var/tmp/portage/sys-devel/llvm-18.1.5-r1/temp/clang-wrappers/clang -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm_build-abi_x86_64.amd64/lib/Support/BLAKE3 -I/var/tmp/portage/sys-devel/llvm-18.1.5-
[153/3498] /var/tmp/portage/sys-devel/llvm-18.1.5-r1/temp/clang-wrappers/clang -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm_build-abi_x86_64.amd64/lib/Support/BLAKE3 -I/var/tmp/portage/sys-devel/llvm-18.1.5-
[154/3498] /var/tmp/portage/sys-devel/llvm-18.1.5-r1/temp/clang-wrappers/clang -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm_build-abi_x86_64.amd64/lib/Support/BLAKE3 -I/var/tmp/portage/sys-devel/llvm-18.1.5-
[155/3498] /var/tmp/portage/sys-devel/llvm-18.1.5-r1/temp/clang-wrappers/clang -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm_build-abi_x86_64.amd64/lib/Support/BLAKE3 -I/var/tmp/portage/sys-devel/llvm-18.1.5-
FAILED: lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o 
/var/tmp/portage/sys-devel/llvm-18.1.5-r1/temp/clang-wrappers/clang -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm_build-abi_x86_64.amd64/lib/Support/BLAKE3 -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llv
clang -cc1as: fatal error: error in backend: ZMM registers are not supported without EVEX512
[156/3498] /var/tmp/portage/sys-devel/llvm-18.1.5-r1/temp/clang-wrappers/clang -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm_build-abi_x86_64.amd64/lib/Support/BLAKE3 -I/var/tmp/portage/sys-devel/llvm-18.1.5-
[157/3498] /usr/lib/llvm/18/bin/clang++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm_build-abi_x86_64.amd64/lib/Support -I/var/tmp/portage/sys-devel/llvm-18.1.5-r1/work/llvm/lib/Support -I/var/tmp/portage/sy

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_desktop-20240515-215004

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-14 *
clang/llvm (if any):
clang version 18.1.5
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/18
18.1.5
Python 3.11.9
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.77.1 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 21.0.3_p9 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-bin-21  system-vm

php cli (if any):
go version go1.22.3 linux/amd64

  HEAD of ::gentoo
commit 408dfda8b9fc4ceaf231f3d7e0565b6ce9d213e2
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu May 16 15:04:03 2024 +0000

    2024-05-16 15:04:01 UTC

emerge -qpvO sys-devel/llvm
Comment 1 Toralf Förster gentoo-dev 2024-05-16 16:32:48 UTC
Created attachment 893058 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-05-16 16:32:49 UTC
Created attachment 893059 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2024-05-16 16:32:50 UTC
Created attachment 893060 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-05-16 16:32:51 UTC
Created attachment 893061 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-05-16 16:32:52 UTC
Created attachment 893062 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-05-16 16:32:54 UTC
Created attachment 893063 [details]
qlist-info.txt
Comment 7 Toralf Förster gentoo-dev 2024-05-16 16:32:55 UTC
Created attachment 893064 [details]
sys-devel:llvm-18.1.5-r1:20240516-151454.log
Comment 8 Toralf Förster gentoo-dev 2024-05-16 16:32:57 UTC
Created attachment 893065 [details]
temp.tar.xz
Comment 9 Toralf Förster gentoo-dev 2024-05-16 16:32:58 UTC
Created attachment 893066 [details]
var.tmp.clang.tar.xz
Comment 10 Joe Kappus 2024-05-17 05:59:34 UTC
Yea so the funny thing about this is the -r1 is supposed to fix this exact bug but if you're already on the non-r1 you'd be building it with a compiler that's already affected.

Add -mevex512 to your CFLAGS for just this package and take it out after. 

The workaround from other ebuilds is below and should be added to multilib_src_configure(): 

        # Workaround for build failure with clang-18 and -march=native without
        # avx512. Does not affect e.g. -march=skylake, only native (bug #931623).
        use amd64 && tc-is-clang && is-flagq -march=native &&
                [[ $(clang-major-version) -ge 18 ]] &&
                tc-cpp-is-true "!defined(__AVX512F__)" ${CXXFLAGS} &&
                append-flags -mevex512
Comment 11 Toralf Förster gentoo-dev 2024-05-17 06:46:26 UTC
Well, I replaced that image.
Thx.
Comment 12 Mike Lothian 2024-05-17 10:22:39 UTC
The bug is actually in 18.1.5, the -r1 fixes it

Build without -march=native, then rebuild with