GNU bug report logs - #61204
Scilab scientific software

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Wed, 1 Feb 2023 01:08:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

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 61204 in the body.
You can then email your comments to 61204 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#61204; Package guix-patches. (Wed, 01 Feb 2023 01:08:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 01 Feb 2023 01:08:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Subject: Scilab scientific software
Date: Wed, 01 Feb 2023 02:07:00 +0100
Hi guix!

I took a job where I have to use the scientific software suite Scilab in
an old version (5.4.1). I'll probably update it during this job.

I managed to package this version in the non-graphical version of Scilab
5.5.X versions this weekend.

It needs some old software libraries (metis <at> 4, suitesparse <at> 3), which
releases are not even in guix's history, and some compilation errors
fixes.

I go ahead and propose these patches in the next patches. I may continue
to work to propose updates up to the latest versions, but they need some
more work.

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Wed, 01 Feb 2023 01:13:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 1/6] gnu: matio: Add header file.
Date: Wed,  1 Feb 2023 02:12:10 +0100
* gnu/packages/maths.scm (matio):
  [arguments] (phases): Add phase install-matioConfig.h.
---
 gnu/packages/maths.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 4640237968..962b7d117c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5922,6 +5922,14 @@ (define-public matio
         (base32
          "0vr8c1mz1k6mz0sgh6n3scl5c3a71iqmy5fnydrgq504icj4vym4"))))
     (build-system gnu-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install 'install-matioConfig.h
+            (lambda _
+              (install-file "src/matioConfig.h"
+                            (string-append #$output "/include")))))))
     (inputs
      (list zlib hdf5-1.8))
     (home-page "http://matio.sourceforge.net/")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Wed, 01 Feb 2023 01:13:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 2/6] gnu: Add metis-4.
Date: Wed,  1 Feb 2023 02:12:11 +0100
* gnu/packages/maths.scm (metis-4): New variable.
---
 gnu/packages/maths.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 962b7d117c..f00f4f58be 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4354,6 +4354,54 @@ (define-public metis
 schemes.")
     (license license:asl2.0)))          ;As of version 5.0.3
 
+;; This outdated version contains only library and header files. It is used
+;; to build the scilab package.
+(define-public metis-4
+  (package
+    (inherit metis)
+    (name "metis")
+    (version "4.0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/"
+                           "metis-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0m8shi202vprs8d9l51178v0skngzgx81q0d9ln1ng3hh3g3byjy"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f                      ;no tests
+           #:make-flags
+           #~(list "CC=gcc"
+                   "AR=gcc -shared -o"
+                   "RANLIB=touch"
+                   "OPTFLAGS= -O3 "
+                   "COPTIONS= -fPIC"
+                   (string-append
+                    "LDOPTIONS=-Wl,rpath," #$output "/lib")
+                   "METISLIB=../libmetis.so")
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'configure
+                 ;; Make the library shared.
+                 (lambda _
+                   (substitute* "Lib/Makefile"
+                     (("libmetis\\.a")
+                      "libmetis.so"))
+                   (chdir "Lib")))
+               (replace 'install
+                 (lambda _
+                   ;; Library
+                   (chdir "..")
+                   (install-file "libmetis.so"
+                                 (string-append #$output "/lib"))
+                   ;; Includes
+                   (for-each
+                    (lambda (x)
+                      (install-file x (string-append #$output "/include")))
+                    (find-files "Lib" "\\.h$")))))))))
+
 (define-public p4est
   (package
     (name "p4est")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Wed, 01 Feb 2023 01:13:03 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 3/6] gnu: Add suitesparse-3.
Date: Wed,  1 Feb 2023 02:12:12 +0100
* gnu/packages/maths.scm (suitesparse-3): New variable.
---
 gnu/packages/maths.scm | 95 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f00f4f58be..cc138de940 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5116,6 +5116,101 @@ (define-public suitesparse
     ;;  GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
     (license (list license:gpl2+ license:lgpl2.1+))))
 
+
+;; This outdated version is used to build the scilab package.
+(define-public suitesparse-3
+  (package
+    (inherit suitesparse)
+    (name "suitesparse")
+    (version "3.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0wxk755nzps0c9la24zqknqkzjp6rcj5q9jhd973mff1pqja3clz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f  ;no "check" target
+       #:make-flags
+       ,#~(list
+           (string-append "CC=gcc")
+           "AR=gcc -shared -o"
+           "RANLIB=touch"
+           "CFLAGS=-O3 -fPIC -I../Include"
+           "TBB=-ltbb"
+           (string-append
+            "METIS=" (search-input-file %build-inputs "lib/libmetis.so"))
+           (string-append
+            "METIS_PATH="
+            (string-drop-right
+             (search-input-file %build-inputs "lib/libmetis.so")
+             (string-length "/lib/libmetis.so")))
+
+           ;; The default is to link against netlib lapack.  Use OpenBLAS
+           ;; instead.
+           "BLAS=-lopenblas" "LAPACK=-lopenblas"
+
+           (string-append "INSTALL_LIB="
+                          (assoc-ref %outputs "out") "/lib")
+           (string-append "INSTALL_INCLUDE="
+                          (assoc-ref %outputs "out") "/include")
+           "library")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'correct-build-configuration
+           (lambda _
+             ;; Correct metis path.
+             (substitute* "CHOLMOD/Lib/Makefile"
+               (("\\$\\(METIS_PATH\\)\\/Lib")
+                "$(METIS_PATH)/include"))
+             ;; Invert build order: CHOLMOD before KLU.
+             (substitute* "Makefile"
+               (("\t\\( cd CHOLMOD ; \\$\\(MAKE\\) \\)\n$")
+                "")
+               (("\\( cd KLU ; \\$\\(MAKE\\) \\)")
+                (string-append "( cd CHOLMOD ; $(MAKE) )\n\t"
+                               "( cd KLU ; $(MAKE) )")))
+             ;; Build shared libraries.
+             (substitute* (find-files "." "akefile$")
+               (("lib([a-z]+)\\.a" all libname)
+                (string-append "lib" libname ".so")))
+             ;; Delete broken KLU Demo step.
+             (substitute* "KLU/Makefile"
+               (("\\( cd Demo ; \\$\\(MAKE\\) \\)")
+                ""))))
+         (replace 'install
+           (lambda _
+             ;; Install libraries.
+             (for-each
+              (lambda (x)
+                (install-file
+                 x
+                 (string-append (assoc-ref %outputs "out") "/lib")))
+              (find-files "." "\\.so$"))
+             ;; Install header files.
+             (for-each
+              (lambda (x)
+                (install-file
+                 x
+                 (string-append (assoc-ref %outputs "out") "/include")))
+              (find-files "." "\\.h$"))))
+         ,@(if (target-riscv64?)
+               ;; GraphBLAS FTBFS on riscv64-linux
+               `((add-after 'unpack 'skip-graphblas
+                   (lambda _
+                     (substitute* "Makefile"
+                       ((".*cd GraphBLAS.*") "")
+                       (("metisinstall gbinstall moninstall")
+                        "metisinstall moninstall")))))
+               '())
+         (delete 'configure))))         ;no configure script
+    (inputs
+     (list tbb openblas gmp mpfr metis-4))))
+
 (define-public atlas
   (package
     (name "atlas")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Wed, 01 Feb 2023 01:13:03 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 5/6] gnu: scilab: Update to 5.5.1.
Date: Wed,  1 Feb 2023 02:12:14 +0100
* gnu/packages/maths.scm (scilab): Update to 5.5.1.
---
 gnu/packages/maths.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 937c829a0b..5f944a1d50 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8324,7 +8324,7 @@ (define-public optizelle
 (define-public scilab
   (package
     (name "scilab")
-    (version "5.5.0")
+    (version "5.5.1")
     (source
      (origin
        (method url-fetch)
@@ -8332,7 +8332,7 @@ (define-public scilab
         (string-append "https://oos.eu-west-2.outscale.com/scilab-releases/"
                        version "/scilab-" version "-src.tar.gz"))
        (sha256
-        (base32 "1hx57aji5d78brwqcf8a34i1hasm3h4nw46xjg7cgxj09s8yz5kq"))))
+        (base32 "0ab7h0hdra4fjy505pivg6dbgcdxa4vd30g8gjhk8x7i28z24mn0"))))
     (build-system gnu-build-system)
     (native-inputs (list pkg-config gfortran))
     (inputs (list libxml2
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Wed, 01 Feb 2023 01:13:03 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 6/6] gnu: scilab: Update to 5.5.2.
Date: Wed,  1 Feb 2023 02:12:15 +0100
* gnu/packages/maths.scm (scilab): Update to 5.5.2.
---
 gnu/packages/maths.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5f944a1d50..bdc9e75498 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8324,7 +8324,7 @@ (define-public optizelle
 (define-public scilab
   (package
     (name "scilab")
-    (version "5.5.1")
+    (version "5.5.2")
     (source
      (origin
        (method url-fetch)
@@ -8332,7 +8332,7 @@ (define-public scilab
         (string-append "https://oos.eu-west-2.outscale.com/scilab-releases/"
                        version "/scilab-" version "-src.tar.gz"))
        (sha256
-        (base32 "0ab7h0hdra4fjy505pivg6dbgcdxa4vd30g8gjhk8x7i28z24mn0"))))
+        (base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))))
     (build-system gnu-build-system)
     (native-inputs (list pkg-config gfortran))
     (inputs (list libxml2
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Fri, 10 Feb 2023 23:09:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 61204 <at> debbugs.gnu.org
Subject: Re: bug#61204: Scilab scientific software
Date: Sat, 11 Feb 2023 00:08:09 +0100
Hi Nicolas,

Nicolas Graves <ngraves <at> ngraves.fr> skribis:

> I took a job where I have to use the scientific software suite Scilab in
> an old version (5.4.1). I'll probably update it during this job.

Heh, congrats on the new job, and yay for free software! :-)

> I managed to package this version in the non-graphical version of Scilab
> 5.5.X versions this weekend.
>
> It needs some old software libraries (metis <at> 4, suitesparse <at> 3), which
> releases are not even in guix's history, and some compilation errors
> fixes.
>
> I go ahead and propose these patches in the next patches. I may continue
> to work to propose updates up to the latest versions, but they need some
> more work.

Looks like we’re missing patch 4/6, which actually adds Scilab.

Did it get stuck on its way?

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Sat, 11 Feb 2023 10:10:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] gnu: Add scilab.
Date: Sat, 11 Feb 2023 11:09:37 +0100
* gnu/packages/maths.scm (scilab): New variable.
---
 gnu/packages/maths.scm | 106 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 741ecc2798..81dba14674 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8319,3 +8319,109 @@ (define-public optizelle
 provided for applications written in C++ and Python.  Parallel
 computation is supported via MPI.")
     (license license:bsd-2))))
+
+(define-public scilab
+  (package
+    (name "scilab")
+    (version "5.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://oos.eu-west-2.outscale.com/scilab-releases/"
+                       version "/scilab-" version "-src.tar.gz"))
+       (sha256
+        (base32 "1hx57aji5d78brwqcf8a34i1hasm3h4nw46xjg7cgxj09s8yz5kq"))))
+    (build-system gnu-build-system)
+    (native-inputs (list pkg-config gfortran))
+    (inputs (list libxml2
+                  `(,pcre "bin")
+                  `(,pcre "out")
+                  readline
+                  hdf5-1.8
+                  curl
+                  openblas
+                  lapack
+                  arpack-ng
+                  fftw
+                  gettext-minimal
+                  suitesparse-3
+                  tcl
+                  tk
+                  libx11
+                  matio))
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       ,#~(list
+           "--enable-relocatable"
+           "--disable-static-system-lib"
+           ;; Disable all java code.
+           "--without-gui"
+           "--without-javasci"
+           "--disable-build-help"
+           "--with-external-scirenderer"
+           ;; Tcl and Tk library locations.
+           (string-append "--with-tcl-include="
+                          (string-drop-right
+                           (search-input-file %build-inputs "include/tcl.h")
+                           (string-length "/tcl.h")))
+           (string-append "--with-tcl-library="
+                          (string-drop-right
+                           (search-input-directory %build-inputs "lib/tcl8")
+                           (string-length "/tcl8")))
+           (string-append "--with-tk-include="
+                          (string-drop-right
+                           (search-input-file %build-inputs "include/tk.h")
+                           (string-length "/tk.h")))
+           (string-append "--with-tk-library="
+                          (string-drop-right
+                           (search-input-directory %build-inputs "lib/tk8.6")
+                           (string-length "/tk8.6")))
+           ;; There are some 2018-fortran errors that are ignored
+           ;; with this fortran compiler flag.
+           "FFLAGS=-fallow-argument-mismatch")
+       #:phases
+       ,#~(modify-phases %standard-phases
+            (add-before 'build 'pre-build
+              (lambda _
+                ;; Fix scilab script.
+                (substitute* "bin/scilab"
+                  (("\\/bin\\/ls")
+                   (which "ls")))
+                ;; Fix core.start.
+                (substitute* "modules/core/etc/core.start"
+                  (("'SCI/modules")
+                   "SCI+'/modules"))
+                ;; Fix fortran compilation error.
+                (substitute*
+                    "modules/differential_equations/src/fortran/twodq.f"
+                  (("node\\(10\\),node1\\(10\\),node2\\(10\\),coef")
+                   "node(9),node1(9),node2(9),coef"))
+                ;; Fix C compilation errors.
+                ;; remove &
+                (substitute* "modules/hdf5/src/c/h5_readDataFromFile_v1.c"
+                  (("(H5Rdereference\\(_iDatasetId, H5R_OBJECT, )&(.*)\\);$"
+                    all common ref)
+                   (string-append common ref)))
+                ;; fix multiple definitions
+                (substitute* "modules/tclsci/src/c/TCL_Command.h"
+                  (("^__thread")
+                   "extern __thread"))
+                (substitute* "modules/tclsci/src/c/InitTclTk.c"
+                  (("BOOL TK_Started = FALSE;" all)
+                   (string-append all "\n"
+                                  "__threadId TclThread;" "\n"
+                                  "__threadSignal InterpReady;" "\n"
+                                  "__threadSignalLock InterpReadyLock;"
+                                  "\n")))
+                ;; Set SCIHOME to /tmp before macros compilation.
+                (setenv "SCIHOME" "/tmp"))))))
+    (home-page "https://scilab.org")
+    (synopsis "Software for engineers and scientists")
+    (description "This package provides the non-graphical version of the Scilab
+software for engineers and scientists. Scilab is used for signal processing,
+statistical analysis, image enhancement, fluid dynamics simulations, numerical
+optimization, and modeling, simulation of explicit and implicit dynamical
+systems and symbolic manipulations.")
+    (license license:gpl2)))
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Sat, 11 Feb 2023 10:12:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 61204 <at> debbugs.gnu.org
Subject: Re: [bug#61204] Scilab scientific software
Date: Sat, 11 Feb 2023 11:11:42 +0100
On 2023-02-11 00:08, Ludovic Courtès wrote:

> Heh, congrats on the new job, and yay for free software! :-)

Thanks!

> Looks like we’re missing patch 4/6, which actually adds Scilab.
> Did it get stuck on its way?

Most likely yes, I've just resent this patch here.

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Wed, 15 Feb 2023 15:59:02 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Nicolas Graves <ngraves <at> ngraves.fr>, 61204 <at> debbugs.gnu.org
Subject: Re: [bug#61204] Scilab scientific software
Date: Wed, 15 Feb 2023 16:57:19 +0100
Hi,

On Wed, 01 Feb 2023 at 02:07, Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org> wrote:

> I took a job where I have to use the scientific software suite Scilab in
> an old version (5.4.1). I'll probably update it during this job.

Congrats!


> I managed to package this version in the non-graphical version of Scilab
> 5.5.X versions this weekend.

Cool!  Well, I was tweaking and reviewing the series when…

> It needs some old software libraries (metis <at> 4, suitesparse <at> 3), which
> releases are not even in guix's history, and some compilation errors
> fixes.

…I see two issues about licenses:

 1. Metis 4 is not free software
 2. Scilab is Cecill v2.1 and not gpl2 as the patch suggests.

About #2, the fix is easy. :-)

About #1, it will be difficult.

Well, maybe these 3 old versions of Scilab could go to the channel
guix-science [1] or guix-science-non-free [2].

If Scilab 6 works with Metis 5, then there is no issue with the licenses
and could be included.

WDYT?

1: https://github.com/guix-science/guix-science
2: https://github.com/guix-science/guix-science-nonfree

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Thu, 16 Mar 2023 11:27:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 61204 <at> debbugs.gnu.org, Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: Re: bug#61204: Scilab scientific software
Date: Thu, 16 Mar 2023 12:26:47 +0100
Hi Nicolas,

Simon Tournier <zimon.toutoune <at> gmail.com> skribis:

> …I see two issues about licenses:
>
>  1. Metis 4 is not free software
>  2. Scilab is Cecill v2.1 and not gpl2 as the patch suggests.
>
> About #2, the fix is easy. :-)
>
> About #1, it will be difficult.

[...]

> If Scilab 6 works with Metis 5, then there is no issue with the licenses
> and could be included.

Could you check whether using Metis 5 is possible, or whether Metis is
an optional dependency, or whether scotch:metis can be used (Scotch is
another graph partitioner with a Metis compatibility layer)?

TIA,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Sat, 25 Mar 2023 14:16:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, ngraves <at> ngraves.fr
Subject: [PATCH v2 1/3] gnu: matio: Add header file.
Date: Sat, 25 Mar 2023 15:15:20 +0100
* gnu/packages/maths.scm (matio):
  [arguments] (phases): Add phase install-matioConfig.h.
---
 gnu/packages/maths.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 93afc6ed40..5d8e2f0159 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6056,6 +6056,14 @@ (define-public matio
         (base32
          "0vr8c1mz1k6mz0sgh6n3scl5c3a71iqmy5fnydrgq504icj4vym4"))))
     (build-system gnu-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install 'install-matioConfig.h
+            (lambda _
+              (install-file "src/matioConfig.h"
+                            (string-append #$output "/include")))))))
     (inputs
      (list zlib hdf5-1.8))
     (home-page "http://matio.sourceforge.net/")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Sat, 25 Mar 2023 14:16:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, ngraves <at> ngraves.fr
Subject: [PATCH v2 2/3] gnu: Add suitesparse-3.
Date: Sat, 25 Mar 2023 15:15:21 +0100
* gnu/packages/maths.scm (suitesparse-3): New variable.
---
 gnu/packages/maths.scm | 89 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5d8e2f0159..be20e5b581 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5202,6 +5202,95 @@ (define-public suitesparse
     ;;  GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
     (license (list license:gpl2+ license:lgpl2.1+))))
 
+
+;; This outdated version is used to build the scilab package.
+(define-public suitesparse-3
+  (package
+    (inherit suitesparse)
+    (name "suitesparse")
+    (version "3.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0wxk755nzps0c9la24zqknqkzjp6rcj5q9jhd973mff1pqja3clz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f  ;no "check" target
+       #:make-flags
+       ,#~(list
+           (string-append "CC=gcc")
+           "AR=gcc -shared -o"
+           "RANLIB=touch"
+           "CFLAGS=-O3 -fPIC -I../Include"
+           "TBB=-ltbb"
+
+           ;; Disable metis <at> 4 (nonfree) support.
+           "CHOLMOD_CONFIG=-DNPARTITION"
+           "METIS="
+           "METIS_PATH="
+
+           ;; The default is to link against netlib lapack.  Use OpenBLAS
+           ;; instead.
+           "BLAS=-lopenblas" "LAPACK=-lopenblas"
+
+           (string-append "INSTALL_LIB="
+                          (assoc-ref %outputs "out") "/lib")
+           (string-append "INSTALL_INCLUDE="
+                          (assoc-ref %outputs "out") "/include")
+           "library")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'correct-build-configuration
+           (lambda _
+             ;; Invert build order: CHOLMOD before KLU.
+             (substitute* "Makefile"
+               (("\t\\( cd CHOLMOD ; \\$\\(MAKE\\) \\)\n$")
+                "")
+               (("\\( cd KLU ; \\$\\(MAKE\\) \\)")
+                (string-append "( cd CHOLMOD ; $(MAKE) )\n\t"
+                               "( cd KLU ; $(MAKE) )")))
+             ;; Build shared libraries.
+             (substitute* (find-files "." "akefile$")
+               (("lib([a-z]+)\\.a" all libname)
+                (string-append "lib" libname ".so")))
+             ;; Delete broken KLU Demo step.
+             (substitute* "KLU/Makefile"
+               (("\\( cd Demo ; \\$\\(MAKE\\) \\)")
+                ""))))
+         (replace 'install
+           (lambda _
+             ;; Install libraries.
+             (for-each
+              (lambda (x)
+                (install-file
+                 x
+                 (string-append (assoc-ref %outputs "out") "/lib")))
+              (find-files "." "\\.so$"))
+             ;; Install header files.
+             (for-each
+              (lambda (x)
+                (install-file
+                 x
+                 (string-append (assoc-ref %outputs "out") "/include")))
+              (find-files "." "\\.h$"))))
+         ,@(if (target-riscv64?)
+               ;; GraphBLAS FTBFS on riscv64-linux
+               `((add-after 'unpack 'skip-graphblas
+                   (lambda _
+                     (substitute* "Makefile"
+                       ((".*cd GraphBLAS.*") "")
+                       (("metisinstall gbinstall moninstall")
+                        "moninstall")))))
+               '())
+         (delete 'configure))))         ;no configure script
+    (inputs
+     (list tbb openblas gmp mpfr))))
+
 (define-public atlas
   (package
     (name "atlas")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Sat, 25 Mar 2023 14:16:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 61204 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, ngraves <at> ngraves.fr
Subject: [PATCH v2 3/3] gnu: Add scilab.
Date: Sat, 25 Mar 2023 15:15:22 +0100
* gnu/packages/maths.scm (scilab): New variable.
---
 gnu/packages/maths.scm | 106 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index be20e5b581..2bebc51bf9 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8650,3 +8650,109 @@ (define-public optizelle
 provided for applications written in C++ and Python.  Parallel
 computation is supported via MPI.")
     (license license:bsd-2))))
+
+(define-public scilab
+  (package
+    (name "scilab")
+    (version "5.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://oos.eu-west-2.outscale.com/scilab-releases/"
+                       version "/scilab-" version "-src.tar.gz"))
+       (sha256
+        (base32 "1hx57aji5d78brwqcf8a34i1hasm3h4nw46xjg7cgxj09s8yz5kq"))))
+    (build-system gnu-build-system)
+    (native-inputs (list pkg-config gfortran))
+    (inputs (list libxml2
+                  `(,pcre "bin")
+                  `(,pcre "out")
+                  readline
+                  hdf5-1.8
+                  curl
+                  openblas
+                  lapack
+                  arpack-ng
+                  fftw
+                  gettext-minimal
+                  suitesparse-3
+                  tcl
+                  tk
+                  libx11
+                  matio))
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       ,#~(list
+           "--enable-relocatable"
+           "--disable-static-system-lib"
+           ;; Disable all java code.
+           "--without-gui"
+           "--without-javasci"
+           "--disable-build-help"
+           "--with-external-scirenderer"
+           ;; Tcl and Tk library locations.
+           (string-append "--with-tcl-include="
+                          (string-drop-right
+                           (search-input-file %build-inputs "include/tcl.h")
+                           (string-length "/tcl.h")))
+           (string-append "--with-tcl-library="
+                          (string-drop-right
+                           (search-input-directory %build-inputs "lib/tcl8")
+                           (string-length "/tcl8")))
+           (string-append "--with-tk-include="
+                          (string-drop-right
+                           (search-input-file %build-inputs "include/tk.h")
+                           (string-length "/tk.h")))
+           (string-append "--with-tk-library="
+                          (string-drop-right
+                           (search-input-directory %build-inputs "lib/tk8.6")
+                           (string-length "/tk8.6")))
+           ;; There are some 2018-fortran errors that are ignored
+           ;; with this fortran compiler flag.
+           "FFLAGS=-fallow-argument-mismatch")
+       #:phases
+       ,#~(modify-phases %standard-phases
+            (add-before 'build 'pre-build
+              (lambda _
+                ;; Fix scilab script.
+                (substitute* "bin/scilab"
+                  (("\\/bin\\/ls")
+                   (which "ls")))
+                ;; Fix core.start.
+                (substitute* "modules/core/etc/core.start"
+                  (("'SCI/modules")
+                   "SCI+'/modules"))
+                ;; Fix fortran compilation error.
+                (substitute*
+                    "modules/differential_equations/src/fortran/twodq.f"
+                  (("node\\(10\\),node1\\(10\\),node2\\(10\\),coef")
+                   "node(9),node1(9),node2(9),coef"))
+                ;; Fix C compilation errors.
+                ;; remove &
+                (substitute* "modules/hdf5/src/c/h5_readDataFromFile_v1.c"
+                  (("(H5Rdereference\\(_iDatasetId, H5R_OBJECT, )&(.*)\\);$"
+                    all common ref)
+                   (string-append common ref)))
+                ;; fix multiple definitions
+                (substitute* "modules/tclsci/src/c/TCL_Command.h"
+                  (("^__thread")
+                   "extern __thread"))
+                (substitute* "modules/tclsci/src/c/InitTclTk.c"
+                  (("BOOL TK_Started = FALSE;" all)
+                   (string-append all "\n"
+                                  "__threadId TclThread;" "\n"
+                                  "__threadSignal InterpReady;" "\n"
+                                  "__threadSignalLock InterpReadyLock;"
+                                  "\n")))
+                ;; Set SCIHOME to /tmp before macros compilation.
+                (setenv "SCIHOME" "/tmp"))))))
+    (home-page "https://scilab.org")
+    (synopsis "Software for engineers and scientists")
+    (description "This package provides the non-graphical version of the Scilab
+software for engineers and scientists. Scilab is used for signal processing,
+statistical analysis, image enhancement, fluid dynamics simulations, numerical
+optimization, and modeling, simulation of explicit and implicit dynamical
+systems and symbolic manipulations.")
+    (license license:gpl2)))
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Sat, 25 Mar 2023 14:19:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 61204 <at> debbugs.gnu.org, Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: Re: [bug#61204] Scilab scientific software
Date: Sat, 25 Mar 2023 15:17:59 +0100
On 2023-03-16 12:26, Ludovic Courtès wrote:

> Hi Nicolas,
>
> Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
>
>> …I see two issues about licenses:
>>
>>  1. Metis 4 is not free software
>>  2. Scilab is Cecill v2.1 and not gpl2 as the patch suggests.
>>
>> About #2, the fix is easy. :-)
>>
>> About #1, it will be difficult.
>
> [...]
>
>> If Scilab 6 works with Metis 5, then there is no issue with the licenses
>> and could be included.
>
> Could you check whether using Metis 5 is possible, or whether Metis is
> an optional dependency, or whether scotch:metis can be used (Scotch is
> another graph partitioner with a Metis compatibility layer)?

Actually, I've seen that it's possible to compile Suitesparse <at> 3 without
support for Metis <at> 4. Scilab seems to work correctly, so I'll stop here
for this version ;)

