* [bug#61204] Scilab scientific software
@ 2023-02-01 1:07 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-01 1:07 UTC (permalink / raw)
To: 61204
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@4, suitesparse@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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH 1/6] gnu: matio: Add header file.
2023-02-01 1:07 [bug#61204] Scilab scientific software Nicolas Graves via Guix-patches via
@ 2023-02-01 1:12 ` Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 2/6] gnu: Add metis-4 Nicolas Graves via Guix-patches via
` (3 more replies)
2023-02-10 23:08 ` [bug#61204] Scilab scientific software Ludovic Courtès
` (3 subsequent siblings)
4 siblings, 4 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-01 1:12 UTC (permalink / raw)
To: 61204; +Cc: ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH 2/6] gnu: Add metis-4.
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
@ 2023-02-01 1:12 ` Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 3/6] gnu: Add suitesparse-3 Nicolas Graves via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-01 1:12 UTC (permalink / raw)
To: 61204; +Cc: ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH 3/6] gnu: Add suitesparse-3.
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 2/6] gnu: Add metis-4 Nicolas Graves via Guix-patches via
@ 2023-02-01 1:12 ` Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 5/6] gnu: scilab: Update to 5.5.1 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 6/6] gnu: scilab: Update to 5.5.2 Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-01 1:12 UTC (permalink / raw)
To: 61204; +Cc: ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH 5/6] gnu: scilab: Update to 5.5.1.
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 2/6] gnu: Add metis-4 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 3/6] gnu: Add suitesparse-3 Nicolas Graves via Guix-patches via
@ 2023-02-01 1:12 ` Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 6/6] gnu: scilab: Update to 5.5.2 Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-01 1:12 UTC (permalink / raw)
To: 61204; +Cc: ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH 6/6] gnu: scilab: Update to 5.5.2.
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
` (2 preceding siblings ...)
2023-02-01 1:12 ` [bug#61204] [PATCH 5/6] gnu: scilab: Update to 5.5.1 Nicolas Graves via Guix-patches via
@ 2023-02-01 1:12 ` Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-01 1:12 UTC (permalink / raw)
To: 61204; +Cc: ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] Scilab scientific software
2023-02-01 1:07 [bug#61204] Scilab scientific software Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
@ 2023-02-10 23:08 ` Ludovic Courtès
2023-02-11 10:11 ` Nicolas Graves via Guix-patches via
2023-02-11 10:09 ` [bug#61204] [PATCH] gnu: Add scilab Nicolas Graves via Guix-patches via
` (2 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Ludovic Courtès @ 2023-02-10 23:08 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 61204
Hi Nicolas,
Nicolas Graves <ngraves@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@4, suitesparse@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’.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH] gnu: Add scilab.
2023-02-01 1:07 [bug#61204] Scilab scientific software Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-02-10 23:08 ` [bug#61204] Scilab scientific software Ludovic Courtès
@ 2023-02-11 10:09 ` Nicolas Graves via Guix-patches via
2023-02-15 15:57 ` [bug#61204] Scilab scientific software Simon Tournier
2023-03-25 14:15 ` [bug#61204] [PATCH v2 1/3] gnu: matio: Add header file Nicolas Graves via Guix-patches via
4 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-11 10:09 UTC (permalink / raw)
To: 61204; +Cc: ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] Scilab scientific software
2023-02-10 23:08 ` [bug#61204] Scilab scientific software Ludovic Courtès
@ 2023-02-11 10:11 ` Nicolas Graves via Guix-patches via
0 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-02-11 10:11 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 61204
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#61204] Scilab scientific software
2023-02-01 1:07 [bug#61204] Scilab scientific software Nicolas Graves via Guix-patches via
` (2 preceding siblings ...)
2023-02-11 10:09 ` [bug#61204] [PATCH] gnu: Add scilab Nicolas Graves via Guix-patches via
@ 2023-02-15 15:57 ` Simon Tournier
2023-03-16 11:26 ` Ludovic Courtès
2023-03-25 14:15 ` [bug#61204] [PATCH v2 1/3] gnu: matio: Add header file Nicolas Graves via Guix-patches via
4 siblings, 1 reply; 17+ messages in thread
From: Simon Tournier @ 2023-02-15 15:57 UTC (permalink / raw)
To: Nicolas Graves, 61204
Hi,
On Wed, 01 Feb 2023 at 02:07, Nicolas Graves via Guix-patches via <guix-patches@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@4, suitesparse@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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#61204] Scilab scientific software
2023-02-15 15:57 ` [bug#61204] Scilab scientific software Simon Tournier
@ 2023-03-16 11:26 ` Ludovic Courtès
2023-03-25 14:17 ` Nicolas Graves via Guix-patches via
0 siblings, 1 reply; 17+ messages in thread
From: Ludovic Courtès @ 2023-03-16 11:26 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 61204, Simon Tournier
Hi Nicolas,
Simon Tournier <zimon.toutoune@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’.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH v2 1/3] gnu: matio: Add header file.
2023-02-01 1:07 [bug#61204] Scilab scientific software Nicolas Graves via Guix-patches via
` (3 preceding siblings ...)
2023-02-15 15:57 ` [bug#61204] Scilab scientific software Simon Tournier
@ 2023-03-25 14:15 ` Nicolas Graves via Guix-patches via
2023-03-25 14:15 ` [bug#61204] [PATCH v2 2/3] gnu: Add suitesparse-3 Nicolas Graves via Guix-patches via
2023-03-25 14:15 ` [bug#61204] [PATCH v2 3/3] gnu: Add scilab Nicolas Graves via Guix-patches via
4 siblings, 2 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-03-25 14:15 UTC (permalink / raw)
To: 61204; +Cc: ludo, ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH v2 2/3] gnu: Add suitesparse-3.
2023-03-25 14:15 ` [bug#61204] [PATCH v2 1/3] gnu: matio: Add header file Nicolas Graves via Guix-patches via
@ 2023-03-25 14:15 ` Nicolas Graves via Guix-patches via
2023-03-25 14:15 ` [bug#61204] [PATCH v2 3/3] gnu: Add scilab Nicolas Graves via Guix-patches via
1 sibling, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-03-25 14:15 UTC (permalink / raw)
To: 61204; +Cc: ludo, ngraves
* 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@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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] [PATCH v2 3/3] gnu: Add scilab.
2023-03-25 14:15 ` [bug#61204] [PATCH v2 1/3] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-03-25 14:15 ` [bug#61204] [PATCH v2 2/3] gnu: Add suitesparse-3 Nicolas Graves via Guix-patches via
@ 2023-03-25 14:15 ` Nicolas Graves via Guix-patches via
2023-03-30 20:43 ` bug#61204: " Ludovic Courtès
1 sibling, 1 reply; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-03-25 14:15 UTC (permalink / raw)
To: 61204; +Cc: ludo, ngraves
* 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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] Scilab scientific software
2023-03-16 11:26 ` Ludovic Courtès
@ 2023-03-25 14:17 ` Nicolas Graves via Guix-patches via
2023-04-03 15:43 ` Simon Tournier
0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-03-25 14:17 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 61204, Simon Tournier
On 2023-03-16 12:26, Ludovic Courtès wrote:
> Hi Nicolas,
>
> Simon Tournier <zimon.toutoune@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@3 without
support for Metis@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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#61204: [PATCH v2 3/3] gnu: Add scilab.
2023-03-25 14:15 ` [bug#61204] [PATCH v2 3/3] gnu: Add scilab Nicolas Graves via Guix-patches via
@ 2023-03-30 20:43 ` Ludovic Courtès
0 siblings, 0 replies; 17+ messages in thread
From: Ludovic Courtès @ 2023-03-30 20:43 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 61204-done
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
Hi Nicolas,
Nicolas Graves <ngraves@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’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 487 bytes --]
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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#61204] Scilab scientific software
2023-03-25 14:17 ` Nicolas Graves via Guix-patches via
@ 2023-04-03 15:43 ` Simon Tournier
0 siblings, 0 replies; 17+ messages in thread
From: Simon Tournier @ 2023-04-03 15:43 UTC (permalink / raw)
To: Nicolas Graves, Ludovic Courtès; +Cc: 61204
Hi,
On sam., 25 mars 2023 at 15:17, Nicolas Graves via Guix-patches via <guix-patches@gnu.org> wrote:
> Actually, I've seen that it's possible to compile Suitesparse@3 without
> support for Metis@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
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2023-04-03 16:59 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01 1:07 [bug#61204] Scilab scientific software Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 2/6] gnu: Add metis-4 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 3/6] gnu: Add suitesparse-3 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 5/6] gnu: scilab: Update to 5.5.1 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 6/6] gnu: scilab: Update to 5.5.2 Nicolas Graves via Guix-patches via
2023-02-10 23:08 ` [bug#61204] Scilab scientific software Ludovic Courtès
2023-02-11 10:11 ` Nicolas Graves via Guix-patches via
2023-02-11 10:09 ` [bug#61204] [PATCH] gnu: Add scilab Nicolas Graves via Guix-patches via
2023-02-15 15:57 ` [bug#61204] Scilab scientific software Simon Tournier
2023-03-16 11:26 ` Ludovic Courtès
2023-03-25 14:17 ` Nicolas Graves via Guix-patches via
2023-04-03 15:43 ` Simon Tournier
2023-03-25 14:15 ` [bug#61204] [PATCH v2 1/3] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-03-25 14:15 ` [bug#61204] [PATCH v2 2/3] gnu: Add suitesparse-3 Nicolas Graves via Guix-patches via
2023-03-25 14:15 ` [bug#61204] [PATCH v2 3/3] gnu: Add scilab Nicolas Graves via Guix-patches via
2023-03-30 20:43 ` bug#61204: " Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.