too long lines were shrinked: clang -DHAVE_CONFIG_H -I. -I../../.. -DCPU_FLAGS="" -I/var/tmp/portage/sys-cluster/ucx-1.13.1/work/ucx-1.13.1/src -I/var/tmp/portage/sys-cluster/ucx-1.13.1/work/ucx-1.13.1 -I/var/tmp/portage/sys-cluster/ucx-1.13.1/work/ucx-1.13.1/src -g -Wall -funwind-tables -Wno-missing-field-initializers -Wno-u /bin/sh ../../../libtool --tag=CC --mode=link clang -g -Wall -funwind-tables -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch -Wno-pointer-sign -Werror-implicit-func libtool: link: clang -g -Wall -funwind-tables -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch -Wno-pointer-sign -Werror-implicit-function-declaration -Wno-format-zero- /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: lib/.libs/libucxperf.a(libucxperf_la-ucp_tests.o): in function `ucp_perf_test_runner<(ucx_perf_cmd_t)1, (ucx_perf_test_type_t)0, 4u>::ucp_perf_test_prepare_iov_buffers()': <unknown>:663: undefined reference to `__kmpc_global_thread_num' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: lib/.libs/libucxperf.a(libucxperf_la-ucp_tests.o): in function `ucp_perf_test_runner<(ucx_perf_cmd_t)1, (ucx_perf_test_type_t)0, 4u>::create_iov_buffer(ucp_dt_iov*, void*)': /var/tmp/portage/sys-cluster/ucx-1.13.1/work/ucx-1.13.1/src/tools/perf/lib/./libperf_int.h:191: undefined reference to `__kmpc_barrier' ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_systemd-j4-20221124-030016 ------------------------------------------------------------------- CC=clang CXX=clang++ gcc-config -l: [1] x86_64-pc-linux-gnu-12 * clang/llvm (if any): clang version 15.0.5 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/15/bin Configuration file: /etc/clang/clang.cfg /usr/lib/llvm/15 15.0.5 Python 3.10.8 Available Ruby profiles: (none found) Available Rust versions: [1] rust-bin-1.65.0 * The Glorious Glasgow Haskell Compilation System, version 9.0.2 php cli (if any): HEAD of ::gentoo commit c0944ed7ad1099517efd4896617583f0a3d31f17 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Thu Nov 24 20:02:03 2022 +0000 2022-11-24 20:02:02 UTC emerge -qpvO sys-cluster/ucx [ebuild N ] sys-cluster/ucx-1.13.1 USE="numa openmp"
Created attachment 836549 [details] emerge-info.txt
Created attachment 836551 [details] emerge-history.txt
Created attachment 836553 [details] environment
Created attachment 836555 [details] etc.clang.tar.bz2
Created attachment 836557 [details] etc.portage.tar.bz2
Created attachment 836559 [details] logs.tar.bz2
Created attachment 836561 [details] sys-cluster:ucx-1.13.1:20221124-205209.log.bz2
Created attachment 836563 [details] temp.tar.bz2
Created attachment 836565 [details] var.tmp.clang.tar.bz2
can't reproduce this at first. after download etc.portage.tar.bz2, problem reproduced, but it's weired, ... then check /etc/portage/bashrc, after many test and print debug, it turns out to be a bug of /etc/portge/bashrc? > if [[ -n \${PORTAGE_USE_CLANG_HOOK_GCC} ]] ; then > real_compiler="${BROOT:-/}"/usr/bin/${CHOST}-gcc > fi here, if var PORTAGE_USE_CLAN_HOOK_GCC (-n test length obly) exist, real_compiler will be gcc always, in /etc/portage/make.conf: > PORTAGE_USE_CLANG_HOOK_GCC=1 despite CC is clang, real compiler is gcc always. If gcc is used always, should have no problem. But > /bin/sh ../../../../libtool --tag=CXX --mode=link clang++ -g -Wall -funwind-tables -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch -fopenmp -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -nostdlib -fno-exceptions -fno-rtti -std=c++11 -fopenmp -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -o libucxperf.la libucxperf_la-libperf.lo libucxperf_la-libperf_memory.lo libucxperf_la-libperf_thread.lo libucxperf_la-uct_tests.lo libucxperf_la-ucp_tests.lo /var/tmp/portage/sys-cluster/ucx-1.13.1/work/ucx-1.13.1/src/uct/libuct.la /var/tmp/portage/sys-cluster/ucx-1.13.1/work/ucx-1.13.1/src/ucp/libucp.la /var/tmp/portage/sys-cluster/ucx-1.13.1/work/ucx-1.13.1/src/ucs/libucs.la -lrt -lrt clang++ is used, and clang++ is not wrapped. -nostdlib is provided which will cause -lomp not added automatically. finally, gcc was called as link, w/o -lomp (it clang's openmp) of course, so cause this bug. if PORTAGE_USE_CLANG_HOOK_GCC is commented, clang will be used always, build will be fine, because link is called with -fopen, so -lomp will be added automatically. Any problem with this analysis?