I've just send a v2 patch thread. 

>
> TIA,
> Ludo’.
>
>
>

-- 
Best regards,
Nicolas Graves




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 30 Mar 2023 20:44:01 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Thu, 30 Mar 2023 20:44:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 61204-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2 3/3] gnu: Add scilab.
Date: Thu, 30 Mar 2023 22:43:16 +0200
[Message part 1 (text/plain, inline)]
Hi Nicolas,

Nicolas Graves <ngraves <at> ngraves.fr> skribis:

> * gnu/packages/maths.scm (scilab): New variable.

Applied all three patches with the license change below: I checked
‘COPYING’ and scanned a bunch of files, and it’s consistently
CeCILL v2.1.

Thanks!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0d7035df4e..72dccd04bf 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8755,4 +8755,4 @@ (define-public scilab
 statistical analysis, image enhancement, fluid dynamics simulations, numerical
 optimization, and modeling, simulation of explicit and implicit dynamical
 systems and symbolic manipulations.")
-    (license license:gpl2)))
+    (license license:cecill)))                    ;CeCILL v2.1

Information forwarded to guix-patches <at> gnu.org:
bug#61204; Package guix-patches. (Mon, 03 Apr 2023 16:58:04 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Nicolas Graves <ngraves <at> ngraves.fr>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 61204 <at> debbugs.gnu.org
Subject: Re: [bug#61204] Scilab scientific software
Date: Mon, 03 Apr 2023 17:43:45 +0200
Hi,

On sam., 25 mars 2023 at 15:17, Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org> wrote:

> Actually, I've seen that it's possible to compile Suitesparse <at> 3 without
> support for Metis <at> 4. Scilab seems to work correctly, so I'll stop here
> for this version ;)

