diff options
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/python-scipy-i686.patch | 49 | ||||
| -rw-r--r-- | gnu/packages/python-science.scm | 9 |
3 files changed, 59 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 05d606863e..f116a94023 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2185,6 +2185,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pytorch-system-libraries.patch \ %D%/packages/patches/python-pytorch-without-kineto.patch \ %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \ + %D%/packages/patches/python-scipy-i686.patch \ %D%/packages/patches/python-vaex-core-fix-tsl-use.patch \ %D%/packages/patches/python-vega-datasets-remove-la-riots-code.patch \ %D%/packages/patches/python-versioneer-guix-support.patch \ diff --git a/gnu/packages/patches/python-scipy-i686.patch b/gnu/packages/patches/python-scipy-i686.patch new file mode 100644 index 0000000000..66b5898c17 --- /dev/null +++ b/gnu/packages/patches/python-scipy-i686.patch @@ -0,0 +1,49 @@ +From https://github.com/scipy/scipy/pull/20135 + +From 53796772ed735c1564863fc7ca8d902acb628167 Mon Sep 17 00:00:00 2001 +From: Ralf Gommers <ralf.gommers@gmail.com> +Date: Thu, 22 Feb 2024 09:10:46 +0100 +Subject: [PATCH] MAINT: interpolate: define `F_INT` as `int` rather than + `npy_int32` + +This fixes an incompatible pointer issue that shows up as a warning in +Windows CI jobs, and is reported to break the build with GCC 14 on +Fedora 40 in gh-19993. + +Using `#define F_INT int` is done in several other submodules; this +was the only instance of using `npy_int32`. + +Closes gh-19993 +--- + scipy/interpolate/src/_fitpackmodule.c | 4 ++-- + scipy/interpolate/src/fitpack.pyf | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/scipy/interpolate/src/_fitpackmodule.c b/scipy/interpolate/src/_fitpackmodule.c +index 0e913d1c7e43..dc79b2b28833 100644 +--- a/scipy/interpolate/src/_fitpackmodule.c ++++ b/scipy/interpolate/src/_fitpackmodule.c +@@ -28,8 +28,8 @@ static PyObject *fitpack_error; + + #else + +-#define F_INT npy_int32 +-#define F_INT_NPY NPY_INT32 ++#define F_INT int ++#define F_INT_NPY NPY_INT + #define F_INT_MAX NPY_MAX_INT32 + #if NPY_BITSOF_SHORT == 32 + #define F_INT_PYFMT "h" +diff --git a/scipy/interpolate/src/fitpack.pyf b/scipy/interpolate/src/fitpack.pyf +index 08cb0c141c98..a9535a83f479 100644 +--- a/scipy/interpolate/src/fitpack.pyf ++++ b/scipy/interpolate/src/fitpack.pyf +@@ -16,7 +16,7 @@ python module dfitpack ! in + #ifdef HAVE_ILP64 + typedef npy_int64 F_INT; + #else +-typedef npy_int32 F_INT; ++typedef int F_INT; + #endif + + static double dmax(double* seq, F_INT len) { diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index ad89a3940a..c4399c9019 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -3108,6 +3108,15 @@ cross-validation.") (list #:phases #~(modify-phases %standard-phases + #$@(if (target-x86-32?) + #~((add-after 'unpack 'apply-i686-patch + (lambda _ + (let ((patch-file + #$(local-file + (search-patch "python-scipy-i686.patch")))) + (invoke "patch" "--force" "-p1" "-i" + patch-file))))) + #~()) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? |
