From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WIpzCRKv22UjbQAAqHPOHw:P1 (envelope-from ) for ; Sun, 25 Feb 2024 22:20:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WIpzCRKv22UjbQAAqHPOHw (envelope-from ) for ; Sun, 25 Feb 2024 22:20:18 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="H8SmUf/d"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708896018; 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:dkim-signature; bh=szz3EFQQUO6kJPWR7IBElWgNnYesthDRVLTFewA0l/c=; b=Hc98F9rfrUjY9OE5NQY7LRGj47MiqUNhe1kE+/t6IwEErcT8vh8gN3xSqTydWSRJHnlgy6 IUEP5gmyXjnHYwuQZ40c1vfqJTkOwX5j8fJ9jyHYSZMVzsHXSnZrAYDfILoMyNhZRXbE0x SyGSIQ01TxxOh6Yd7h9SmA3U7ZqsKXf85xLkGfSMmC7iou7hw/Op6nHiJRHC9GKpqNaKun fd/1C9+4YIriW1VTl3yyfl4CFw77CDdV+nvOLD7KfgP0uClhutCxFi+e2LPHrO1p4TEWA1 X+pNaCZ38Ait+0+k3djS+oxiBUdlU3oLyLazoJLiHgjGauKZCNFL8idfSQpfAQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="H8SmUf/d"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708896018; a=rsa-sha256; cv=none; b=uiHr/TvB+ifc3FofnHB4GSk5T8cJOEUB1MbBzAam8R84G9IORRUsT4l6bVruqrrPvfM8Tg NIGQ5kUuYzVTi52t6p4xcdFQ8N8Xtylf37xSA38FPk33Nys+eK2xKxF+j/GLODwCPB/w0P bCZGh0bQxqnCeO/z1Gu8aLNzTOGObjCKtDGDyUST2eQtdJB25Xv1q1F1wK2ZKd7oOrbnCk ft8nNqezimUhQy9uEBdm0kbEfm+7EAvI2rp8ZAtbmZnMvI2i5yTEVYQwe6Fxu2fsiAlmF+ TSyHCw8tQJwvX7fztxY9msEPPO3ULfTWPs/peeAk8VWkcxsDBX2U4iEUU2edZw== 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 7CD8FB794 for ; Sun, 25 Feb 2024 22:20:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reLum-0004Tb-VK; Sun, 25 Feb 2024 16:20:06 -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 ) id 1reLue-0004RH-6I for guix-patches@gnu.org; Sun, 25 Feb 2024 16:19:57 -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 ) id 1reLuL-0002PX-6T; Sun, 25 Feb 2024 16:19:37 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reLuk-0000rf-2j; Sun, 25 Feb 2024 16:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69396] [PATCH core-updates] gnu: ld-wrapper: Also unset GUILE_LOAD_PATH. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Sun, 25 Feb 2024 21:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69396 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69396@debbugs.gnu.org Cc: Maxim Cournoyer , Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by submit@debbugs.gnu.org id=B.17088959673218 (code B ref -1); Sun, 25 Feb 2024 21:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 21:19:27 +0000 Received: from localhost ([127.0.0.1]:49852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reLuA-0000pm-4K for submit@debbugs.gnu.org; Sun, 25 Feb 2024 16:19:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:43914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reLu7-0000pa-7I for submit@debbugs.gnu.org; Sun, 25 Feb 2024 16:19:24 -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 ) id 1reLth-0004D1-VS for guix-patches@gnu.org; Sun, 25 Feb 2024 16:18:57 -0500 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reLtg-0002Bl-BC for guix-patches@gnu.org; Sun, 25 Feb 2024 16:18:57 -0500 Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-42e848fc6f6so2226311cf.2 for ; Sun, 25 Feb 2024 13:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708895935; x=1709500735; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=szz3EFQQUO6kJPWR7IBElWgNnYesthDRVLTFewA0l/c=; b=H8SmUf/d8WaQ0IK8AGhBwLSlGDQQL/6HBJktliMc14f6akQOlS5itVRBShBbZ/ON69 /W9klKxa4d6m7NeVS0WUxfkoKjrTC937nyLGpHIdhGx5IF/bG11hHX2SbkntaJ/ZJQr9 qYZSLsmAmYtFjikH8xpF1Q8DlaPo8U/S0IBlQqrpbnED83xHiInU6Vh6ZeXdhE9dItdr KNLnhtPL5B5qeSq1zLfigQgGiWd6IW9yoWfy0XO8tGdVlfKs+kx0kjB3f46ha7Ji4zCU HBthrsXjTXax+juAqzmnXy6cQ2xCyDWXO/Uu+yGa1MWiGDjTr6/VNGeJgP6ocK2skI+f lsGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708895935; x=1709500735; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=szz3EFQQUO6kJPWR7IBElWgNnYesthDRVLTFewA0l/c=; b=kyD7UDeSFUVGH/xOTCdhHjoh+oSNmDXV6Yrii2ZKu3vbSDv5MpfdFalnAlr7H1UR6P VmOqnNSwnsYg85rVJDfzHyBcJuvHjjSiw+xz+lCsrT2qMZklokN8tbA8B+dGUDz+Aca3 2G4soVUtio111mJ+kSGlcAC3xXSVJIwxEHavFaxymTY+6ppINJZ7h82GITbg4f0PpA3P nq/xremUbdpM9GroMqR60hEsDoElO23/hRIYEP7HnrAu0VQdGRu7+AoAXJlA9PX9tPe0 ZdjalLGkvm6RWE9AiosP1VlxIGT6Mt0cdkblUaSVsQk6dECOOrC58W7e1UtCU6vcAWtB K4SQ== X-Gm-Message-State: AOJu0Yz1CZrWY3iDJfOMxvqg8+ldMLlkpHK9smAmyEJ8ukKwG2VZQDnA 4qcOW6i4n9hNMtl0AZHp5Qn9n/6HQ8a/EzerGCbgcL1YrRlKz3k+zIm0KRr4 X-Google-Smtp-Source: AGHT+IGd5E8SZZfFUhm97iCssvxi93w/S5HUBOnCIbCdf9bQEF8mbhS/4AtcTJRPpdXFpdXwkpXrmA== X-Received: by 2002:ac8:5c44:0:b0:42e:60af:b63f with SMTP id j4-20020ac85c44000000b0042e60afb63fmr4519796qtj.50.1708895934688; Sun, 25 Feb 2024 13:18:54 -0800 (PST) Received: from localhost.localdomain (dsl-141-6.b2b2c.ca. [66.158.141.6]) by smtp.gmail.com with ESMTPSA id ow7-20020a05620a820700b00787b8e49d9fsm1803261qkn.14.2024.02.25.13.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 13:18:54 -0800 (PST) From: Maxim Cournoyer Date: Sun, 25 Feb 2024 16:17:49 -0500 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x829.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -3.51 X-Spam-Score: -3.51 X-Migadu-Queue-Id: 7CD8FB794 X-TUID: 6JNYLHiYdACe The following problem was discovered while attempting to configure Guix to use a locally built Guile tree, via its meta/uninstalled-env script, which would attempt to use the newer Guile source files and fail with: Pre-boot error; key: unbound-variable, args: (#f "Unbound variable: ~S" (error) #f)collect2: fatal error: ld terminated with signal 6 [Aborted] With the following change, a Guix user may now configure their build to use a locally built Guile with e.g.: ~/src/guile/meta/uninstalled-env ./configure --localstatedir=/var \ --sysconfdir=/etc * gnu/packages/ld-wrapper.in: Unset GUILE_LOAD_PATH. Also unset GUILE_SYSTEM_PATH, for symmetry. Streamline exec call, using the now fixed '-l' option. (ld-wrapper): Fix args being a nested list, and strip its arg0. Change-Id: Iaaa721019f3646d851202bb018214ec9fcc04fd4 --- gnu/packages/ld-wrapper.in | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index 0d53e746af..0a2135ff5e 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -1,23 +1,26 @@ #!@BASH@ # -*- mode: scheme; coding: utf-8; -*- -# XXX: We have to go through Bash because there's no command-line switch to -# augment %load-compiled-path, and because of the silly 127-byte limit for -# the shebang line in Linux. -# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our -# .go file (see ). -# Unset 'GUILE_LOAD_COMPILED_PATH' to make sure we do not stumble upon -# incompatible .go files. See -# . +# XXX: We have to go through Bash because there's no Guile command-line switch to +# ignore the various Guile load path related environment variables. +# Unset 'GUILE_LOAD_PATH' to make sure we do not stumble upon +# incompatible Guile files (see +# ). + +unset GUILE_LOAD_PATH unset GUILE_LOAD_COMPILED_PATH +unset GUILE_SYSTEM_PATH unset GUILE_SYSTEM_COMPILED_PATH -main="(@ (gnu build-support ld-wrapper) ld-wrapper)" -exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@" + +exec @GUILE@ \ +-l @SELF@ \ +-e '(@ (gnu build-support ld-wrapper) ld-wrapper)' -s "$0" "$@" !# ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Ludovic Courtès ;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -285,9 +288,9 @@ library outside of ~a: ~s~%" result (expand-arguments result))) -(define (ld-wrapper . args) +(define (ld-wrapper args) ;; Invoke the real `ld' with ARGS, augmented with `-rpath' switches. - (let* ((args (expand-arguments args)) + (let* ((args (expand-arguments (cdr args))) ;strip arg0 (path (library-search-path args)) (libs (library-files-linked args path)) (args (append args (rpath-arguments libs)))) base-commit: f205179ed2cedf55aa0e046af2d80282f6a74075 -- 2.41.0