Package: guix-patches;
Reported by: Felix Gruber <felgru <at> posteo.net>
Date: Sat, 29 Feb 2020 16:31:02 UTC
Severity: normal
Tags: patch
Done: Leo Famulari <leo <at> famulari.name>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39839 in the body.
You can then email your comments to 39839 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#39839
; Package guix-patches
.
(Sat, 29 Feb 2020 16:31:02 GMT) Full text and rfc822 format available.Felix Gruber <felgru <at> posteo.net>
:guix-patches <at> gnu.org
.
(Sat, 29 Feb 2020 16:31:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Felix Gruber <felgru <at> posteo.net> To: guix-patches <at> gnu.org Cc: Felix Gruber <felgru <at> posteo.net> Subject: [PATCH] gnu: suitesparse: Update to 5.7.1 Date: Sat, 29 Feb 2020 16:46:47 +0100
* 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]: add 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/maths.scm | 26 ++++++++++++++----- .../patches/suitesparse-mongoose-cmake.patch | 18 +++++++++++++ 2 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/suitesparse-mongoose-cmake.patch diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index cab84a520b..cee626f179 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -34,6 +34,7 @@ ;;; Copyright © 2019 Steve Sprang <scs <at> stevesprang.com> ;;; Copyright © 2019 Robert Smith <robertsmith <at> posteo.net> ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net> +;;; Copyright © 2020 Felix Gruber <felgru <at> posteo.net> ;;; ;;; 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 (only 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..e224d73a30 --- /dev/null +++ b/gnu/packages/patches/suitesparse-mongoose-cmake.patch @@ -0,0 +1,18 @@ +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 () -- 2.25.1
guix-patches <at> gnu.org
:bug#39839
; Package guix-patches
.
(Wed, 04 Mar 2020 20:08:01 GMT) Full text and rfc822 format available.Message #8 received at 39839 <at> debbugs.gnu.org (full text, mbox):
From: Leo Famulari <leo <at> famulari.name> To: Felix Gruber <felgru <at> posteo.net> Cc: 39839 <at> debbugs.gnu.org Subject: Re: [bug#39839] [PATCH] gnu: suitesparse: Update to 5.7.1 Date: Wed, 4 Mar 2020 15:07:25 -0500
On Sat, Feb 29, 2020 at 04:46:47PM +0100, Felix Gruber wrote: > * 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]: add 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. Thanks! Remember to also register the patch file in 'gnu/local.mk', mention that in the commit message, and also mention the new patch file. Check this commit for an example: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=ca5e404f9a1ff81a38a32578c9c3a6c866482a9a > - (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)))) Okay. > @@ -3429,6 +3432,14 @@ Fresnel integrals, and similar related functions as well.") > "BLAS=-lblas" > "TBB=-ltbb" > "MY_METIS_LIB=-lmetis" > + ;; Flags for cmake (only GraphBLAS and Mongoose) Can you clarify "only GraphBLAS and Mongoose" here? Like, are these flags so that we can build those components? > diff --git a/gnu/packages/patches/suitesparse-mongoose-cmake.patch b/gnu/packages/patches/suitesparse-mongoose-cmake.patch Can you add a comment at the beginning of this file explaining what problem it solves? Can you send a revised patch?
guix-patches <at> gnu.org
:bug#39839
; Package guix-patches
.
(Wed, 04 Mar 2020 21:43:01 GMT) Full text and rfc822 format available.Message #11 received at 39839 <at> debbugs.gnu.org (full text, mbox):
From: Felix Gruber <felgru <at> posteo.net> To: Leo Famulari <leo <at> famulari.name> Cc: Felix Gruber <felgru <at> posteo.net>, 39839 <at> debbugs.gnu.org Subject: [PATCH v2] gnu: suitesparse: Update to 5.7.1 Date: Wed, 4 Mar 2020 22:41:08 +0100
* 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 <scs <at> stevesprang.com> ;;; Copyright © 2019 Robert Smith <robertsmith <at> posteo.net> ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net> +;;; Copyright © 2020 Felix Gruber <felgru <at> posteo.net> ;;; ;;; 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 () -- 2.25.1
Leo Famulari <leo <at> famulari.name>
:Felix Gruber <felgru <at> posteo.net>
:Message #16 received at 39839-done <at> debbugs.gnu.org (full text, mbox):
From: Leo Famulari <leo <at> famulari.name> To: Felix Gruber <felgru <at> posteo.net> Cc: 39839-done <at> debbugs.gnu.org Subject: Re: [PATCH v2] gnu: suitesparse: Update to 5.7.1 Date: Wed, 4 Mar 2020 18:08:41 -0500
On Wed, Mar 04, 2020 at 10:41:08PM +0100, Felix Gruber wrote: > * 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. Thanks! Pushed as aac148a87b9a79b9992b8b1a9d76c217175d4a88
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 02 Apr 2020 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.