diff --git a/sympy-incompatible-pointer.patch b/sympy-incompatible-pointer.patch new file mode 100644 index 0000000..b0a7580 --- /dev/null +++ b/sympy-incompatible-pointer.patch @@ -0,0 +1,38 @@ +Fixes this error with GCC 14 and numpy 1.19.0 or later: + +wrapper_module_15.c:32:60: error: initialization of ‘void (*)(char **, const npy_intp *, const npy_intp *, void *)’ {aka ‘void (*)(char **, const long int *, const long int *, void *)’} from incompatible pointer type ‘void (*)(char **, npy_intp *, npy_intp *, void *)’ {aka ‘void (*)(char **, long int *, long int *, void *)’} + 32 | PyUFuncGenericFunction wrapped_281000935073472_funcs[1] = {&wrapped_281000935073472_ufunc}; + | ^ +error: command '/usr/bin/gcc' failed with exit code 1 + +--- sympy-sympy-1.12/sympy/utilities/autowrap.py.orig 2023-05-09 17:42:05.000000000 -0600 ++++ sympy-sympy-1.12/sympy/utilities/autowrap.py 2023-11-30 13:26:06.612852361 -0700 +@@ -714,7 +714,7 @@ static PyMethodDef ${module}Methods[] = + _ufunc_outcalls = Template("*((double *)out${outnum}) = ${funcname}(${call_args});") + + _ufunc_body = Template("""\ +-static void ${funcname}_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data) ++static void ${funcname}_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data) + { + npy_intp i; + npy_intp n = dimensions[0]; +--- sympy-sympy-1.12/sympy/utilities/tests/test_autowrap.py.orig 2023-05-09 17:42:05.000000000 -0600 ++++ sympy-sympy-1.12/sympy/utilities/tests/test_autowrap.py 2023-11-30 12:42:03.489842964 -0700 +@@ -284,7 +284,7 @@ static PyMethodDef wrapper_module_%(num) + {NULL, NULL, 0, NULL} + }; + +-static void test_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data) ++static void test_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data) + { + npy_intp i; + npy_intp n = dimensions[0]; +@@ -378,7 +378,7 @@ static PyMethodDef wrapper_module_%(num) + {NULL, NULL, 0, NULL} + }; + +-static void multitest_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data) ++static void multitest_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data) + { + npy_intp i; + npy_intp n = dimensions[0]; diff --git a/sympy.spec b/sympy.spec index 9d26a44..638d570 100644 --- a/sympy.spec +++ b/sympy.spec @@ -7,7 +7,7 @@ Name: sympy Version: 1.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A Python library for symbolic mathematics # The project as a whole is BSD-3-Clause. @@ -19,6 +19,8 @@ Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.ta Patch0: %{name}-circuitplot.patch # Adapt to python 3.12 Patch1: %{name}-python3.12.patch +# Fix incompatible pointers, which are an error with GCC 14 +Patch2: %{name}-incompatible-pointer.patch # This package used to be noarch, and should still be noarch. However, because # there is no JDK available on i686 anymore, the antlr4 package is also not @@ -241,6 +243,9 @@ fi %{_docdir}/%{name}-doc/html %changelog +* Thu Nov 30 2023 Jerry James - 1.12-3 +- Fix incompatible pointer types for GCC 14 compatibility + * Sat Jul 22 2023 Fedora Release Engineering - 1.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild