From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GBJ5B8kM3GU8wgAA62LTzQ:P1 (envelope-from ) for ; Mon, 26 Feb 2024 05:00:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GBJ5B8kM3GU8wgAA62LTzQ (envelope-from ) for ; Mon, 26 Feb 2024 05:00:09 +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=YFxeGRhr; 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=1708920009; 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:dkim-signature; bh=KDaVBz7cUjlcsXQoykcGsBnS0yHwNXrGPEKwpCrAuFk=; b=KfGJ2zmidcIRhERSfcWE/6ixZcuR10mrhIIrl7wdifCPI8x5g64dyQmG3kZOeBrV8zr0Zs po0dAjVAnZkzAL2nZaNbriJOE9VIJALPwFVQSAvbczfzIavD7YDZGMMECgvXZjChslLMUS UqtOnHQaTaaJzgF5Lxbk45dcvRd22LDkPFmRAyR29nrpfRTi8N7nnH2/Bmy31USf9kSfqr rXilpjORHkr++sBh6tYn30UK9FeIH2SGrzKkCvKmJVoYGFf0klxa72CLiWjVT6bpMTN/UA 8b7oWf3brA7D+Y3nemyskjMAXObR6YsyRc5hAfe6YxcK0CZCr24JKMRkzb4HmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=YFxeGRhr; 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=1708920009; a=rsa-sha256; cv=none; b=M15RhLa8ZlQQcxu1kMBq2mltBsjK1uYVYnkaCysYIYq2LGJT5wO/+nLv9Gpv5qMLHTEryZ t+pVygfhE8XOxnkIOZqdoowWTA/boTqTiHOBZnIVh36gQIg5E05opNRy4EwU1aYX6Q4a/c JonITZOBDiov2sOf83tNvdkHVrEqugsnl8IzjngIwoZevvXprT6QXIFBjJDiRU4CJvawC2 CMeTTHv6eXarYl8t/g016vtWLCaOHhUXz5rt5VgY3Bj72A/IG8EDGdewQhfyePYTueGu0f IWx7dS8v9Tsl4r1kHvbLU3PrsaVML8NYvZ3brbXEUnSGuMdEXq0D3cE3ba/E6A== 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 94C9933667 for ; Mon, 26 Feb 2024 05:00:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reS9a-0006hL-JR; Sun, 25 Feb 2024 22:59:46 -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 1reS9Y-0006gk-FY for guix-patches@gnu.org; Sun, 25 Feb 2024 22:59:44 -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 1reS9S-0004xb-QE; Sun, 25 Feb 2024 22:59:42 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reS9r-0006qO-7v; Sun, 25 Feb 2024 23:00:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69396] [PATCH core-updates v2] gnu: ld-wrapper: Also unset GUILE_LOAD_PATH. References: In-Reply-To: Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Mon, 26 Feb 2024 04:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 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-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 69396-submit@debbugs.gnu.org id=B69396.170891996826164 (code B ref 69396); Mon, 26 Feb 2024 04:00:03 +0000 Received: (at 69396) by debbugs.gnu.org; 26 Feb 2024 03:59:28 +0000 Received: from localhost ([127.0.0.1]:52980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reS9H-0006nu-I6 for submit@debbugs.gnu.org; Sun, 25 Feb 2024 22:59:28 -0500 Received: from mail-qk1-f175.google.com ([209.85.222.175]:57593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reS9B-0006nH-Rh for 69396@debbugs.gnu.org; Sun, 25 Feb 2024 22:59:25 -0500 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-781753f52afso171581185a.2 for <69396@debbugs.gnu.org>; Sun, 25 Feb 2024 19:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708919870; x=1709524670; darn=debbugs.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=KDaVBz7cUjlcsXQoykcGsBnS0yHwNXrGPEKwpCrAuFk=; b=YFxeGRhrOgfs3XT8EkeHnG34pf2hYenWo+L9PMLmG9Rsj5QdDxwIPubzreHw+ejS5w 53rpMGTehASTedP9zmZ95XrpE/vRmimD5/Aj+nNDO20MaC7wMQpZg/ctgEtDT2ERjmDX 2t7Tc1I2YP8D9VVhddG/2Kxz6i7u03kLqUlizfmUrbX0SzFbYNT7pAYJwbkifw602Vfh uSQSPOsLUSH/9fQZvqN0wQSxM7qyy5o3Bu7VhkklXIY2J0zmT3o9YIDJE0CzzPZAWwqT cn4Ayn1k6hFB/TyYj1KJdiW5lSApatNTOlGXXeRsJyR3l0XfnMBByZ1jyZXc4NQbw7Vq IWNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708919870; x=1709524670; 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=KDaVBz7cUjlcsXQoykcGsBnS0yHwNXrGPEKwpCrAuFk=; b=XckZIC1sVwaNMYvzI7pOWF7TBytNF2D9ZQlMcrzDVLvLfzkIn7y1YZa2yruQQz1ME2 VB3uFkRpQy+DFELyRKCRT0jnqB8jdq6MjurhY5ir15Fi8oSbNpstUdXf53oEDMQXlwD1 N544gfsCOZe9TAZQHQGmLQwD61yHQSSY72vGdtWuz2ik/uVNtn6i/++coDxc1XHxQIJ9 k3H3+LIpG5GlEVa3cTJ0VoYEliEg3YB45EbgbCh+dqjL6Ei11LiDgHhTFyIxMw/iEVmn 2uDDcHwq8gP7Tgp0LstWCtFhGniCiD5SY8+M43QbH6Xo8SA1ACnbcGh6KgNbSkgA75lI FiFg== X-Gm-Message-State: AOJu0Yze3yxAP0zoTaE6gdbtdQB5kIIAVO+YqdvwIZukNCqqKpNt9+Az 41uug+gVViLr2czbdDjur3eRnnEG+kKPC1zt1sP9NKyvl2u4dB9YXo+fsIrQ X-Google-Smtp-Source: AGHT+IH2XfSgHdgdZX2u9HSpWmkSgLAGyU57W/9ZJ2B+EWbXjNG+Iy6uz1r8xhrM4+pc7wz/akpNDw== X-Received: by 2002:a05:620a:858:b0:787:5f6d:88a5 with SMTP id u24-20020a05620a085800b007875f6d88a5mr6631231qku.61.1708919870318; Sun, 25 Feb 2024 19:57:50 -0800 (PST) Received: from localhost.localdomain (dsl-141-6.b2b2c.ca. [66.158.141.6]) by smtp.gmail.com with ESMTPSA id t25-20020a05620a0b1900b00787236a4ba7sm2060783qkg.40.2024.02.25.19.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 19:57:49 -0800 (PST) From: Maxim Cournoyer Date: Sun, 25 Feb 2024 22:57:07 -0500 Message-ID: <094b2d80c6524440e9b86ec9a3181e28d31f3957.1708919827.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 2.73 X-Spam-Score: 2.73 X-Migadu-Queue-Id: 94C9933667 X-TUID: mB0UU79sHL3B 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 --- Changes in v2: - Revert to load-compiled scheme to load ld.go - Refine comment gnu/packages/ld-wrapper.in | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index 0d53e746af..c9bb235bca 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -1,23 +1,28 @@ #!@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 + +# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our +# .go file, or causes extraneous `stat' system calls when the "-C" "/" arguments +# are provided. main="(@ (gnu build-support ld-wrapper) ld-wrapper)" -exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@" +exec @GUILE@ -c "(load-compiled \"@SELF@.go\") ($main (command-line))" "$@" !# ;;; 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 +290,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