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:
Toggle quote (39 lines)
> * 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@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
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmdtXbwACgkQQarn3Mo9
g1G8+w//akYmsSa+jTDh/MiDPMLwQueiDAbMyIWokGNmk7Me7i9E8zd7oPY9kBcR
/Kzllc+TS/a69Xak8nSinjFh8+jLkCuETx7ydt9jPLvdqHwOBShjWq63mAJeppUH
GUhCubCHsf5jXIf0oEBHANyRYQYLWdvVWvDgJOtcsCDOoLOYq8DRLuis1fIFxLG0
Ds+RJdkV0yJ2T+k7h9NaoOVtr510Y2HRMPLLAgTJg3L7yTXV9Q1AK5T5650wkkz7
VCy+2Yr+Gf6PGijdYEGTqoiVtvbfvKu33iYzRbuc9Ly9Gs5EFZtxC3BfY2IyTlmW
bL3RSyDrty6PQbVwk7HRsmCGIUjVun7G5X0Eq1nkIh7q6Hc1bSCQHd3KAWnFtJqm
UXs4WekCMDZT520L5GBJrEnuFM3UGUcqti8LdfQbphqlUJLNcCh1XLbTId3u8BXK
SZKwsWu3jsmmJ/WuAvO/+3QTeZt+lxUlBS98fwSBMWTZmDu5EU6oIE20219YB8GR
G/Y4x5XFtr2HfMJ6OSnlIiH1jyVZ6ADah7G0eOSerc9ntl4QsGrvWSnchFNX9VIp
CzDNy2UGqQxxgDQ1Bz7XP0rgkhOnqL4FnGtHQyqim8j+U0Sx9ej4svzv7WfdPgh+
IYdkQx2BrMcIy3RkJMDkvvjYJRrgrA9uGHos9L4YHNwzu0MIKi4=
=B+Y0
-----END PGP SIGNATURE-----