too long lines were shrinked: [45/51] : && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -O2 -pipe -march=native -fno-diagnostics-color -std=c++14 -fpermissive -fPIC -Wall -Wnon-virtual-dtor -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_c [46/51] /usr/bin/cmake -E cmake_symlink_library lib/libze_null.so.1.16.14 lib/libze_null.so.1 lib/libze_null.so && : [47/51] /usr/bin/x86_64-pc-linux-gnu-g++ -DLOADER_VERSION_MAJOR=1 -DLOADER_VERSION_MINOR=16 -DLOADER_VERSION_PATCH=14 -I/var/tmp/portage/dev-libs/level-zero-1.16.14/work/level-zero-1.16.14/include -I/var/tmp/portage/dev-libs/level-zero-1.16.14/work/level-zero-1.16.14/source/wrapper/include -I/var/tm [48/51] : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fno-diagnostics-color -std=c++14 -fpermissive -fPIC -Wall -Wnon-virtual-dtor -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -rdynamic samples/zello_world/CMakeFiles/zello_world.dir FAILED: bin/zello_world : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fno-diagnostics-color -std=c++14 -fpermissive -fPIC -Wall -Wnon-virtual-dtor -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -rdynamic samples/zello_world/CMakeFiles/zello_world.dir/zello_w /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libze_loader.so.1.16.14: undefined reference to `fmt::v9::detail::throw_format_error(char const*)' /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libze_loader.so.1.16.14: undefined reference to `typeinfo for fmt::v9::format_error' /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libze_loader.so.1.16.14: undefined reference to `fmt::v9::format_error::~format_error()' ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0_desktop_gnome_systemd-20240412-195623 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-14 * clang/llvm (if any): clang version 18.1.3 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.3 Python 3.11.9 Available Ruby profiles: [1] ruby31 (with Rubygems) [2] ruby32 (with Rubygems) [3] ruby33 (with Rubygems) * Available Rust versions: [1] rust-bin-1.77.1 * The following VMs are available for generation-2: 1) Eclipse Temurin JDK 11.0.22_p7 [openjdk-bin-11] 2) Eclipse Temurin JDK 17.0.10_p7 [openjdk-bin-17] *) Eclipse Temurin JDK 21.0.2_p13 [openjdk-bin-21] 4) Eclipse Temurin JDK 8.402_p06 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 [2] openjdk-bin-11 [3] openjdk-bin-17 [4] openjdk-bin-21 system-vm The Glorious Glasgow Haskell Compilation System, version 9.2.8 php cli (if any): [1] php8.1 * [2] php8.3 go version go1.22.2 linux/amd64 HEAD of ::gentoo commit 315dcd49bb18a38761c26d275fafa8c6d3eb64a0 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Wed Apr 17 17:34:19 2024 +0000 2024-04-17 17:34:19 UTC emerge -qpvO dev-libs/level-zero [ebuild N ] dev-libs/level-zero-1.16.14
Created attachment 891002 [details] emerge-info.txt
Created attachment 891003 [details] dev-libs:level-zero-1.16.14:20240417-175422.log
Created attachment 891004 [details] emerge-history.txt
Created attachment 891005 [details] environment
Created attachment 891006 [details] etc.clang.tar.xz
Created attachment 891007 [details] etc.portage.tar.xz
Created attachment 891008 [details] qlist-info.txt.xz
Created attachment 891009 [details] temp.tar.xz
@sam: any idea on this?
(In reply to Conrad Kostecki from comment #9) > @sam: any idea on this? heh, I ended up finding those bug for *another* reason (looking at bug 930199). Sorry, I've been missing pings and stuff a lot the last few weeks as everything is so busy. Now, for the issue itself... the link line doesn't have -lfmt or whatever. fine. But where is the libfmt use even coming from? ``` /var/tmp/portage/dev-libs/level-zero-1.16.14/work $ grep -rsin libfmt /var/tmp/portage/dev-libs/level-zero-1.16.14/work $ grep -rsin fmt grep: level-zero-1.16.14/.git/objects/d4/d5bc76a8f1c873a2dbb2b31a4ecef92a80e862: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/lib/ze_lib.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/loader/linux/loader_init.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/loader/ze_ldrddi.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/loader/ze_loader.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/loader/ze_loader_api.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/loader/zes_ldrddi.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/loader/zet_ldrddi.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/CMakeFiles/ze_loader.dir/loader/zel_tracing_ldrddi.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/layers/validation/CMakeFiles/ze_validation_layer.dir/handle_lifetime_tracking/zes_handle_lifetime.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/layers/validation/CMakeFiles/ze_validation_layer.dir/zet_valddi.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/layers/tracing/CMakeFiles/ze_tracing_layer.dir/ze_trcddi.cpp.o: binary file matches grep: level-zero-1.16.14_build/source/utils/CMakeFiles/utils.dir/logging.cpp.o: binary file matches grep: level-zero-1.16.14_build/samples/zello_world/CMakeFiles/zello_world.dir/zello_world.cpp.o: binary file matches grep: level-zero-1.16.14_build/lib/libutils.a: binary file matches grep: level-zero-1.16.14_build/lib/libze_loader.so.1.16.14: binary file matches grep: level-zero-1.16.14_build/lib/libze_tracing_layer.so.1.16.14: binary file matches grep: level-zero-1.16.14_build/.ninja_deps: binary file matches ``` Checking level-zero's deps, we just have: ``` DEPEND="dev-libs/spdlog:=" ``` and I know that spdlog and libfmt have a relationship (spdlog depends on libfmt). so, my first guess is, we're using spdlog and either not linking against spdlog's libraries at all (I think both spdlog and libfmt might be available as header-only and shared lib versions), or, if we are, we're hardcoding just -lspdlog or w/e and not asking CMake properly.
in fact, I think it really wants to use bundled spdlog, but it's not available in the tarball, but DOESN'T fail on that (???), and then it ends up accidentally using the system copy without any sort of dep information (just via #include)
my total guess is that newer cmake either exposes this as a flaw in the level-zero build (it's suspicious that it doesn't seem to use the right vars for this anyway) and/or it's also a cmake bug (why didn't it fail when fetchcontent failed? or am I just missing how FC works?)
I guess https://github.com/oneapi-src/level-zero/commit/0eda14664e96fe313c7772fe83c95d21a8288823 broke it or made it worse
Created attachment 891182 [details, diff] level-zero-1.16.14-spdlog-libfmt.patch attached level-zero-1.16.14-spdlog-libfmt.patch which WFM, please run with it - thanks!
Thanks sam. I filled an upstream bug for that. Your patch did worked for me, so I will commit that.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8e90cbd18d713cb3e0fa8189cd411ef15b961b2 commit e8e90cbd18d713cb3e0fa8189cd411ef15b961b2 Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2024-04-20 22:00:56 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2024-04-20 22:00:56 +0000 dev-libs/level-zero: fix compilation Closes: https://bugs.gentoo.org/930157 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> .../files/level-zero-1.16.14-spdlog-libfmt.patch | 60 ++++++++++++++++++++++ ...1.16.14.ebuild => level-zero-1.16.14-r1.ebuild} | 8 ++- 2 files changed, 67 insertions(+), 1 deletion(-)