From patchwork Fri Aug 18 18:23:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Enge X-Patchwork-Id: 52995 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EA6D927BBE9; Fri, 18 Aug 2023 19:24:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5456D27BBE2 for ; Fri, 18 Aug 2023 19:24:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX48i-0001dw-IP; Fri, 18 Aug 2023 14:24:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qX48g-0001dl-OH for guix-patches@gnu.org; Fri, 18 Aug 2023 14:24:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX48g-0001x6-GU for guix-patches@gnu.org; Fri, 18 Aug 2023 14:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qX48g-0003OV-Hh for guix-patches@gnu.org; Fri, 18 Aug 2023 14:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65357] [PATCH] gnu: scilab: Fix compilation error. Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Aug 2023 18:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65357 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: Eric Bavier , 65357@debbugs.gnu.org, Efraim Flashner Received: via spool by 65357-submit@debbugs.gnu.org id=B65357.169238301913017 (code B ref 65357); Fri, 18 Aug 2023 18:24:02 +0000 Received: (at 65357) by debbugs.gnu.org; 18 Aug 2023 18:23:39 +0000 Received: from localhost ([127.0.0.1]:48766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qX48J-0003Ns-0K for submit@debbugs.gnu.org; Fri, 18 Aug 2023 14:23:39 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:51208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qX48G-0003Ne-07 for 65357@debbugs.gnu.org; Fri, 18 Aug 2023 14:23:37 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2628F277; Fri, 18 Aug 2023 20:23:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E0TvF4s4JLXE; Fri, 18 Aug 2023 20:23:28 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 2913E62; Fri, 18 Aug 2023 20:23:27 +0200 (CEST) Date: Fri, 18 Aug 2023 20:23:25 +0200 From: Andreas Enge Message-ID: References: <03a288df56dc60850e6a8c0fc2785949e209f33a.1692296107.git.ngraves@ngraves.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 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 ") + "#include ")) ;; 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+)))