Message ID | 02e5f7ff3d45b516a797c3e68c257748336dbae2.1742281797.git.hako@ultrarare.space |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3900127BBEA; Tue, 18 Mar 2025 07:27:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,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 0967427BBE9 for <patchwork@mira.cbaines.net>; Tue, 18 Mar 2025 07:27:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1tuRLy-0007Yb-SD; Tue, 18 Mar 2025 03:27:10 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tuRLw-0007Xh-F1 for guix-patches@gnu.org; Tue, 18 Mar 2025 03:27:08 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tuRLv-000136-Tj for guix-patches@gnu.org; Tue, 18 Mar 2025 03:27:08 -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:References:In-Reply-To:Date:From:To:Subject; bh=JtVpmvUHYhzQ0fAuHdosNIoIUr6sCxjVGkZ4GtLjbU0=; b=ENVPPxdV+y5txgV7fG6uePMEivSOioGd+tfbCnHKYowCpdGx59sIw+HPGJ2+wlD5J9Z8Ww+sAcGeQj5znDq1CrEd5iTESUVkC5u2JrmnqWfjHuG2FfPiO70N2NIofyp0c6eS7oDriJv1cml9wloPQU2dYvLzK1ceSi90pnCq3m/Dc87lwBLymStzV6eFkNxiDmaZKCntm0lB2qCC+IzlWxtfvkHkCXXbYU3l17fIPLNnvMIgqJk0Zj6M52FiBDA1Oa2FuyoqcIp9QejcLr4zqZxGcrxbbkhnGdjEGcowze92wJSjJ9qWaE2pdFVPdFp2iXTk2BomRZ23puvjKtPTBQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tuRLv-0004oi-Lu; Tue, 18 Mar 2025 03:27:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77093] [PATCH rust-team 08/18] build/cargo: Use system jemalloc. Resent-From: Hilton Chain <hako@ultrarare.space> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: hako@ultrarare.space, divya@subvertising.org, efraim@flashner.co.il, steve@futurile.net, guix-patches@gnu.org Resent-Date: Tue, 18 Mar 2025 07:27:07 +0000 Resent-Message-ID: <handler.77093.B77093.174228278018013@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77093 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77093@debbugs.gnu.org Cc: Hilton Chain <hako@ultrarare.space>, Efraim Flashner <efraim@flashner.co.il>, Hilton Chain <hako@ultrarare.space>, Divya Ranjan Pattanaik <divya@subvertising.org>, Efraim Flashner <efraim@flashner.co.il>, Steve George <steve@futurile.net> X-Debbugs-Original-Xcc: Hilton Chain <hako@ultrarare.space>, Divya Ranjan Pattanaik <divya@subvertising.org>, Efraim Flashner <efraim@flashner.co.il>, Steve George <steve@futurile.net> Received: via spool by 77093-submit@debbugs.gnu.org id=B77093.174228278018013 (code B ref 77093); Tue, 18 Mar 2025 07:27:07 +0000 Received: (at 77093) by debbugs.gnu.org; 18 Mar 2025 07:26:20 +0000 Received: from localhost ([127.0.0.1]:35917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tuRLA-0004gN-18 for submit@debbugs.gnu.org; Tue, 18 Mar 2025 03:26:20 -0400 Received: from mx.boiledscript.com ([88.99.243.112]:35242) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <hako@ultrarare.space>) id 1tuRKq-0004cq-3K for 77093@debbugs.gnu.org; Tue, 18 Mar 2025 03:26:01 -0400 From: Hilton Chain <hako@ultrarare.space> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1742282758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JtVpmvUHYhzQ0fAuHdosNIoIUr6sCxjVGkZ4GtLjbU0=; b=IhuuDHNC70TWQ24sQjgHwDabX+Mrvt5YdvXdX9uMA7tu73YVqK/5ERbD6JxTbdRUcyCFXT o/z+vav4a0iEEL/8CGumWAT7w2cpAJ/b3mjEk2GO5RjHj9ZPeJmRITv2+ZBEV79vArQC8+ JJlNAoXWDf8I0ji3pj0mURgatpnj4P3kC/YhXund91PR74rez+XB0GH77ytsXCc9sTqg1o xIozzmwGY/8NZGn3lyiJlFqrdWV2ifz/P/Ff5f203Pq2IxB/K/ixDlPm2liCj2DpimSFQF D8whyOKBmscAtBWKSmfmeU/g0e+dDfEoCYKx5KSsSb0+sGwAooGIO25dKysX/A== Date: Tue, 18 Mar 2025 15:24:21 +0800 Message-ID: <02e5f7ff3d45b516a797c3e68c257748336dbae2.1742281797.git.hako@ultrarare.space> In-Reply-To: <cover.1742281797.git.hako@ultrarare.space> References: <cover.1742281797.git.hako@ultrarare.space> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=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 |
Series |
New Rust packaging workflow based on lockfile importer.
|
|
Commit Message
Hilton Chain
March 18, 2025, 7:24 a.m. UTC
From: Efraim Flashner <efraim@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@ultrarare.space>
---
guix/build/cargo-build-system.scm | 6 ++++++
1 file changed, 6 insertions(+)
Comments
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@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@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 >
On Tue, 18 Mar 2025 19:49:21 +0800, Efraim Flashner wrote: > > [1 <text/plain; utf-8 (quoted-printable)>] > 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@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@ultrarare.space> > > --- > > guix/build/cargo-build-system.scm | 6 ++++++ > > 1 file changed, 6 insertions(+) I'll drop this one for now then, I didn't search the source tree :P
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")