GNU bug report logs - #77093
[PATCH rust-team 00/18] New Rust packaging workflow based on lockfile importer.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Tue, 18 Mar 2025 07:18:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 77093 <at> debbugs.gnu.org
Subject: [bug#77093] [PATCH rust-team 08/18] build/cargo: Use system jemalloc.
Date: Tue, 18 Mar 2025 13:49:21 +0200
[Message part 1 (text/plain, inline)]
I'm not sure how I feel about this one.  On one hand the
unprefixed_malloc flag is definitely necessary.  On the other hand
sometimes we use libjemalloc.so and sometimes libjemalloc_pic.a, and I
don't remember when/why we use one over the other, other than "it just
works"

On Tue, Mar 18, 2025 at 03:24:21PM +0800, Hilton Chain wrote:
> From: Efraim Flashner <efraim <at> flashner.co.il>
> 
> * guix/build/cargo-build-system.scm (configure): Set environment variables to
> use system jemalloc.
> 
> Change-Id: Ibb1c025c7354ba2befd2770e3f1ccd785baa06c3
> Modified-by: Hilton Chain <hako <at> ultrarare.space>
> ---
>  guix/build/cargo-build-system.scm | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
> index a1c4f556bb..b547421b88 100644
> --- a/guix/build/cargo-build-system.scm
> +++ b/guix/build/cargo-build-system.scm
> @@ -248,6 +248,12 @@ (define* (configure #:key inputs
>    (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1")
>    (setenv "SODIUM_USE_PKG_CONFIG" "1")
>    (setenv "ZSTD_SYS_USE_PKG_CONFIG" "1")
> +  ;; 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")
> +  (when (assoc-ref inputs "jemalloc")
> +    (setenv "JEMALLOC_OVERRIDE"
> +            (string-append (assoc-ref inputs "jemalloc") "/lib/libjemalloc.so")))
>    (when (assoc-ref inputs "openssl")
>      (setenv "OPENSSL_DIR" (assoc-ref inputs "openssl")))
>    (when (assoc-ref inputs "gettext")
> -- 
> 2.48.1
> 

-- 
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 13 days ago.

Previous Next


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