build ok but fails to start

58 views
Skip to first unread message

Frédéric Chapoton

unread,
Aug 21, 2024, 12:09:22 PM8/21/24
to sage-devel
Hello,

something bad seems to happen when touching pyx files. Sage build ok but fails to start, unless I recompile with "make sagelib-clean & make build"

I got the following message at startup, see below. Any idea about the issue ?

Frédéric

Traceback (most recent call last):
  File "/home/chapoton/sage/src/bin/sage-ipython", line 10, in <module>
    banner()
  File "/home/chapoton/sage/src/sage/misc/banner.py", line 114, in banner
    print(banner_text(full=True))
  File "/home/chapoton/sage/src/sage/misc/banner.py", line 69, in banner_text
    import sage.all
  File "/home/chapoton/sage/src/sage/all.py", line 80, in <module>
    from sage.libs.all       import *
  File "/home/chapoton/sage/src/sage/libs/all.py", line 2, in <module>
    import sage.libs.ntl.all as ntl
  File "/home/chapoton/sage/src/sage/libs/ntl/all.py", line 23, in <module>
    from sage.libs.ntl.ntl_ZZ import (
  File "sage/libs/ntl/ntl_ZZ.pyx", line 1, in init sage.libs.ntl.ntl_ZZ
  File "sage/rings/integer.pyx", line 1, in init sage.rings.integer
  File "sage/rings/rational.pyx", line 76, in init sage.rings.rational
  File "sage/rings/integer_ring.pyx", line 1, in init sage.rings.integer_ring
TypeError: C function sage.misc.randstate.current_randstate has wrong signature (expected struct __pyx_obj_4sage_4misc_9randstate_randstate *(int __pyx_skip_dispatch), got struct __pyx_obj_9randstate_randstate *(int __pyx_skip_dispatch))

Nils Bruin

unread,
Aug 21, 2024, 12:15:36 PM8/21/24
to sage-devel
On Wednesday 21 August 2024 at 09:09:22 UTC-7 Frédéric Chapoton wrote:

TypeError: C function sage.misc.randstate.current_randstate has wrong signature (expected struct __pyx_obj_4sage_4misc_9randstate_randstate *(int __pyx_skip_dispatch), got struct __pyx_obj_9randstate_randstate *(int __pyx_skip_dispatch))

From the error I'd say that the file got recompiled at "top level" rather than as part of "sage.misc" and the shared library in question got overwritten.

Dima Pasechnik

unread,
Aug 21, 2024, 1:34:02 PM8/21/24
to sage-...@googlegroups.com


On 21 August 2024 17:09:22 BST, "Frédéric Chapoton" <fchap...@gmail.com> wrote:
>Hello,
>
>something bad seems to happen when touching pyx files. Sage build ok but
>fails to start, unless I recompile with "make sagelib-clean & make build"

"make build"

alone does not work?

Matthias Koeppe

unread,
Aug 21, 2024, 1:50:20 PM8/21/24
to sage-devel
Indeed, and the command that did it is displayed in https://github.com/sagemath/sage/pull/38542

Frédéric Chapoton

unread,
Aug 21, 2024, 2:00:51 PM8/21/24
to sage-devel
so you mean this is caused by me playing with "cython -3 -a", right ?

How can I force the correct re-build now ?

Matthias Koeppe

unread,
Aug 21, 2024, 4:16:41 PM8/21/24
to sage-devel
Yes. "make sagelib-clean" fixes it.
Reply all
Reply to author
Forward
0 new messages