From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AFz0Nl6ZjGTBogAASxT56A (envelope-from ) for ; Fri, 16 Jun 2023 19:18:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8DvkNV6ZjGSrZAEAG6o9tA (envelope-from ) for ; Fri, 16 Jun 2023 19:18:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 93101BFAC for ; Fri, 16 Jun 2023 19:18:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAD5J-0000EG-DW; Fri, 16 Jun 2023 13:18:05 -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 ) id 1qAD5H-0000Dk-Ep for guix-patches@gnu.org; Fri, 16 Jun 2023 13:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAD5G-0000Mi-HW for guix-patches@gnu.org; Fri, 16 Jun 2023 13:18:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAD5F-0007HX-Vo for guix-patches@gnu.org; Fri, 16 Jun 2023 13:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64114] [PATCH] gnu: fftw: Update to 3.3.10 and build entirely from source. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Jun 2023 17:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64114 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64114@debbugs.gnu.org Cc: David Elsing X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168693584227929 (code B ref -1); Fri, 16 Jun 2023 17:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jun 2023 17:17:22 +0000 Received: from localhost ([127.0.0.1]:50297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAD4b-0007GO-4C for submit@debbugs.gnu.org; Fri, 16 Jun 2023 13:17:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:44890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAD4Y-0007GF-RR for submit@debbugs.gnu.org; Fri, 16 Jun 2023 13:17:20 -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 ) id 1qAD4X-00009U-Ac for guix-patches@gnu.org; Fri, 16 Jun 2023 13:17:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAD4U-00006Q-Qa for guix-patches@gnu.org; Fri, 16 Jun 2023 13:17:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 66994240103 for ; Fri, 16 Jun 2023 19:17:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1686935831; bh=478c/nhtf89LgUB/iJBqc8w8lZr0UrHed79gGXPXGvQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=LhKlX5uI5dKyw3F7UHen46f/rOH/mpM8LRywSSmwvQNfS6+us7WNXJfob2gkvRQHU 65gWtWYwfhINGTd25mhAfSPh3pb+0g8UNdIP6XEh17xDIUz/G807Jr42oTnvpDjTzu Ty1dBPk6jhqk7fI7kQOCPYIhrLIrbS0/JrdBS3IE40V3rmKmnt1nohK6iZlW+n6p2L jM5oxEGFaU3tyyE9QwFOvPtuJl0iDwq44GyNolf5CnJBTkSLALsQ8zUP7ZfSgEgwKG YfZgZ2zQonEPFbDDmOBnKhsSBc2VOZUyJO9x5gze3JdrIPl9wHTKS7ZQ+T+J/jAehT SjIa0SQ77jZiA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QjQnf6pNjz9rxM; Fri, 16 Jun 2023 19:17:10 +0200 (CEST) From: David Elsing Date: Fri, 16 Jun 2023 17:16:44 +0000 Message-Id: <9ae0d0f6a21a74fc0b36c52f23bbbd44b251d039.1686934712.git.david.elsing@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=david.elsing@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686935902; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=wvIoxL8Cc80PuvLfe9PMjt49VE3Ij5ZLe1KgrAboVYk=; b=NjoWWFytQet3QiUYcm5Y87o99jBI0QV3vkTG096XPuuASkmo+rxNQFNszJUZlkhfR+0Xtt teGPvnu4pghTWX4rQSNmFXTs0InBj/WNU5W2thzUG5LCg4Ih6UWRzynuTbtHIH0GixyGxP 4CgfzDN/PuOuvxJ22CbF7pXw0jOsBDvQ/qu3Bjt7ry6UoholW8Eeb7BPL0k79qhPOTTtdk dlxAkdKYGhUJ8ChpQIICXYx8oQdvPunrF4xqZSk5Zf9uUQRkVAD5Uc5iX2YLRmxlFnCNol MTMOslD13M0ZsBDA2sNO82+6XqvSZiu9P/tWqnFSxY948Ckrx16/BThJaw8Mkg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=LhKlX5uI; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686935902; a=rsa-sha256; cv=none; b=Jb4Qwo3gfQ4vYzI5YAEGNQ5/JEYDUDS/w034UEnjObBwftamq7wHuON7vyMnDJ0qiMttGa YVPnY4kINYnvfF92F/pUXF4344vPlrjvfEgxRDfhamzbFdhdQ5sF446foZnMpHGeFGv8rN 1pU3d6I4Y9kSWzFnMolSAopKYZx4vqE1LJffdeHwEScWkN/9NFkAaG4kNeqfUqdH/47xp3 pjC+9eId/9YjCu+HpVLaNnacZQrJhD2U8U/W7JwAQYQsHqbVfn4rayPU2ubhvCkoi7nvlg txma8848yzDH8RWdoTsGtg7xyefONel6KT2vanfEzLe5F04ErOyq7xxEPpWTIw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=LhKlX5uI; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 93101BFAC X-Spam-Score: -0.03 X-TUID: VEkh1GRa2t0H * gnu/packages/algebra.scm (fftw): Update to 3.3.10. [source]: Use git checkout without autogenerated files. [arguments]<#:configure-flags>: Use Gexps and set --enable-maintainer-mode. <#:modules>: Add (ice-9 ftw) and (srfi srfi-26). <#:phases>: Add phases to run the code generation and build documentation. [native-inputs]: Add autoconf, automake, ghostscript, indent, libtool, ocaml, ocamlbuild, ocaml-num, ocaml-findlib, texinfo and transfig. (fftwf,fftw-openmpi)[arguments]: Use Gexps. --- Hello, I noticed that the FFTW release tarballs already contain the autogenerated codelets and the built documentation. Building them of course adds a lot more dependencies. gnu/packages/algebra.scm | 140 +++++++++++++++++++++++++++------------ 1 file changed, 98 insertions(+), 42 deletions(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 3babf90b3c..ca5831066a 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2020, 2021, 2023 Vinicius Monego ;;; Copyright © 2021 Lars-Dominik Braun ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2023 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,6 +39,7 @@ (define-module (gnu packages algebra) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages code) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages documentation) @@ -45,6 +47,7 @@ (define-module (gnu packages algebra) #:use-module (gnu packages flex) #:use-module (gnu packages fltk) #:use-module (gnu packages gcc) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages graphviz) #:use-module (gnu packages image) @@ -63,6 +66,7 @@ (define-module (gnu packages algebra) #:use-module (gnu packages shells) #:use-module (gnu packages tex) #:use-module (gnu packages texinfo) + #:use-module (gnu packages xfig) #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -737,39 +741,91 @@ (define-public kiss-fft-for-extempore (define-public fftw (package (name "fftw") - (version "3.3.8") + (version "3.3.10") (source (origin - (method url-fetch) - (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-" - version".tar.gz")) - (sha256 - (base32 - "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1")))) + ;; Release tarball contains many generated files + (method git-fetch) + (uri (git-reference + (url "https://github.com/FFTW/fftw3") + (commit (string-append "fftw-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "11r4kd1478mi35vv6fgmg6qibqkqjhb77pqxaa8374rxdlqazgyy")))) (build-system gnu-build-system) (arguments - `(#:configure-flags - '("--enable-shared" "--enable-openmp" "--enable-threads" - ,@(let ((system (or (%current-target-system) (%current-system)))) - ;; Enable SIMD extensions for codelets. See details at: - ;; . - (cond - ((string-prefix? "x86_64" system) - '("--enable-sse2" "--enable-avx" "--enable-avx2" - "--enable-avx512" "--enable-avx-128-fma")) - ((string-prefix? "i686" system) - '("--enable-sse2")) - ((string-prefix? "aarch64" system) - ;; Note that fftw supports NEON on 32-bit ARM only when - ;; compiled for single-precision. - '("--enable-neon")) - (else - '()))) - ;; By default '-mtune=native' is used. However, that may cause the - ;; use of ISA extensions (e.g. AVX) that are not necessarily - ;; available on the user's machine when that package is built on a - ;; different machine. - "ax_cv_c_flags__mtune_native=no"))) - (native-inputs (list perl)) + (list + #:configure-flags + #~(list "--enable-shared" + "--enable-openmp" + "--enable-threads" + "--enable-maintainer-mode" + #$@(let ((system (or (%current-target-system) (%current-system)))) + ;; Enable SIMD extensions for codelets. See details at: + ;; . + (cond + ((string-prefix? "x86_64" system) + '("--enable-sse2" "--enable-avx" "--enable-avx2" + "--enable-avx512" "--enable-avx-128-fma")) + ((string-prefix? "i686" system) + '("--enable-sse2")) + ((string-prefix? "aarch64" system) + ;; Note that fftw supports NEON on 32-bit ARM only when + ;; compiled for single-precision. + '("--enable-neon")) + (else '()))) + ;; By default '-mtune=native' is used. However, that may cause the + ;; use of ISA extensions (e.g. AVX) that are not necessarily + ;; available on the user's machine when that package is built on a + ;; different machine. + "ax_cv_c_flags__mtune_native=no") + #:modules '((ice-9 ftw) + (srfi srfi-26) + (guix build utils) + (guix build gnu-build-system)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-bootstrap + (lambda _ + ;; This script calls configure + (delete-file "bootstrap.sh") + (invoke "touch" "ChangeLog") + ;; OCaml Num library + (substitute* "genfft/Makefile.am" + ((",nums") + " -package num")))) + (add-after 'build 'build-doc + (lambda _ + ;; Reproducibility + (substitute* "doc/FAQ/m-html.pl" + (("- \\$html_date\\\\n") "") + (("\\$html_year \\$user_copyholder") + "2022 $user_copyholder")) + (substitute* "doc/FAQ/fftw-faq.bfnn" + ((".*`date.*") "")) + (invoke "make" "-C" "doc") + (invoke "make" "-C" "doc" "html") + (invoke "make" "-C" "doc/FAQ" "faq"))) + (add-after 'install 'install-doc + (let ((doc (string-append #$output "/share/doc/" + #$name "-" #$version))) + (lambda _ + (copy-recursively "doc/html" (string-append doc "/html")) + (copy-recursively "doc/FAQ/fftw-faq.html" + (string-append doc "/fftw-faq.html")) + (install-file "doc/FAQ/fftw-faq.ascii" doc))))))) + (native-inputs (list autoconf + automake + ghostscript + indent + libtool + ocaml + ocamlbuild + ocaml-num + ocaml-findlib + perl + texinfo + transfig)) (home-page "https://fftw.org") (synopsis "Computing the discrete Fourier transform") (description @@ -785,14 +841,14 @@ (define-public fftwf (arguments (substitute-keyword-arguments (package-arguments fftw) ((#:configure-flags fftw-configure-flags) - `(cons* "--enable-single" - ,@(if (string-prefix? "arm" (or (%current-target-system) - (%current-system))) - ;; fftw supports NEON on 32-bit ARM only when compiled - ;; for single-precision, so add it here. - '("--enable-neon") - '()) - ,fftw-configure-flags)))) + #~(cons* "--enable-single" + #$@(if (string-prefix? "arm" (or (%current-target-system) + (%current-system))) + ;; fftw supports NEON on 32-bit ARM only when compiled + ;; for single-precision, so add it here. + '("--enable-neon") + '()) + #$fftw-configure-flags)))) (description (string-append (package-description fftw) " Single-precision version.")))) @@ -806,11 +862,11 @@ (define-public fftw-openmpi (arguments (substitute-keyword-arguments (package-arguments fftw) ((#:configure-flags cf) - `(cons "--enable-mpi" ,cf)) + #~(cons "--enable-mpi" #$cf)) ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-before 'check 'mpi-setup - ,%openmpi-setup))))) + #~(modify-phases #$phases + (add-before 'check 'mpi-setup + #$%openmpi-setup))))) (description (string-append (package-description fftw) " With OpenMPI parallelism support.")))) -- 2.40.1