GNU bug report logs - #41995
[PATCH 1/2] gnu: Add symengine.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Mon, 22 Jun 2020 01:03:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 41995 in the body.
You can then email your comments to 41995 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


Report forwarded to guix-patches <at> gnu.org:
bug#41995; Package guix-patches. (Mon, 22 Jun 2020 01:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vinicius Monego <monego <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 22 Jun 2020 01:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 1/2] gnu: Add symengine.
Date: Sun, 21 Jun 2020 22:01:54 -0300
* gnu/packages/algebra.scm (symengine): New variable.
---
 gnu/packages/algebra.scm | 42 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index b78e6ef304..ec381ac708 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll <at> gmail.com>
+;;; Copyright © 2020 Vinicius Monego <monego <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages java)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
@@ -946,6 +948,46 @@ minimization and curve fitting.  It is mature code, based on decades-old
 algorithms from the FORTRAN library MINPACK.")
     (license license:bsd-2)))
 
+(define-public symengine
+  (package
+    (name "symengine")
+    (version "0.6.0")
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/symengine/symengine.git")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32 "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags
+       '("-DCMAKE_BUILD_TYPE=Release"
+         "-DWITH_GMP=on"
+         "-DWITH_MPFR=on"
+         "-DWITH_MPC=on"
+         "-DINTEGER_CLASS=flint"
+         "-DWITH_LLVM=on"
+         "-DWITH_SYMENGINE_THREAD_SAFE=on"
+         "-DWITH_TCMALLOC=on")))
+    (native-inputs
+     `(("gperftools" ,gperftools)
+       ("llvm" ,llvm)))
+    (inputs
+     `(("flint" ,flint)
+       ("gmp" ,gmp)
+       ("mpc" ,mpc)
+       ("mpfr" ,mpfr)))
+    (home-page "https://github.com/symengine/symengine")
+    (synopsis "Fast symbolic manipulation library")
+    (description "SymEngine is a standalone fast C++ symbolic manipulation
+library.  Optional thin wrappers allow usage of the library from other
+languages.")
+    (license (list license:expat     ;; SymEngine.
+                   license:bsd-3)))) ;; Third party code.
+
 (define-public eigen
   (package
     (name "eigen")
-- 
2.20.1





Information forwarded to guix-patches <at> gnu.org:
bug#41995; Package guix-patches. (Wed, 24 Jun 2020 06:58:01 GMT) Full text and rfc822 format available.

Message #8 received at 41995 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 41995 <at> debbugs.gnu.org
Subject: Re: [bug#41995] [PATCH 1/2] gnu: Add symengine.
Date: Wed, 24 Jun 2020 08:57:44 +0200
Hello,

Vinicius Monego <monego <at> posteo.net> writes:

> * gnu/packages/algebra.scm (symengine): New variable.

Thank you.

I couldn't build it because gperftools currently has a failing test.

> +     '(#:configure-flags
> +       '("-DCMAKE_BUILD_TYPE=Release"
> +         "-DWITH_GMP=on"
> +         "-DWITH_MPFR=on"
> +         "-DWITH_MPC=on"
> +         "-DINTEGER_CLASS=flint"
> +         "-DWITH_LLVM=on"
> +         "-DWITH_SYMENGINE_THREAD_SAFE=on"

IIUC correctly, these are the suggested build options in the README. It
may be worth adding a comment about it since this looks a bit
opinionated.

> +         "-DWITH_TCMALLOC=on")))

This does not belong to the set of suggested build options. Is there
a particular reason to activate it? If so, would it make sense to add
a comment about it?

I also see there is a "BUILD_SHARED_LIBS" flag, off by default. Would it
make sense to activate it?

> +    (license (list license:expat     ;; SymEngine.
> +                   license:bsd-3)))) ;; Third party code.

In both comments, there should be a single semicolon and no full stop.

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#41995; Package guix-patches. (Wed, 24 Jun 2020 13:18:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 1/2] gnu: Add symengine.
Date: Wed, 24 Jun 2020 10:16:55 -0300
* gnu/packages/algebra.scm (symengine): New variable.
---
Removed TCMalloc and gperftools, build libsymengine, add comments
 gnu/packages/algebra.scm | 42 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index b78e6ef304..34e6d40dbb 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll <at> gmail.com>
+;;; Copyright © 2020 Vinicius Monego <monego <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages java)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
@@ -946,6 +948,46 @@ minimization and curve fitting.  It is mature code, based on decades-old
 algorithms from the FORTRAN library MINPACK.")
     (license license:bsd-2)))
 
