From patchwork Tue Sep 10 08:48:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 67851 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 11C8D27BBEA; Tue, 10 Sep 2024 09:50:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,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 DB14027BBE2 for ; Tue, 10 Sep 2024 09:50:10 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snwZU-0007l5-3q; Tue, 10 Sep 2024 04:50:00 -0400 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 1snwZR-0007kg-Tb for guix-patches@gnu.org; Tue, 10 Sep 2024 04:49:57 -0400 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 1snwZR-0002D6-1S for guix-patches@gnu.org; Tue, 10 Sep 2024 04:49:57 -0400 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:In-Reply-To:References:Subject; bh=l5S2jagm8mv+izCsu3fWjihRl34LgWsxUpGEoAz99O4=; b=JE2aZfcfiPTJEoeTxxAzuK/Ak51vtq8bMpsVMtZmNMKW2onxc0AMGPT07co7V2F1Pzmg5g28+I1JzN0vOHc2QyqZH4o3FRcND64LbggXLks3Gx4Ks4b0T5W3hD/RaWvl0hsvcfvwHyF8E/xG3JWLcYOgZUInco8oYbyec9bxB+oJVcJEM8wvQFZD+NYe4lf5jri8dx36MbSI1KlMJRUPYtpwSZH3lIFoBIRfx26K2C3qwqRhi/H95roQ66q+LR8iK0mFk2kt+/BMNhs0GK91Txud7B7wCHr4ZC9ylmmLpggluRXDyPhDiW8CDRh6Jc6GhnHkEGbbXWTTRWeKEGTX7w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snwZV-0006FV-ND for guix-patches@gnu.org; Tue, 10 Sep 2024 04:50:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73163] [PATCH v2] gnu: openpmix: Do not keep a reference to GCC and other build tools. References: In-Reply-To: Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Sep 2024 08:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73163 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73163@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , romain.garbage@inria.fr Received: via spool by 73163-submit@debbugs.gnu.org id=B73163.172595815823960 (code B ref 73163); Tue, 10 Sep 2024 08:50:01 +0000 Received: (at 73163) by debbugs.gnu.org; 10 Sep 2024 08:49:18 +0000 Received: from localhost ([127.0.0.1]:34850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snwYn-0006EO-NH for submit@debbugs.gnu.org; Tue, 10 Sep 2024 04:49:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snwYm-0006EC-0x for 73163@debbugs.gnu.org; Tue, 10 Sep 2024 04:49:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snwYa-00029s-1L; Tue, 10 Sep 2024 04:49:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=l5S2jagm8mv+izCsu3fWjihRl34LgWsxUpGEoAz99O4=; b=m0QFb8JFdtkwXR 8nadwG2W6HQ2LgTeVaxoKqCUZnQNTQuzjkn90OipOS9p1Ga3SnTSwMGdZQ87+NmvJZjbViw3pOKBv SKXv+dL1AshYhCL2gcbX3R/Ju91RfItweitACjwbrbySjhBMMAyWCf7/gY1s8CVSYTZxINKg5Dxuc ugrhX1GGe/bptNLQxQ53P1pjyHhrXbzT3QKLhpReysJjQ9iNOH3+f5Idi0VJ6TWB+9xDRhGZ2fVYu ftqD+Lxtvy9lcdWCjq9H2BcBAwWoDnyNMShH4d0pNg1jJZtD/xXIBKNqf/xNxCwTbZ7N+W6VKsARg W84ClydFyt5MCnpJjyKw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 10 Sep 2024 10:48:54 +0200 Message-ID: <2d318ad3d3887118448da393d57aaf4b722e52ec.1725958053.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Ludovic Courtès This reduces the closure of ‘openpmix’ from 297 MiB to 93 MiB. * gnu/packages/parallel.scm (openpmix)[arguments]: Add #:phases and #:disallowed-references. Change-Id: I231c550743e2854e431b8100584bd464695de695 --- gnu/packages/parallel.scm | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) base-commit: 637ca78f513fac15284403c0d3af64492ea832a1 diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index d5a55a8641..a77894b8d6 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -52,6 +52,7 @@ (define-module (gnu packages parallel) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) #:use-module (gnu packages freeipmi) + #:use-module (gnu packages gcc) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages maths) @@ -646,7 +647,29 @@ (define-public openpmix (arguments (list #:configure-flags #~(list (string-append "--with-hwloc=" - (ungexp (this-package-input "hwloc") "lib"))))) + (ungexp (this-package-input "hwloc") "lib"))) + + ;; Don't keep a reference to GCC. + #:disallowed-references (and (not (%current-target-system)) + (list (canonical-package gcc))) + + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'strip-pmix-cc-absolute + (lambda _ + ;; The 'pmix_info' program prints the 'configure' command + ;; line, compiler absolute file name, etc., which causes it + ;; to keep references to many build-time packages. Scrub + ;; these. + (substitute* "configure" + (("PMIX_CC_ABSOLUTE=\"(.*)\"" _ cc) + (string-append "PMIX_CC_ABSOLUTE=\"$(basename \"" + cc "\")\"\n"))))) + (add-after 'configure 'strip-pmix-config-header + (lambda _ + (substitute* "src/include/pmix_config.h" + (("#define PMIX_CONFIGURE_CLI .*") + "#define PMIX_CONFIGURE_CLI \"[scrubbed]\"\n"))))))) (inputs (list libevent `(,hwloc "lib"))) (native-inputs (list perl python)) (synopsis "PMIx library")