From: Andreas Enge <andreas@enge.fr>
To: Nicolas Graves <ngraves@ngraves.fr>
Cc: Eric Bavier <bavier@posteo.net>,
65357@debbugs.gnu.org, Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#65357] [PATCH] gnu: scilab: Fix compilation error.
Date: Fri, 18 Aug 2023 20:23:25 +0200 [thread overview]
Message-ID: <ZN-3HT15NUDqFw-O@jurong> (raw)
In-Reply-To: <ZN5qBMyRq5vFizuz@jurong>
[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]
Am Thu, Aug 17, 2023 at 08:42:12PM +0200 schrieb Andreas Enge:
> the fix looks right to me. But our scilab version is 8 years old, while there
> are newer versions around. Would it make sense to rather update the package
> to a newer version? (I had a look at 5.2.2, 6.0.0 and 6.1.1, but all of them
> would still require your suggested fix.)
I have pushed the fix and updated scilab to 5.2.2.
I have also tried 6.1.1, and attached is how far I got.
The lines for including strings.h instead of string.h are a failed attempt
to have strcasecmp defined; with and without it the error message is
In file included from ../../modules/ast/includes/types/arrayof.hxx:33,
from ../../modules/ast/includes/types/double.hxx:28,
from ../../modules/ast/includes/symbol/variables.hxx:24,
from ../../modules/ast/includes/symbol/context.hxx:25,
from ../../modules/ast/includes/ast/runvisitor.hxx:19,
from ../../modules/ast/includes/ast/execvisitor.hxx:19,
from src/cpp/funcmanager.cpp:31:
src/cpp/funcmanager.cpp: In member function ‘bool FuncManager::AppendModules()’:
../../modules/string/includes/os_string.h:107:25: error: ‘strcasecmp’ was not declared in this scope; did you mean ‘wcscasecmp’?
107 | #define stricmp strcasecmp
| ^~~~~~~~~~
src/cpp/funcmanager.cpp:134:9: note: in expansion of macro ‘stricmp’
134 | if (stricmp("utf-8", encoding) == 0)
| ^~~~~~~
The file looks unchanged in the latest git commit of scilab, and I have not
seen a corresponding patch in the Debian package, so I have given up.
Andreas
[-- Attachment #2: scilab.diff --]
[-- Type: text/plain, Size: 2938 bytes --]
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1666d6e420..837d055c8e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8457,7 +8457,7 @@ (define-public optizelle
(define-public scilab
(package
(name "scilab")
- (version "5.5.2")
+ (version "6.1.1")
(source
(origin
(method url-fetch)
@@ -8465,9 +8465,9 @@ (define-public scilab
(string-append "https://www.scilab.org/download/"
version "/scilab-" version "-src.tar.gz"))
(sha256
- (base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))))
+ (base32 "01s28d162znwl7na0qlclzmfg6h7kwgmly1hr5vc51fkidilf4z5"))))
(build-system gnu-build-system)
- (native-inputs (list pkg-config gfortran))
+ (native-inputs (list pkg-config gfortran eigen))
(inputs (list libxml2
`(,pcre "bin")
`(,pcre "out")
@@ -8495,7 +8495,9 @@ (define-public scilab
"--without-javasci"
"--disable-build-help"
"--with-external-scirenderer"
- ;; Tcl and Tk library locations.
+ ;; Disable the Scicos modelica compiler, which requires ocamlc.
+ "--without-modelica"
+ ;; Header and library locations.
(string-append "--with-tcl-include="
(string-drop-right
(search-input-file %build-inputs "include/tcl.h")
@@ -8512,6 +8514,10 @@ (define-public scilab
(string-drop-right
(search-input-directory %build-inputs "lib/tk8.6")
(string-length "/tk8.6")))
+ (string-append "--with-eigen-include="
+ (string-drop-right
+ (search-input-file %build-inputs "include/eigen3/Eigen/Sparse")
+ (string-length "/Eigen/Sparse")))
;; There are some 2018-fortran errors that are ignored
;; with this fortran compiler flag.
"FFLAGS=-fallow-argument-mismatch")
@@ -8538,6 +8544,9 @@ (define-public scilab
(("(H5Rdereference\\(_iDatasetId, H5R_OBJECT, )&(.*)\\);$"
all common ref)
(string-append common ref)))
+ (substitute* "modules/string/includes/os_string.h"
+ (("#include <string.h>")
+ "#include <strings.h>"))
;; fix multiple definitions
(substitute* "modules/tclsci/src/c/TCL_Command.h"
(("^__thread")
@@ -8562,4 +8571,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:cecill))) ;CeCILL v2.1
+ (license license:gpl2+)))
next prev parent reply other threads:[~2023-08-18 18:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 18:15 [bug#65357] [PATCH] gnu: scilab: Fix compilation error Nicolas Graves via Guix-patches via
2023-08-17 18:42 ` Andreas Enge
2023-08-18 18:23 ` Andreas Enge [this message]
2023-08-30 9:47 ` Andreas Enge
2023-08-31 12:17 ` Andreas Enge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZN-3HT15NUDqFw-O@jurong \
--to=andreas@enge.fr \
--cc=65357@debbugs.gnu.org \
--cc=bavier@posteo.net \
--cc=efraim@flashner.co.il \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).