From patchwork Wed Nov 3 17:32:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 34232 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 697E927BBE3; Wed, 3 Nov 2021 17:38:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E782D27BBE1 for ; Wed, 3 Nov 2021 17:38:40 +0000 (GMT) Received: from localhost ([::1]:57884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miKDf-0001Wz-SS for patchwork@mira.cbaines.net; Wed, 03 Nov 2021 13:38:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miK8E-0005xc-UB for guix-patches@gnu.org; Wed, 03 Nov 2021 13:33:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miK8E-0003sm-6Q for guix-patches@gnu.org; Wed, 03 Nov 2021 13:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1miK8D-00083S-U7 for guix-patches@gnu.org; Wed, 03 Nov 2021 13:33:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51198] [PATCH] gnu: Add b2sum. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Nov 2021 17:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51198 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 51198@debbugs.gnu.org, =?utf-8?q?Nicol=C3=B2?= Balzarotti Received: via spool by 51198-submit@debbugs.gnu.org id=B51198.163596076530933 (code B ref 51198); Wed, 03 Nov 2021 17:33:01 +0000 Received: (at 51198) by debbugs.gnu.org; 3 Nov 2021 17:32:45 +0000 Received: from localhost ([127.0.0.1]:41044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miK7w-00082q-O8 for submit@debbugs.gnu.org; Wed, 03 Nov 2021 13:32:45 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:49941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miK7r-00082b-C6 for 51198@debbugs.gnu.org; Wed, 03 Nov 2021 13:32:43 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7803B5C0070; Wed, 3 Nov 2021 13:32:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 03 Nov 2021 13:32:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=mesmtp; bh=c9dHVoucJJEjRxJFLbjkq/Js4s0jWJjRvyi/oYSP8zM=; b=V5DXbqDg0c+6 OKsLaAcSMVyTFOsswPBc55rOycJIpUntzUbvnW12qRYskRdrlex+vJ4GLAJsJDbh jqyrgIWRO1fzyR7vE+GiPVrdiU4hcbZroWU7SgHO0y9jeVR8sM0FvL48IddXzsuU DmA9DLmvj7ALBHLC0O37rTxt7C/6gkc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=c9dHVoucJJEjRxJFLbjkq/Js4s0jWJjRvyi/oYSP8 zM=; b=e4ItGaVeDtRMa519wNg3jyIvlOBCEK16I4U1q/9B0/LS3H9vCRm37Lo00 8mRpHYfNvrwKlHMGGvxBD5QouTFHxChFOOf4qY5cJyFq1ryxUuvnAlH8CYMJwItB wlG+pn9ePQIzFkf8aEBp08Hfwe3oRX2BhO7a4he0DrNDWT5FwU/lG/3zkFedRUeb lERthlPPjJmtLRtxw4V/s3Xy4N+VR3rjtT6qYKPbFboMwxe9ZRf0CrtExX4LEwAK GIK8eBejSE5yVuxiam4fk5ad1SwcBgdm3gdTe5v+chW3L4EuWSU1fblpGwjxsh5N je1MnksY5ON7tVEiSJPqBDBkeHU1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtddvgdellecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehmkeerredttdejnecuhfhrohhmpefnvghoucfh rghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdrnhgrmhgvqeenucggtffrrghtth gvrhhnpefgffekiefhtdffgfetfeeijeeuffekkeeifefgudduhfelleeihfeviedtgeeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvg hosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Nov 2021 13:32:37 -0400 (EDT) Date: Wed, 3 Nov 2021 13:32:35 -0400 From: Leo Famulari Message-ID: References: <878ryfjudi.fsf@guix.i-did-not-set--mail-host-address--so-tickle-me> <874k92kgaq.fsf@guix.i-did-not-set--mail-host-address--so-tickle-me> <875ytifols.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <875ytifols.fsf_-_@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches On Wed, Oct 27, 2021 at 05:56:31PM +0200, Ludovic Courtès wrote: > It’s okay but not entirely sufficient: on a cluster setup, you typically > talk to a daemon that’s on another machine, so the CPU features it’ll > detect there may be different from those you’ll use. Likewise, as > discussed on IRC, you’d also need #:local-build? #t. It seems that #:local-build? is not available in gnu-build-system. Is that correct? Using the attached patch, building fails with "Unrecognized keyword: #:local-build?". Is there a way to turn it on for packages using gnu-build-system? From 77a063e797849332b784decab32f29be3d13f031 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 27 Oct 2021 11:29:40 -0400 Subject: [PATCH] gnu: b2sum: Build on the local machine. * gnu/packages/crypto.scm (b2sum)[arguments]: Set '#:substitutable? #f' and '#:local-build? #t'. --- gnu/packages/crypto.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index f48fc23c1f..7ef8504eb7 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -858,9 +858,19 @@ (define-public b2sum (base32 "04z631v0vzl52g73v390ask5fnzi5wg83lcjkjhpmmymaz0jn152")))) (build-system gnu-build-system) (arguments - `(#:make-flags (list (string-append "CC=" ,(cc-for-target)) - (string-append "PREFIX=" (assoc-ref %outputs "out"))) + `(;; By default, b2sum uses the compiler to generate instructions + ;; tailored to the CPU of the running machine, using "-march=native". + ;; This gives a ~1.5x speedup on a Core i5-6300U with a large dataset + ;; paged in, whereas compilation of b2sum takes ~1.5 seconds. + ;; b2sum does not support run-time feature detection: + ;; https://github.com/BLAKE2/BLAKE2/issues/1 + ;; For more information, see the discussion beginning here: + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51198#13 + #:substitutable? #f + #:local-build? #t #:tests? #f ; No test suite + #:make-flags (list (string-append "CC=" ,(cc-for-target)) + (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (add-before 'build 'change-directory