From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 7HtfKm49X2EIoAAAgWs5BA (envelope-from ) for ; Thu, 07 Oct 2021 20:33:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OMVGJW49X2GHXAAA1q6Kng (envelope-from ) for ; Thu, 07 Oct 2021 18:33:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D4D7F1134A for ; Thu, 7 Oct 2021 20:33:13 +0200 (CEST) Received: from localhost ([::1]:46830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYYCe-0008Ot-HR for larch@yhetil.org; Thu, 07 Oct 2021 14:33:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYYCU-0008Oi-Ob for bug-guix@gnu.org; Thu, 07 Oct 2021 14:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYYCU-0006Jv-GX for bug-guix@gnu.org; Thu, 07 Oct 2021 14:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYYCU-0008IH-5T; Thu, 07 Oct 2021 14:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51088: clang-toolchain > 6 refers to /lib on foreign distros Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: emmanuel.agullo@inria.fr, bug-guix@gnu.org Resent-Date: Thu, 07 Oct 2021 18:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51088 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 51088@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org X-Debbugs-Original-Xcc: emmanuel.agullo@inria.fr Received: via spool by submit@debbugs.gnu.org id=B.163363154831838 (code B ref -1); Thu, 07 Oct 2021 18:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Oct 2021 18:32:28 +0000 Received: from localhost ([127.0.0.1]:48428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYBw-0008HS-2J for submit@debbugs.gnu.org; Thu, 07 Oct 2021 14:32:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:50238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYBs-0008HJ-ST for submit@debbugs.gnu.org; Thu, 07 Oct 2021 14:32:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYYBs-0008N2-MA for bug-guix@gnu.org; Thu, 07 Oct 2021 14:32:24 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:40962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYYBp-0005jy-7q for bug-guix@gnu.org; Thu, 07 Oct 2021 14:32:23 -0400 IronPort-HdrOrdr: A9a23:qWpF5KCGHHUDfJLlHelO55DYdb4zR+YMi2TDsHoBMSC9E/bo7vxG885rsCMc5Ax7ZJhCo6HnBEDjewK5yXcd2+B4AV7IZmTbUQWTRr2KobGSpAHIKmnS+uVXyal7N4J1YeedMXFKyeDBiTPIceoI8Z2/3pntqufYwXt3VBprbLwI1XYbNi+rVnRZfU1lCYpRLvqhz/sCnhSYPVYafoCaKxA+PtTrlpnxmI3hZAIaBxgh4BKfyR6h9bKSKXal9yZbbwhrqI1MzVT4 X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="395244084" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 20:32:17 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 =?UTF-8?Q?Vend=C3=A9miaire?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 07 Oct 2021 20:32:16 +0200 Message-ID: <87wnmoadov.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.104; envelope-from=ludovic.courtes@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emmanuel.agullo@inria.fr Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633631594; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CzB2qqQBMsI/qKJyG9NsQ4LSLLZdcny0tr8Wq/klF1k=; b=P41q6+9Lm81PbviQq+GZaMwQu6wTxD7uMKowfQSmXGFTT7RjCz7WLVnY48AXjgcZ2zu6Ih BWL1PuVvYvJyrX94evRm2yNkVVXv9scFEod6y0gOEyfBgFjNJ8rHKFeDBsfSlj2f4zuiKS GXyfA9yNXVTkR69ztV1Y0WUMCWrKQ+Cd/c3XpzrP4h6ePOwRyAzEBBk6VUurZpecc7d4nA tXSIEJC2lDqTYDyylsZLns6PZ7XOHv09U0Jlchh3e0r4vviR8H+NMAh0UrcsNHcb/i5ePT zdqWpf/1z3brRaL5DuuGY/sqKSXh28WsmSJiFcxf1/KGxQBY6Dh3OPCI28HZGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633631594; a=rsa-sha256; cv=none; b=lcZ4nO7DhVXEDN46IfK1XS6AHCYADsLh0NEFfD6ggGIPRiF1z2/ZFJ/COZnlaweg6S+Geu tPgGEHOiz67K9TmuK/hetn+ileVX5I3So17VMCOx/y2RlkqJAWOa7SFjFZyq72XRTJxem/ N3u1G1mVTR278TYNIcbsQddZG/uqFyzt6RSCykO2maxPUyTpQZQNXzLN1YilGjKQWfbzc/ jYvJ49t/NcnAxebAlxdzSEnhtCnKkuYoW3WtXmqSOIAcVL98OT+TLPEmWbovDumD+JkjCz yEV5tRhmCwEHUjzVTEPFR1o8aQdUHKCIwKiKL6d72Kzd0pN4EXxAYx3+58a6Ww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -0.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: D4D7F1134A X-Spam-Score: -0.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZUJeZS1NS7pE clang-toolchain > 6 picks crt*.o from /lib or /lib64 on foreign distros. Here are runs on a CentOS machine: --8<---------------cut here---------------start------------->8--- $ guix environment --pure --ad-hoc clang-toolchain@6 -- c++ hello.cpp $ echo $? 0 $ guix environment --pure --ad-hoc clang-toolchain@7 -- c++ hello.cpp ld: /gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib/gcc/x86_6= 4-unknown-linux-gnu/7.5.0/../../../libstdc++.so: undefined reference to `__= cxa_thread_atexit_impl@GLIBC_2.18' clang-7: error: linker command failed with exit code 1 (use -v to see invoc= ation) $ echo $? 1 $ guix environment --pure --ad-hoc clang-toolchain@12 -- c++ hello.cpp ld: /gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib/gcc/x86_6= 4-unknown-linux-gnu/7.5.0/../../../libstdc++.so: undefined reference to `__= cxa_thread_atexit_impl@GLIBC_2.18' clang-12: error: linker command failed with exit code 1 (use -v to see invo= cation) $ guix environment --pure --ad-hoc clang-toolchain@12 -- c++ -v hello.cpp clang version 12.0.0 Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /gnu/store/vgsb018grjlhhb2gjkb3gyfm5w7mx9mx-profile/bin Found candidate GCC installation: /gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbd= b2-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0 Selected GCC installation: /gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-= 7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0 Candidate multilib: .;@m64 Selected multilib: .;@m64 Found CUDA installation: /usr/local/cuda, version 10.0 "/gnu/store/vn69pklab842xyig8d0c6xq6s9iyqhl0-clang-12.0.0/bin/clang-12" -c= c1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocati= ons -disable-free -disable-llvm-verifier -discard-value-names -main-file-na= me hello.cpp -mrelocation-model static -mframe-pointer=3Dall -fmath-errno -= fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 = -tune-cpu generic -fno-split-dwarf-inlining -debugger-tuning=3Dgdb -v -reso= urce-dir /gnu/store/vn69pklab842xyig8d0c6xq6s9iyqhl0-clang-12.0.0/lib/clang= /12.0.0 -c-isystem /gnu/store/vgsb018grjlhhb2gjkb3gyfm5w7mx9mx-profile/incl= ude -cxx-isystem /gnu/store/vgsb018grjlhhb2gjkb3gyfm5w7mx9mx-profile/includ= e -internal-isystem /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/i= nclude/c++ -internal-isystem /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gc= c-7.5.0/include/c++/x86_64-unknown-linux-gnu -internal-isystem /gnu/store/r= n75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include/c++/backward -internal-is= ystem /usr/local/include -internal-isystem /gnu/store/vn69pklab842xyig8d0c6= xq6s9iyqhl0-clang-12.0.0/lib/clang/12.0.0/include -internal-externc-isystem= /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include -fdeprecate= d-macro -fdebug-compilation-dir /home/courtes -ferror-limit 19 -fgnuc-versi= on=3D4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -o /= tmp/hello-7b344d.o -x c++ hello.cpp clang -cc1 version 12.0.0 based upon LLVM 12.0.0 default target x86_64-unkn= own-linux-gnu #include "..." search starts here: #include <...> search starts here: /gnu/store/vgsb018grjlhhb2gjkb3gyfm5w7mx9mx-profile/include /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include/c++ /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include/c++/x86_64-u= nknown-linux-gnu /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include/c++/backward /usr/local/include /gnu/store/vn69pklab842xyig8d0c6xq6s9iyqhl0-clang-12.0.0/lib/clang/12.0.0/= include /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include End of search list. "/gnu/store/vgsb018grjlhhb2gjkb3gyfm5w7mx9mx-profile/bin/ld" --eh-frame-hd= r -m elf_x86_64 -dynamic-linker //gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0c= r-glibc-2.31/lib/ld-linux-x86-64.so.2 -o a.out /lib/../lib64/crt1.o /lib/..= /lib64/crti.o /gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib= /gcc/x86_64-unknown-linux-gnu/7.5.0/crtbegin.o -L/gnu/store/f0ca0lf64bw08sr= v1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0 -L/l= ib/../lib64 -L/gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib= /gcc/x86_64-unknown-linux-gnu/7.5.0/../../.. -L/gnu/store/vn69pklab842xyig8= d0c6xq6s9iyqhl0-clang-12.0.0/bin/../lib -L/gnu/store/fa6wj5bxkj5ll1d7292a70= knmyl7a0cr-glibc-2.31/lib -L/gnu/store/vgsb018grjlhhb2gjkb3gyfm5w7mx9mx-pro= file/lib /tmp/hello-7b344d.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /= gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib/gcc/x86_64-unk= nown-linux-gnu/7.5.0/crtend.o /lib/../lib64/crtn.o ld: /gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib/gcc/x86_6= 4-unknown-linux-gnu/7.5.0/../../../libstdc++.so: undefined reference to `__= cxa_thread_atexit_impl@GLIBC_2.18' clang-12: error: linker command failed with exit code 1 (use -v to see invo= cation) --8<---------------cut here---------------end--------------->8--- Notice =E2=80=98/lib/../lib64/crt1.o=E2=80=99 etc. above. This suggests that =E2=80=98clang-11.0-libc-search-path.patch=E2=80=99 & co= . aren=E2=80=99t sufficient any longer. =E2=80=98strace=E2=80=99 shows that =E2=80=98c++=E2=80=99 goes through sequ= ences like this one: --8<---------------cut here---------------start------------->8--- access("/gnu/store/vn69pklab842xyig8d0c6xq6s9iyqhl0-clang-12.0.0/lib/clang/= 12.0.0/crt1.o", F_OK) =3D -1 ENOENT (No such f ile or directory) access("/gnu/store/nzfhh1rm85lx2p5plbx45qqj82pcv5hp-clang-runtime-12.0.0/li= b/linux/crt1.o", F_OK) =3D -1 ENOENT (No such=20 file or directory) access("/gnu/store/vn69pklab842xyig8d0c6xq6s9iyqhl0-clang-12.0.0/bin/../crt= 1.o", F_OK) =3D -1 ENOENT (No such file or dir ectory) access("/gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0-lib/lib/gcc/x= 86_64-unknown-linux-gnu/7.5.0/crt1.o", F_OK) =3D -1 ENOENT (No such file or directory) access("/lib/../lib64/crt1.o", F_OK) =3D 0 --8<---------------cut here---------------end--------------->8--- To be continued=E2=80=A6 Ludo=E2=80=99.