GNU bug report logs -
#73163
[PATCH] gnu: openpmix: Do not keep a reference to GCC and other build tools.
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Tue, 10 Sep 2024 08:39:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73163 in the body.
You can then email your comments to 73163 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#73163
; Package
guix-patches
.
(Tue, 10 Sep 2024 08:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 10 Sep 2024 08:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
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 | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index d5a55a8641..d3ff363cd5 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,28 @@ (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-config-header
+ (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* "src/include/pmix_config.h.in"
+ (("#define PMIX_CONFIGURE_CLI .*")
+ "#define PMIX_CONFIGURE_CLI \"[scrubbed]\"\n"))
+
+ (substitute* "configure"
+ (("PMIX_CC_ABSOLUTE=\"(.*)\"" _ cc)
+ (string-append "PMIX_CC_ABSOLUTE=\"$(basename \""
+ cc "\")\"\n"))))))))
(inputs (list libevent `(,hwloc "lib")))
(native-inputs (list perl python))
(synopsis "PMIx library")
base-commit: 637ca78f513fac15284403c0d3af64492ea832a1
--
2.46.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73163
; Package
guix-patches
.
(Tue, 10 Sep 2024 08:50:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 73163 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
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(-)
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")
base-commit: 637ca78f513fac15284403c0d3af64492ea832a1
--
2.46.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Mon, 16 Sep 2024 09:19:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
bug acknowledged by developer.
(Mon, 16 Sep 2024 09:19:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 73163-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> skribis:
> From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
>
> 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
Pushed as 3daab044145b4b39fe60c64e89f35e3b2a538935.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 14 Oct 2024 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 248 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.