Cool!

Just a remark about [PATCH v2 3/3] gnu: Add scilab.

+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://oos.eu-west-2.outscale.com/scilab-releases/"
+                       version "/scilab-" version "-src.tar.gz"))
+       (sha256
+        (base32 "1hx57aji5d78brwqcf8a34i1hasm3h4nw46xjg7cgxj09s8yz5kq"))))

Is the URL stable?  It looks like the Cloud solution of Dassault
Systèmes, right?  Dassault Systèmes being the maintainer, right?

Well, the main development repository seems gitlab.com, right?

    https://gitlab.com/scilab/scilab

Why not rely on this gitlab.com URL?  Tarball if the Git history of the
repository is too heavy.  For example,

    https://gitlab.com/scilab/scilab/-/archive/5.5.0/scilab-5.5.0.tar.gz

Although some files are only in the outscale link,

--8<---------------cut here---------------start------------->8---
$ diff -r --no-dereference scilab-5.5.0-{1,2}
Only in scilab-5.5.0-1: ACKNOWLEDGEMENTS
Only in scilab-5.5.0-1: aclocal.m4
Only in scilab-5.5.0-1: bin
Only in scilab-5.5.0-1: build.incl.xml
Only in scilab-5.5.0-1: build.qa.incl.xml
Only in scilab-5.5.0-1: CHANGES_2.X
Only in scilab-5.5.0-1: CHANGES_3.X
Only in scilab-5.5.0-1: CHANGES_4.X
Only in scilab-5.5.0-1: CHANGES_5.0.X
Only in scilab-5.5.0-1: CHANGES_5.1.X
Only in scilab-5.5.0-1: CHANGES_5.2.X
Only in scilab-5.5.0-1: CHANGES_5.3.X
Only in scilab-5.5.0-1: CHANGES_5.4.X
Only in scilab-5.5.0-1: CHANGES_5.5.X
Only in scilab-5.5.0-1: checkstyle
Only in scilab-5.5.0-1: config
Only in scilab-5.5.0-1: configure
Only in scilab-5.5.0-1: configure.ac
Only in scilab-5.5.0-1: contrib
Only in scilab-5.5.0-1: COPYING
Only in scilab-5.5.0-1: COPYING-BSD
Only in scilab-5.5.0-1: COPYING-FR
Only in scilab-5.5.0-1: desktop
Only in scilab-5.5.0-1: etc
Only in scilab-5.5.0-2: git_hooks
Only in scilab-5.5.0-2: .gitignore
Only in scilab-5.5.0-1: GIT_info.incl
Only in scilab-5.5.0-1: libs
Only in scilab-5.5.0-1: license.txt
Only in scilab-5.5.0-1: locale
Only in scilab-5.5.0-1: m4
Only in scilab-5.5.0-1: Makefile.am
Only in scilab-5.5.0-1: Makefile.call_scilab.am
Only in scilab-5.5.0-1: Makefile.in
Only in scilab-5.5.0-1: Makefile.incl.am
Only in scilab-5.5.0-1: Makefile.incl.in
Only in scilab-5.5.0-1: modules
Only in scilab-5.5.0-1: README_Unix
Only in scilab-5.5.0-1: Readme_Visual.txt
Only in scilab-5.5.0-1: README_Windows.txt
Only in scilab-5.5.0-1: RELEASE_NOTES_5.0.X
Only in scilab-5.5.0-1: RELEASE_NOTES_5.1.X
Only in scilab-5.5.0-1: RELEASE_NOTES_5.2.X
Only in scilab-5.5.0-1: RELEASE_NOTES_5.3.X
Only in scilab-5.5.0-2: scilab
Only in scilab-5.5.0-1: Scilab_f2c.sln
Only in scilab-5.5.0-1: scilab-lib-doc.properties.in
Only in scilab-5.5.0-1: scilab-lib-doc.properties.vc
Only in scilab-5.5.0-1: scilab-lib.properties.in
Only in scilab-5.5.0-1: scilab-lib.properties.vc
Only in scilab-5.5.0-1: scilab.pc.in
Only in scilab-5.5.0-1: scilab.properties.in
Only in scilab-5.5.0-1: scilab.properties.vc
Only in scilab-5.5.0-1: Scilab.sln
Only in scilab-5.5.0-2: SEP
Only in scilab-5.5.0-1: SVN_revision.incl
Only in scilab-5.5.0-1: tools
Only in scilab-5.5.0-1: Version.incl
Only in scilab-5.5.0-1: Visual-Studio-settings
--8<---------------cut here---------------end--------------->8---

Ah, weird! :-)

Cheers,
simon





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 May 2023 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 332 days ago.

Previous Next


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