GNU bug report logs - #75097
[PATCH rust-team 1/8] gnu: override-jemalloc: Add variable.

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Wed, 25 Dec 2024 20:22:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 75097 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Herman Rimm <herman <at> rimm.ee>:
New bug report received and forwarded. Copy sent to efraim <at> flashner.co.il, guix-patches <at> gnu.org. (Wed, 25 Dec 2024 20:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: guix-patches <at> gnu.org
Subject: [PATCH rust-team 1/8] gnu: override-jemalloc: Add variable.
Date: Wed, 25 Dec 2024 21:20:20 +0100
* gnu/packages/crates-io.scm (override-jemalloc): Add variable.

Change-Id: I3e1666306c9f005072f9ed230f03386b2f78b0b2
---
 gnu/packages/crates-io.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b3d9bcd783..fb7710c5a9 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39209,6 +39209,19 @@ (define-public rust-javascriptcore-rs-sys-0.2
      "Sys functions for the Rust bindings of the javacriptcore library.")
     (license license:expat)))
 
+(define override-jemalloc
+  #~(modify-phases %standard-phases
+      (add-after 'configure 'override-jemalloc
+        (lambda* (#:key inputs #:allow-other-keys)
+          ;; This flag is needed when not using the bundled jemalloc.
+          ;; https://github.com/tikv/jemallocator/issues/19
+          (setenv
+            "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS"
+            "1")
+          (setenv "JEMALLOC_OVERRIDE"
+                  (string-append (assoc-ref inputs "jemalloc")
+                                 "/lib/libjemalloc_pic.a"))))))
+
 (define-public rust-jemalloc-ctl-0.5
   (package
     (name "rust-jemalloc-ctl")

base-commit: 32ab343e03e998ada27c063ef7d8a00aa88436dd
-- 
2.45.2





Information forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Subject: [PATCH rust-team 2/8] gnu: rust-jemalloc-ctl-0.5: Use
 override-jemalloc phases.
Date: Wed, 25 Dec 2024 21:21:51 +0100
* gnu/packages/crates-io.scm (rust-jemalloc-ctl-0.5)[arguments]: Disable
parallel tests.  Use override-jemalloc.

Change-Id: I23718f05ffd3deeb0ea0f9b32412ae6b6f0692db
---
 gnu/packages/crates-io.scm | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index fb7710c5a9..5945fd0a72 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39239,16 +39239,8 @@ (define-public rust-jemalloc-ctl-0.5
                        ("rust-libc" ,rust-libc-0.2)
                        ("rust-paste" ,rust-paste-1))
        #:cargo-development-inputs (("rust-jemallocator" ,rust-jemallocator-0.5))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'override-jemalloc
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((jemalloc (assoc-ref inputs "jemalloc")))
-               ;; This flag is needed when not using the bundled jemalloc.
-               ;; https://github.com/tikv/jemallocator/issues/19
-               (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
-               (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))
+       #:parallel-tests? #f ; Tests fail non-deterministically.
+       #:phases ,override-jemalloc))
     (native-inputs (list jemalloc))
     (home-page "https://github.com/tikv/jemallocator")
     (synopsis "Wrapper over jemalloc's control and introspection APIs")
-- 
2.45.2





Information forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Subject: [PATCH rust-team 3/8] gnu: rust-jemalloc-sys-0.5: Use
 override-jemalloc phases.
Date: Wed, 25 Dec 2024 21:21:52 +0100
* gnu/packages/crates-io.scm (rust-jemalloc-sys-0.5)[arguments]: Adjust.

Change-Id: Ib7c45999b55c95a3db0944d92985d64e4dadfc3a
---
 gnu/packages/crates-io.scm | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 5945fd0a72..0a499a6400 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39267,16 +39267,7 @@ (define-public rust-jemalloc-sys-0.5
      `(#:cargo-inputs
        (("rust-cc" ,rust-cc-1)
         ("rust-libc" ,rust-libc-0.2))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'override-jemalloc
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((jemalloc (assoc-ref inputs "jemalloc")))
-               ;; This flag is needed when not using the bundled jemalloc.
-               ;; https://github.com/tikv/jemallocator/issues/19
-               (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
-               (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))
+       #:phases ,override-jemalloc))
     (native-inputs
      (list jemalloc))
     (home-page "https://github.com/tikv/jemallocator")
-- 
2.45.2





Information forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:23:03 GMT) Full text and rfc822 format available.

Message #14 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Subject: [PATCH rust-team 4/8] gnu: rust-jemalloc-sys-0.3: Use
 override-jemalloc phases.
Date: Wed, 25 Dec 2024 21:21:53 +0100
* gnu/packages/crates-io.scm (rust-jemalloc-sys-0.3)[arguments]: Adjust.

Change-Id: Ifc1f2ad115054f7c7db2447e8680cc070273c6f3
---
 gnu/packages/crates-io.scm | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 0a499a6400..05d61f4209 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39297,14 +39297,7 @@ (define-public rust-jemalloc-sys-0.3
         ;; Build dependencies:
         ("rust-cc" ,rust-cc-1)
         ("rust-fs-extra" ,rust-fs-extra-1))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'override-jemalloc
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((jemalloc (assoc-ref inputs "jemalloc")))
-               (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a")))
-             #t)))))))
+       #:phases ,override-jemalloc))))
 
 (define-public rust-jemalloc-sys-0.1
   (package
-- 
2.45.2





Information forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:23:03 GMT) Full text and rfc822 format available.

Message #17 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Subject: [PATCH rust-team 5/8] gnu: rust-jemallocator-0.5: Use
 override-jemalloc phases.
Date: Wed, 25 Dec 2024 21:21:54 +0100
* gnu/packages/crates-io.scm (rust-jemallocator-0.5)[arguments]: Adjust.

Change-Id: I329aaa334575c0c89e60e4011ba1274f91098ff0
---
 gnu/packages/crates-io.scm | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 05d61f4209..afc90512c2 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39338,16 +39338,7 @@ (define-public rust-jemallocator-0.5
        #:cargo-development-inputs
        (("rust-jemalloc-ctl" ,rust-jemalloc-ctl-0.5)
         ("rust-paste" ,rust-paste-1))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'override-jemalloc
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((jemalloc (assoc-ref inputs "jemalloc")))
-               ;; This flag is needed when not using the bundled jemalloc.
-               ;; https://github.com/tikv/jemallocator/issues/19
-               (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
-               (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))
+       #:phases ,override-jemalloc))
     (native-inputs
      (list jemalloc))
     (home-page "https://github.com/tikv/jemallocator")
-- 
2.45.2





Information forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:23:04 GMT) Full text and rfc822 format available.

Message #20 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Subject: [PATCH rust-team 6/8] gnu: rust-jemallocator-0.1: Use
 override-jemalloc phases.
Date: Wed, 25 Dec 2024 21:21:55 +0100
* gnu/packages/crates-io.scm (rust-jemallocator-0.1)[arguments]: Adjust.

Change-Id: Ida6507dff8624d22dc1c6dd77e11426179edb512
---
 gnu/packages/crates-io.scm | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index afc90512c2..1216e85226 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39388,14 +39388,7 @@ (define-public rust-jemallocator-0.1
      `(#:cargo-inputs
        (("rust-jemalloc-sys" ,rust-jemalloc-sys-0.1)
         ("rust-libc" ,rust-libc-0.2))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'override-jemalloc
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((jemalloc (assoc-ref inputs "jemalloc")))
-               (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a")))
-             #t)))))
+       #:phases ,override-jemalloc))
     (native-inputs
      (list jemalloc))))
 
-- 
2.45.2





Information forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:23:04 GMT) Full text and rfc822 format available.

Message #23 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Subject: [PATCH rust-team 7/8] gnu: rust-nom-6: Use override-jemalloc phases.
Date: Wed, 25 Dec 2024 21:21:56 +0100
* gnu/packages/crates-io.scm (rust-nom-6)[arguments]: Adjust.

Change-Id: Iddfad33f6a53aff6faa85d0a3a72b95ffa29ac10
---
 gnu/packages/crates-io.scm | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 1216e85226..aa73b59a9e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -51486,14 +51486,7 @@ (define-public rust-nom-6
        (("rust-criterion" ,rust-criterion-0.3)
         ("rust-doc-comment" ,rust-doc-comment-0.3)
         ("rust-jemallocator" ,rust-jemallocator-0.3))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'override-jemalloc
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((jemalloc (assoc-ref inputs "jemalloc")))
-               (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a")))
-             #t)))))
+       #:phases ,override-jemalloc))
     (native-inputs (list jemalloc))))
 
 (define-public rust-nom-5
-- 
2.45.2





Information forwarded to efraim <at> flashner.co.il, guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Wed, 25 Dec 2024 20:23:05 GMT) Full text and rfc822 format available.

Message #26 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Subject: [PATCH rust-team 8/8] gnu: rust-nom-5: Use override-jemalloc phases.
Date: Wed, 25 Dec 2024 21:21:57 +0100
* gnu/packages/crates-io.scm (rust-nom-5)[arguments]: Adjust.

Change-Id: Iddfad33f6a53aff6faa85d0a3a72b95ffa29ac10
---
 gnu/packages/crates-io.scm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index aa73b59a9e..13d222c5de 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -51513,13 +51513,7 @@ (define-public rust-nom-5
        (("rust-criterion" ,rust-criterion-0.2)
         ("rust-doc-comment" ,rust-doc-comment-0.3)
         ("rust-jemallocator" ,rust-jemallocator-0.1))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'override-jemalloc
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((jemalloc (assoc-ref inputs "jemalloc")))
-               (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))))
+       #:phases ,override-jemalloc))))
 
 (define-public rust-nom-4
   (package
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#75097; Package guix-patches. (Thu, 26 Dec 2024 13:46:02 GMT) Full text and rfc822 format available.

Message #29 received at 75097 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Herman Rimm <herman <at> rimm.ee>
Cc: 75097 <at> debbugs.gnu.org
Subject: Re: [bug#75097] [PATCH rust-team 1/8] gnu: override-jemalloc: Add
 variable.
Date: Thu, 26 Dec 2024 15:44:28 +0200
[Message part 1 (text/plain, inline)]
This one I'm unconvinced about.  I could see adding CARGO_FEATURE... to
the cargo-build-system, but this seems like a temporary problem that I
hope gets fixed upstream.  If we move this out to a separate location
I'm worried we'll forget about it when it's no longer needed.

Plus we're using libjemalloc_pic.a here and libjemalloc.so in
rust-apps.scm, and I'd prefer to not hard-code one or the other.

On Wed, Dec 25, 2024 at 09:20:20PM +0100, Herman Rimm wrote:
> * gnu/packages/crates-io.scm (override-jemalloc): Add variable.
> 
> Change-Id: I3e1666306c9f005072f9ed230f03386b2f78b0b2
> ---
>  gnu/packages/crates-io.scm | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index b3d9bcd783..fb7710c5a9 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -39209,6 +39209,19 @@ (define-public rust-javascriptcore-rs-sys-0.2
>       "Sys functions for the Rust bindings of the javacriptcore library.")
>      (license license:expat)))
>  
> +(define override-jemalloc
> +  #~(modify-phases %standard-phases
> +      (add-after 'configure 'override-jemalloc
> +        (lambda* (#:key inputs #:allow-other-keys)
> +          ;; This flag is needed when not using the bundled jemalloc.
> +          ;; https://github.com/tikv/jemallocator/issues/19
> +          (setenv
> +            "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS"
> +            "1")
> +          (setenv "JEMALLOC_OVERRIDE"
> +                  (string-append (assoc-ref inputs "jemalloc")
> +                                 "/lib/libjemalloc_pic.a"))))))
> +
>  (define-public rust-jemalloc-ctl-0.5
>    (package
>      (name "rust-jemalloc-ctl")
> 
> base-commit: 32ab343e03e998ada27c063ef7d8a00aa88436dd
> -- 
> 2.45.2
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.