Building sagemath 10.2 on Fedora 38

56 views
Skip to first unread message

Rafel Amer Ramon

unread,
Dec 11, 2023, 7:24:17 AM12/11/23
to sage-devel
Hi!,

I have successfully build sagemath 10.1 on a Fedora 38 computer but now, when a I try to
build sagemath 10.2 in the same computer, I have a lot of errors in Cythonizing files

The first one is:

[ 19/557] Cythonizing sage/arith/rational_reconstruction.pyx
Error compiling Cython file:
------------------------------------------------------------
...
    """
    Return ``t.__new__(t)``.  This works even for types like
    :class:`Integer` where we change ``tp_new`` at runtime (Cython
    optimizations assume that ``tp_new`` doesn't change).
    """
    return (<PyTypeObject*>t).tp_new(t, <PyObject*>NULL, <PyObject*>NULL)
                                       ^
------------------------------------------------------------

sage/ext/stdsage.pxd:22:40: Cannot convert 'PyObject *' to Python object

Error compiling Cython file:
------------------------------------------------------------
...
    """
    Return ``t.__new__(t)``.  This works even for types like
    :class:`Integer` where we change ``tp_new`` at runtime (Cython
    optimizations assume that ``tp_new`` doesn't change).
    """
    return (<PyTypeObject*>t).tp_new(t, <PyObject*>NULL, <PyObject*>NULL)
                                                        ^
------------------------------------------------------------

but I seems that there are no differences between the files

sage/arith/rational_reconstruction.pyx

in sage-10.1 and sage-10.2.



Another error is in
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/sage-10.2/src/./setup.py", line 118, in <module>
    extensions = cythonize(
                 ^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/Cython/Build/Dependencies.py", line 1103, in cythonize
    result.get(99999)  # seconds
    ^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/multiprocessing/pool.py", line 774, in get
    raise self._value
Cython.Compiler.Errors.CompileError: sage/arith/multi_modular.pyx
************************************************************************
Error building the Sage library
************************************************************************

and the differences between the the files
sage/arith/multi_modular.pyx
in sage-10.1 and sage-10.2 are

diff sage-10.1/src/sage/arith/multi_modular.pyx sage-10.2/src/sage/arith/multi_modular.pyx
104c104
<     cdef _realloc_to_new_count(self, new_count):
---
>     cdef _realloc_to_new_count(self, new_count) noexcept:
189c189
<         or raise a ``RuntimeError`` if there are no more primes.
---
>         or raise a :class:`RuntimeError` if there are no more primes.
448c448
<     cdef void _refresh_products(self, int start):
---
>     cdef void _refresh_products(self, int start) noexcept:
463c463
<     cdef void _refresh_prod(self):
---
>     cdef void _refresh_prod(self) noexcept:
495c495
<     cdef mod_int last_prime(self):
---
>     cdef mod_int last_prime(self) noexcept:


The version of python installed is 3.1.6.

Anybody knows why have I these errors?


Regards,

Rafel Amer

Qian Yun

unread,
Dec 11, 2023, 8:03:44 AM12/11/23
to sage-...@googlegroups.com
Hi,

The most notable upgrade in sagemath 10.2 is to use cython 3.x instead
of cython 0.29.x.

Can you check which version of cython is installed and used on your
system?

- Qian

Rafel Amer Ramon

unread,
Dec 11, 2023, 8:03:44 AM12/11/23
to sage-devel
I'm sorry, the version of python is 3.11.6

Regards,
Rafel Amer

El dia dilluns, 11 de desembre del 2023 a les 13:24:17 UTC+1, Rafel Amer Ramon va escriure:

Rafel Amer Ramon

unread,
Dec 11, 2023, 8:28:29 AM12/11/23
to sage-...@googlegroups.com
Hi,

I have the version 0.29.33

It seems that I can't build sagemath 10.2 in Fedora 38.

Thank you.

Gest regards,

Rafel Amer


El 11/12/23 a les 13:28, Qian Yun ha escrit:
Reply all
Reply to author
Forward
0 new messages