Message ID | 20250111014408.14204-1-hello@lnikki.la |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DDE5227BBEA; Sat, 11 Jan 2025 01:46:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 44E7727BBE2 for <patchwork@mira.cbaines.net>; Sat, 11 Jan 2025 01:46:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1tWQZf-0006TK-Rk; Fri, 10 Jan 2025 20:46:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tWQZe-0006St-EZ for guix-patches@gnu.org; Fri, 10 Jan 2025 20:46:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tWQZe-0005pb-2O for guix-patches@gnu.org; Fri, 10 Jan 2025 20:46:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=o2pi+ySp9grlrKq+tn+kdI0g22A2tLdvAeVmOuVtB5M=; b=WYQU77a90SWSEVce+kC7k9VXOlI/9yhqV46r0D+cZKTj88e5+agshJvCvpRBgNr+yzl+DD5wuvq2WPl6jYCsWM7vehnBy2J35tTdPKJdMKj34pb4rgGYKc4oJ0tYevyMnLWM76FM3bSZej9Tpiouy2UVUukQi681ooyBWCiGYhg3d7XSTrwV2pJ+U3c+ggP+6APmM9aF3nUQr4o2VSqNIwPNMY01Yr6qXPYyl9KjHyn0Lmlr3VtMwtbIApqFVOd7S4KWjDkEWUpa61fKzF2Zt4xk01I+AKJKxAKj4KNn5vu2gvhrvcbeZbDm1LrNKYHvXXWbGFNPzdNgYrsYnUngwA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tWQZd-0004CC-Sk for guix-patches@gnu.org; Fri, 10 Jan 2025 20:46:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75483] [PATCH] gnu: gcc-4.7: Fix slash in startfile prefix. Resent-From: Leo =?utf-8?q?Nikkil=C3=A4?= <hello@lnikki.la> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Jan 2025 01:46:01 +0000 Resent-Message-ID: <handler.75483.B.173655990715937@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75483 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75483@debbugs.gnu.org Cc: Leo =?utf-8?q?Nikkil=C3=A4?= <hello@lnikki.la> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173655990715937 (code B ref -1); Sat, 11 Jan 2025 01:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jan 2025 01:45:07 +0000 Received: from localhost ([127.0.0.1]:40341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tWQYk-00048X-Rb for submit@debbugs.gnu.org; Fri, 10 Jan 2025 20:45:07 -0500 Received: from lists.gnu.org ([2001:470:142::17]:59446) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <hello@lnikki.la>) id 1tWQYi-00044N-Hg for submit@debbugs.gnu.org; Fri, 10 Jan 2025 20:45:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <hello@lnikki.la>) id 1tWQYc-0006Il-EK for guix-patches@gnu.org; Fri, 10 Jan 2025 20:44:59 -0500 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <hello@lnikki.la>) id 1tWQYa-0005Zu-Fm for guix-patches@gnu.org; Fri, 10 Jan 2025 20:44:58 -0500 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id AA8E411401A7; Fri, 10 Jan 2025 20:44:53 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Fri, 10 Jan 2025 20:44:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lnikki.la; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm3; t=1736559893; x=1736646293; bh=o2pi+ySp9grlrKq+tn+kd I0g22A2tLdvAeVmOuVtB5M=; b=aUFYaiTK1Eq87GsW0ccGYhDvKc1YlA82oSaCO 3zyhlCrnHZ/nKatHBPqxVyAFJ5hufiPyBI5qQZshUQOgmBh/vWWiqo46FOQoYJzw fhxjSKX0tRoHZDp5kwiFs11E7Fn2DJQHRTamrT8PITeQ3dBFZgEFIM5dpe3PNiS6 fijNxTUUGmM7aPLyrj7yQbh54ybSAdSsGoqCqbB6YFFOpoOo87cJjHZSHw3r6AlM Qkl5k23nqdV5CDNFIhIg+LoA4ao0YQTxSE8ZyNG/M9SNPm/Qk0wYdnYpt2M6FbdI lTXigdWr3H/Ty0Egx7jSAfCRA4ztJ2FvOO2yssjiz71cojrqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1736559893; x=1736646293; bh=o2pi+ySp9grlrKq+tn+kdI0g22A2tLdvAeV mOuVtB5M=; b=CufGZbm1Stl4nia1HjufH71LMJ9w4eRJ7yUh5a7kXD+1KjI3cS6 /Ii0A+adnPRx/tynwvEn/+qdbdTThW2wYevW2/JkI95XIAGAuavK0RiMOwCF6Xl+ n+A2z1pnFp0oOqETHN0muCxPpcPxax5LTfeW9G7J2+he7RglECN7FuZwTykg+/ck CiaA8QBIYH+3iarvuBUSeb8QVbiRvCDyAoHrRSofmoLh2VBhdSY0uLikObUeY3Eb nnyMO7IAbsP/zLbY1wawdmt+Zn2s/0IF8BmeDRdXdYk6TKOCsCb8x0dZrYKkqq42 etZhzxZHoNWbL5s+IiQWHoL6TVY+CO7D4fw== X-ME-Sender: <xms:Fc2BZ-tUha9TipsZjuQjzADpIAjhdbv4Udu31gQvzoIBlHD9lT9svA> <xme:Fc2BZzdmquD4CLbvcfY8gCnjwb-sIzGWIY0baxufiyTb_9NLnjNqooyKqLIVthPzH iGfHK5nGJ31naNobmU> X-ME-Received: <xmr:Fc2BZ5xHd6RPtfaZuMjU2TLL4Z2TT77Saszdq7L2_NbnATeKO859fr7O9NetSCPKb8fYWegO3qX1a8_t0SCmz6A81nMyfs9uQ8tpnQ> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudegledgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf ffkffoggfgsedtkeertdertdejnecuhfhrohhmpefnvghoucfpihhkkhhilhomuceohhgv lhhloheslhhnihhkkhhirdhlrgeqnecuggftrfgrthhtvghrnhepleeiffefffejudfhge elheefieehieelvdeuudekgfetvedtffevvdeffedvhedtnecuffhomhgrihhnpehgnhhu rdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh ephhgvlhhloheslhhnihhkkhhirdhlrgdpnhgspghrtghpthhtohepvddpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepghhuihigqdhprghttghhvghssehgnhhurdhorhhgpd hrtghpthhtohephhgvlhhloheslhhnihhkkhhirdhlrg X-ME-Proxy: <xmx:Fc2BZ5MR08Enn0dJB2Zl1ushRWOrvQmVOoJItdOy6D_5gEn1JQYpAg> <xmx:Fc2BZ-9RcBJYy3CbjEEEU8brM3-G8O08jokWVCYkLLluW-RFhF5Dpg> <xmx:Fc2BZxU5qg4zrDiJoa0hGZ4AJsNHlQvc6yq7y0wpp-BzCXFgYU2Fpw> <xmx:Fc2BZ3e9vHW3_ujqavJ71CFkGl7Qu-ey-rno4O8qkgVX0hbJVZuJxQ> <xmx:Fc2BZwIOtCif5QhzsZ9fRAzGiaMDmTAVdVJaKA2qnXtUQN-_lWYMxmPf> Feedback-ID: i41f146a7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Jan 2025 20:44:52 -0500 (EST) Date: Sat, 11 Jan 2025 03:43:57 +0200 Message-ID: <20250111014408.14204-1-hello@lnikki.la> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=202.12.124.149; envelope-from=hello@lnikki.la; helo=fout-b6-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Leo =?utf-8?q?Nikkil=C3=A4?= <hello@lnikki.la> X-ACL-Warn: , =?utf-8?q?Leo_Nikkil=C3=A4_via_Guix-patches?= <guix-patches@gnu.org> From: =?utf-8?q?Leo_Nikkil=C3=A4_via_Guix-patches?= via <guix-patches@gnu.org> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#75483] gnu: gcc-4.7: Fix slash in startfile prefix.
|
|
Commit Message
Leo Nikkilä
Jan. 11, 2025, 1:43 a.m. UTC
These prefixes must have a trailing slash.[0] When this slash is omitted, gcc fails to find ?crt*.o files when LIBRARY_PATH is not set: $ uname -a Linux guix 6.10.14-gnu #1 SMP PREEMPT_DYNAMIC 1 aarch64 GNU/Linux $ guix shell --pure gcc-toolchain -- /bin/sh -c 'LIBRARY_PATH= gcc hello.c' ld: cannot find crt1.o: No such file or directory ld: cannot find crti.o: No such file or directory collect2: error: ld returned 1 exit status I ran into this when building Yocto images in Guix containers, where bitbake resets the environment and expects an FHS system. Looking at `-print-search-dirs', the prefix is definitely present at the end of the startfiles prefixes list[1]: $ guix shell --pure gcc-toolchain -- /bin/sh -c 'LIBRARY_PATH= gcc -print-search-dirs' <...> libraries: <...>:/gnu/store/3gvs8sw95ldfypr1n688svl5brwdmdi9-glibc-2.39/lib However, looking closer with strace, gcc is trying to find crt1.o at `/lib../lib/crt1.o' and `/libcrt1.o', which are paths that have been mangled due to the missing slash: $ guix shell --pure gcc-toolchain strace -- /bin/sh -c 'LIBRARY_PATH= strace -e trace=file gcc hello.c' 2>&1 | grep /gnu/store/3gvs8sw95ldfypr1n688svl5brwdmdi9-glibc-2.39/lib <...> faccessat(AT_FDCWD, "/gnu/store/3gvs8sw95ldfypr1n688svl5brwdmdi9-glibc-2.39/lib../lib/crt1.o", R_OK) = -1 ENOENT (No such file or directory) faccessat(AT_FDCWD, "/gnu/store/3gvs8sw95ldfypr1n688svl5brwdmdi9-glibc-2.39/libcrt1.o", R_OK) = -1 ENOENT (No such file or directory) <...> [0]: <https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/gcc.cc;h=92c92996401005a9ad17fecd1af4385833785cec;hb=HEAD#l1610> [1]: <https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/gcc.cc;h=92c92996401005a9ad17fecd1af4385833785cec;hb=HEAD#l8604> * gnu/packages/gcc.scm (gcc-4.7): Fix replaced startfile prefix. [arguments]: <#:phases>: Fix it. --- gnu/packages/gcc.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 6247919fec..3af2fe5c31 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -285,7 +285,7 @@ (define-public gcc-4.7 \"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a" libc libc libdir suffix)) (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line) - (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\" + (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib/\" #define STANDARD_STARTFILE_PREFIX_2 \"\" ~a" libc line))) @@ -299,7 +299,7 @@ (define-public gcc-4.7 \"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a" libc libc libdir suffix)) (("#define STARTFILE_LINUX_SPEC.*$" line) - (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\" + (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib/\" #define STANDARD_STARTFILE_PREFIX_2 \"\" ~a" libc line))))