From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eKapMkZYYWEZfgAAgWs5BA (envelope-from ) for ; Sat, 09 Oct 2021 10:52:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EOxdLUZYYWGiEgAAbx9fmQ (envelope-from ) for ; Sat, 09 Oct 2021 08:52:22 +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 C0BBE1BB0 for ; Sat, 9 Oct 2021 10:52:21 +0200 (CEST) Received: from localhost ([::1]:42200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZ85b-0001Yw-GT for larch@yhetil.org; Sat, 09 Oct 2021 04:52:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZ85N-0001YD-8u for bug-guix@gnu.org; Sat, 09 Oct 2021 04:52:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZ85K-00043f-Ix for bug-guix@gnu.org; Sat, 09 Oct 2021 04:52:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZ85K-0008T2-Fv for bug-guix@gnu.org; Sat, 09 Oct 2021 04:52: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: bug-guix@gnu.org Resent-Date: Sat, 09 Oct 2021 08:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51088 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 51088@debbugs.gnu.org Received: via spool by 51088-submit@debbugs.gnu.org id=B51088.163376949432506 (code B ref 51088); Sat, 09 Oct 2021 08:52:02 +0000 Received: (at 51088) by debbugs.gnu.org; 9 Oct 2021 08:51:34 +0000 Received: from localhost ([127.0.0.1]:52298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZ84r-0008SE-To for submit@debbugs.gnu.org; Sat, 09 Oct 2021 04:51:34 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:40997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZ84q-0008Rt-L3 for 51088@debbugs.gnu.org; Sat, 09 Oct 2021 04:51:33 -0400 IronPort-HdrOrdr: A9a23:GTLBQ6H8r+Sy+d61pLqE0ceALOsnbusQ8zAXPo5KKSC9E/b0qynAppomPHPP4wr5JktLpTnwAsW9qBrnnPZICMsqXItKNzOIhILHFvAA0aLShxnpGyi73OZZ2aBse7M7MdXqEDFB/KTHCXGDYrMd/OU= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="395382663" 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; 09 Oct 2021 10:51:25 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87wnmoadov.fsf@inria.fr> Date: Sat, 09 Oct 2021 10:51:25 +0200 In-Reply-To: <87wnmoadov.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 07 Oct 2021 20:32:16 +0200") Message-ID: <87h7dq37jm.fsf@gnu.org> 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 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=1633769541; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=29N+fn6avjlb/E9lxWpIS0EJ0W6NRsv7ut8VAL1g4KA=; b=o6G/K9zzDYrxTtVvp2J6h2Y+rdXfMxhcMa/eV9eo865yetdWrjRmil0tUcpYELfPc9ihaq GLrig95sGKdf/aiHr/q2GhTzE8pC5HgNoycHS5aZ7qlMNfk2GJjO3QK0aSsEB3kCcaTXOX uoPbDQh0mx91Ri3FpwgvqctcJXKOlXW0tCFuBv1F5PbAFsOT/fkojjutQCRoP9mTywCV/k PIZrKwl7kAhOzdtUEYxPEufVQ107KQBNEMFh/7KEKG6z7Wid2WmMmForlKvyTR6mgBVuiQ HCPXICAk4ijnW6xa9FpK8lL5qc0KlPf8/zuiw55KILW5OHjtYiGFFy1Bt3HeEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633769541; a=rsa-sha256; cv=none; b=gjLeQXuuNQs/KCP120BmU+UsijOJb21sAHQsc+Byc04n4wY8DDEGaUmFwuO9zxFGRmbhNf nywIst/a/oDnRj3/9Q43wXehl001lnbk/xLz5kT9x6Wx0BMhyrOiCksEWvI+g0WIBsuNra 71JD/1q/auioPBL/EjGhWR/pEbxFnZavXZTr4Urnb9mBsBvsU55lnIo3IIK1AH6uFS1yVH DIUt+PBR8koDVS0bg/kygmDEiT5TvBGbDRmHBfNScXA4viO7eL0HZxHCgOpy9kbPaCu2hF M7M+jrGVkYzf3ElloEo/jNQsVFYJstWoF7jz4l9PZ0Fyw0E5x4t1jwc3zi9ppw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: -2.41 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: C0BBE1BB0 X-Spam-Score: -2.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: nrwAbg/uChoe Hi, Ludovic Court=C3=A8s skribis: > clang-toolchain > 6 picks crt*.o from /lib or /lib64 on foreign > distros. Here are runs on a CentOS machine: > > $ 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= _64-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 inv= ocation) This is fixed by these commits: b37fe44b7d gnu: clang@11, clang@12: Do not refer to /lib on foreign distr= os. f1b4f46f0a gnu: clang@10: Do not refer to /lib on foreign distros. 46141bd372 gnu: clang@9: Do not refer to /lib on foreign distros. 66caab54b9 gnu: clang@7, clang@8: Do not refer to /lib on foreign distros. The only remaining FHS thing that shows up in =E2=80=98strace c++ hello.cpp= =E2=80=99 is: stat("/lib/x86_64-linux-gnu", 0x7ffc3a4fc6d0) =3D -1 ENOENT (No such file= or directory) It=E2=80=99s harmless, coming from the somewhat comical =E2=80=98getMultiar= chTriple=E2=80=99 function=C2=B9; excerpt: case llvm::Triple::x86_64: if (IsAndroid) return "x86_64-linux-android"; // We don't want this for x32, otherwise it will match x86_64 libs if (TargetEnvironment !=3D llvm::Triple::GNUX32 && D.getVFS().exists(SysRoot + "/lib/x86_64-linux-gnu")) return "x86_64-linux-gnu"; break; :-) Thanks, Ludo=E2=80=99. =C2=B9 https://github.com/llvm/llvm-project/blob/release/12.x/clang/lib/Dri= ver/ToolChains/Linux.cpp#L40