From patchwork Wed Mar 4 21:41:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Gruber X-Patchwork-Id: 20537 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 67DAB27BBE4; Wed, 4 Mar 2020 21:43:14 +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,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 ESMTP id 6B39727BBEA for ; Wed, 4 Mar 2020 21:43:13 +0000 (GMT) Received: from localhost ([::1]:40158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9bnM-00053x-RT for patchwork@mira.cbaines.net; Wed, 04 Mar 2020 16:43:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53510) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9bnE-00051S-MC for guix-patches@gnu.org; Wed, 04 Mar 2020 16:43:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9bnC-0004Pt-AP for guix-patches@gnu.org; Wed, 04 Mar 2020 16:43:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9bnB-0004P7-T6 for guix-patches@gnu.org; Wed, 04 Mar 2020 16:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j9bnB-0000fL-R1 for guix-patches@gnu.org; Wed, 04 Mar 2020 16:43:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39839] [PATCH v2] gnu: suitesparse: Update to 5.7.1 Resent-From: Felix Gruber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Mar 2020 21:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39839 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Famulari Cc: Felix Gruber , 39839@debbugs.gnu.org Received: via spool by 39839-submit@debbugs.gnu.org id=B39839.15833581582528 (code B ref 39839); Wed, 04 Mar 2020 21:43:01 +0000 Received: (at 39839) by debbugs.gnu.org; 4 Mar 2020 21:42:38 +0000 Received: from localhost ([127.0.0.1]:41926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9bmk-0000ed-Lq for submit@debbugs.gnu.org; Wed, 04 Mar 2020 16:42:38 -0500 Received: from mout01.posteo.de ([185.67.36.65]:57852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9bme-0000eJ-NL for 39839@debbugs.gnu.org; Wed, 04 Mar 2020 16:42:32 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DBFBC16005E for <39839@debbugs.gnu.org>; Wed, 4 Mar 2020 22:42:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1583358141; bh=9rPDtuvE4BVnWAgJ6nhkl+MBlil5k240t13VEX/SGCI=; h=From:To:Cc:Subject:Date:From; b=OsAtQQiZPbnxqlehDOGkOLbrnoXrvgC4Lxe3htYdacZdWe6im4Z/zf4eidgw4UZFm PQV5KC2h9WZBupT/WkH28z/wG7hnJdtp5FwZX4352nUF+BhkA7FQa4713FJwbAEs1J D8iS8Q8rYyHhFX1ZDjHR5cxC1cuPbNLECstka+ppmE5mGCFfXs5YwXklPjTxUAeq7B uPAtVDYlyfw4RM0EURuBWTtqWzVmofsvDth/ZFsG3MDa4eqnNQyZI5ThoYfbsYK9hX gQuQZrjyQ5pHuijd2cNASfodMg9Q2qXKTNKWut8eG0ndGrkEDA1201zQIKgpUPxXep /r1NhscVzQAeQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48XnR03Z2Gz6tm8; Wed, 4 Mar 2020 22:42:20 +0100 (CET) From: Felix Gruber Date: Wed, 4 Mar 2020 22:41:08 +0100 Message-Id: <20200304214108.28605-1-felgru@posteo.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200304200725.GA6776@jasmine.lan> References: <20200304200725.GA6776@jasmine.lan> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 * gnu/packages/math.scm (suitesparse): Update to 5.7.1 [source]: The latest releases of SuiteSparse have only been published on GitHub. Fetch from git tag as GitHub releases page only contains autogenerated tarballs that guix lint complains about. [patches]: apply patch for Mongoose's CMakeList.txt to find SuiteSparse_config. [arguments]: Add cmake flags used by new components GraphBLAS and Mongoose. [native-inputs]: add cmake and m4 needed to build GraphBLAS and Mongoose. * gnu/packages/patches/suitesparse-mongoose-cmake.patch: New file. * gnu/local.mk (dist_patch_DATA): Add new patch. --- This revised version of the patch adds suitesparse-mongoose-cmake.patch to gnu/local.mk and documents its purpose. It also clarifies that the new CMake options are required to build the Mongoose and GraphBLAS components. gnu/local.mk | 1 + gnu/packages/maths.scm | 26 +++++++++++++----- .../patches/suitesparse-mongoose-cmake.patch | 27 +++++++++++++++++++ 3 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/suitesparse-mongoose-cmake.patch diff --git a/gnu/local.mk b/gnu/local.mk index 857345cfad..928428e95d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1411,6 +1411,7 @@ dist_patch_DATA = \ %D%/packages/patches/soundconverter-remove-gconf-dependency.patch \ %D%/packages/patches/spice-fix-test-armhf.patch \ %D%/packages/patches/steghide-fixes.patch \ + %D%/packages/patches/suitesparse-mongoose-cmake.patch \ %D%/packages/patches/superlu-dist-awpm-grid.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ %D%/packages/patches/supertux-unbundle-squirrel.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index cab84a520b..a990ffc45e 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -34,6 +34,7 @@ ;;; Copyright © 2019 Steve Sprang ;;; Copyright © 2019 Robert Smith ;;; Copyright © 2020 Jakub Kądziołka +;;; Copyright © 2020 Felix Gruber ;;; ;;; This file is part of GNU Guix. ;;; @@ -3405,16 +3406,18 @@ Fresnel integrals, and similar related functions as well.") (define-public suitesparse (package (name "suitesparse") - (version "4.5.5") + (version "5.7.1") (source (origin - (method url-fetch) - (uri (string-append - "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/DrTimothyAldenDavis/SuiteSparse.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1dnr6pmjzc2qmbkmb4shigx1l74ilf6abn7svyd6brxgvph8vadr")) + "174p3l78kv9gaa0i5hflyai2ydwnjzh34k9938sl4aa3li0543s8")) + (patches (search-patches "suitesparse-mongoose-cmake.patch")) (modules '((guix build utils))) (snippet ;; Remove bundled metis source @@ -3429,6 +3432,14 @@ Fresnel integrals, and similar related functions as well.") "BLAS=-lblas" "TBB=-ltbb" "MY_METIS_LIB=-lmetis" + ;; Flags for cmake (required to build GraphBLAS and Mongoose) + (string-append "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=" + (assoc-ref %outputs "out") + " -DCMAKE_VERBOSE_MAKEFILE=ON" + " -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\"" + " -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\"" + " -DCMAKE_SKIP_RPATH=TRUE" + " -DCMAKE_BUILD_TYPE=Release") (string-append "INSTALL_LIB=" (assoc-ref %outputs "out") "/lib") (string-append "INSTALL_INCLUDE=" @@ -3441,6 +3452,9 @@ Fresnel integrals, and similar related functions as well.") `(("tbb" ,tbb) ("lapack" ,lapack) ("metis" ,metis))) + (native-inputs + `(("cmake" ,cmake) + ("m4" ,m4))) (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html") (synopsis "Suite of sparse matrix software") (description diff --git a/gnu/packages/patches/suitesparse-mongoose-cmake.patch b/gnu/packages/patches/suitesparse-mongoose-cmake.patch new file mode 100644 index 0000000000..e5062f9aaa --- /dev/null +++ b/gnu/packages/patches/suitesparse-mongoose-cmake.patch @@ -0,0 +1,27 @@ +Fix required by suitesparse to build Mongoose + +The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been +installed into the suitesparse source directory, which is not the case +for us, as we are building suitesparse out-of-tree. + +SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX} +directory. + +diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt +index 7e134ab..76fa9e2 100644 +--- a/Mongoose/CMakeLists.txt ++++ b/Mongoose/CMakeLists.txt +@@ -148,10 +148,10 @@ set(CMAKE_CXX_STANDARD 11) + #set(CMAKE_CXX_STANDARD_REQUIRED ON) + + # determine which SuiteSparse_config to use +-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config) +- message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".") ++if (EXISTS ${CMAKE_INSTALL_PREFIX}) ++ message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".") + set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config ) +- link_directories ( ${PROJECT_SOURCE_DIR}/../lib ) ++ link_directories ( ${CMAKE_INSTALL_PREFIX}/lib ) + message ( STATUS "Note: ../SuiteSparse_config must be compiled before compiling Mongoose" ) + set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig ) + else ()