/usr/bin/x86_64-pc-linux-gnu-ld: bitboard.cpp:(.text+0x274): undefined reference to `__llvm_profile_instrument_memop' /usr/bin/x86_64-pc-linux-gnu-ld: bitboard.cpp:(.text+0x354): undefined reference to `__llvm_profile_instrument_memop' /usr/bin/x86_64-pc-linux-gnu-ld: bitboard.cpp:(.text+0x3fc): undefined reference to `__llvm_profile_instrument_memop' /usr/bin/x86_64-pc-linux-gnu-ld: bitboard.o:bitboard.cpp:(.text+0x4d9): more undefined references to `__llvm_profile_instrument_memop' follow clang-15: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [Makefile:924: stockfish] Error 1 make[2]: Leaving directory '/var/tmp/portage/games-board/stockfish-15-r1/work/Stockfish-sf_15/src' ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_hardened-j4-20221002-140811 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-12.2.0 * clang/llvm (if any): clang version 15.0.1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/15/bin /usr/lib/llvm/15 15.0.1 Python 3.10.7 Available Ruby profiles: [1] ruby27 (with Rubygems) [2] ruby30 (with Rubygems) * Available Rust versions: [1] rust-bin-1.64.0 * The following VMs are available for generation-2: *) Eclipse Temurin JDK 17.0.4.1_p1 [openjdk-bin-17] 2) Eclipse Temurin JDK 8.345_p01 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 [2] openjdk-bin-17 system-vm The Glorious Glasgow Haskell Compilation System, version 9.0.2 php cli (if any): [1] php7.4 * [2] php8.0 [3] php8.1 GNU Make 4.3 HEAD of ::gentoo commit af50553c502d12d3163e7ed114fc3646f1d1afd7 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Mon Oct 3 05:33:59 2022 +0000 2022-10-03 05:33:58 UTC emerge -qpvO games-board/stockfish [ebuild N ] games-board/stockfish-15-r1 USE="optimize -debug -general-32 -general-64" CPU_FLAGS_X86="avx2 popcnt sse"
Created attachment 817378 [details] emerge-info.txt
Created attachment 817381 [details] emerge-history.txt
Created attachment 817384 [details] environment
Created attachment 817387 [details] etc.portage.tar.bz2
Created attachment 817390 [details] games-board:stockfish-15-r1:20221003-070154.log
tinderbox_musl has reproduced this issue with version 15.1 - Updating summary.
clang-lld_tinderbox has reproduced this issue with version 16-r1 - Updating summary.
Created attachment 889021 [details, diff] use not profile-guided build ad-hoc patch
I can confirm same error with clang-17. To make it build (i tested stockfish-15-r1 and stockfish-16.1) I changed build type from "profile-build" to "build" in ebuild file (I attach this patch for these versions). This is not ideal, but at least it allows to build the program. But if you try to clone code from github and build manually with `make profile-build COMP=clang` it builds without problem! Unfortunately, that as far as I could go.