+(define-public symengine
+  (package
+    (name "symengine")
+    (version "0.6.0")
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/symengine/symengine.git")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32 "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(;; These are the suggested build options in the README.
+       #:configure-flags
+       '("-DCMAKE_BUILD_TYPE=Release"
+         "-DWITH_GMP=on"
+         "-DWITH_MPFR=on"
+         "-DWITH_MPC=on"
+         "-DINTEGER_CLASS=flint"
+         "-DWITH_LLVM=on"
+         "-DWITH_SYMENGINE_THREAD_SAFE=on"
+         "-DBUILD_SHARED_LIBS=on"))) ; also build libsymengine
+    (native-inputs
+     `(("llvm" ,llvm)))
+    (inputs
+     `(("flint" ,flint)
+       ("gmp" ,gmp)
+       ("mpc" ,mpc)
+       ("mpfr" ,mpfr)))
+    (home-page "https://github.com/symengine/symengine")
+    (synopsis "Fast symbolic manipulation library")
+    (description "SymEngine is a standalone fast C++ symbolic manipulation
+library.  Optional thin wrappers allow usage of the library from other
+languages.")
+    (license (list license:expat     ; SymEngine
+                   license:bsd-3)))) ; 3rd party code
+
 (define-public eigen
   (package
     (name "eigen")
-- 
2.20.1





Information forwarded to guix-patches <at> gnu.org:
bug#41995; Package guix-patches. (Wed, 24 Jun 2020 13:18:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 2/2] gnu: Add python-symengine.
Date: Wed, 24 Jun 2020 10:16:56 -0300
* gnu/packages/python-xyz.scm (python-symengine): New variable.
---
Removed python2 definition

 gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e95dec21c2..9e350e1688 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -81,6 +81,7 @@
 ;;; Copyright © 2020 Josh Holland <josh <at> inv.alid.pw>
 ;;; Copyright © 2020 Yuval Kogman <nothingmuch <at> woobling.org>
 ;;; Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
+;;; Copyright © 2020 Vinicius Monego <monego <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -106,6 +107,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
@@ -10046,6 +10048,28 @@ document.")
 (define-public python2-jmespath
   (package-with-python2 python-jmespath))
 
+(define-public python-symengine
+  (package
+  (name "python-symengine")
+  (version "0.6.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "symengine" version))
+      (sha256
+        (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
+  (build-system python-build-system)
+  (native-inputs
+   `(("cmake" ,cmake)
+     ("python-cython" ,python-cython)))
+  (inputs
+   `(("symengine" ,symengine)))
+  (home-page "https://github.com/symengine/symengine.py")
+  (synopsis "Python library providing wrappers to SymEngine")
+  (description "This library provides a Python wrapper to SymEngine, a fast C++
+symbolic manipulation library.")
+  (license license:expat)))
+
 (define-public python-botocore
   (package
     (name "python-botocore")
-- 
2.20.1





Information forwarded to guix-patches <at> gnu.org:
bug#41995; Package guix-patches. (Wed, 24 Jun 2020 13:40:02 GMT) Full text and rfc822 format available.

Message #17 received at 41995 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 41995 <at> debbugs.gnu.org
Subject: Re: [bug#41995] [PATCH 1/2] gnu: Add symengine.
Date: Wed, 24 Jun 2020 10:39:29 -0300
Hello Nicolas,

> +         "-DWITH_TCMALLOC=on")))
> 
> This does not belong to the set of suggested build options. Is there
> a particular reason to activate it? If so, would it make sense to add
> a comment about it?

That was part of the optimized build suggestions. I removed it, since
this feature is provided by gperftools and it's causing trouble.

> I also see there is a "BUILD_SHARED_LIBS" flag, off by default. Would
> it
> make sense to activate it?

The shared library is used by the Julia wrapper. I noticed that we have
a Julia build system, so I enabled this too.

The other suggestions were also applied.





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Wed, 24 Jun 2020 17:50:01 GMT) Full text and rfc822 format available.

Notification sent to Vinicius Monego <monego <at> posteo.net>:
bug acknowledged by developer. (Wed, 24 Jun 2020 17:50:01 GMT) Full text and rfc822 format available.

Message #22 received at 41995-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 41995-done <at> debbugs.gnu.org
Subject: Re: [bug#41995] [PATCH 1/2] gnu: Add symengine.
Date: Wed, 24 Jun 2020 19:49:03 +0200
Hello,

Vinicius Monego <monego <at> posteo.net> writes:

> The other suggestions were also applied.

I applied both patches. I had to fix indentation. You may want to find
out why it was off.

Thank you!

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 23 Jul 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.