Devel version

193 views
Skip to first unread message

Aram Dermenjian

unread,
Apr 23, 2025, 5:41:37 AM4/23/25
to sage-devel
Hey all,

I'm trying to update to the latest devel version in order to code some things up, but I can't seem to get the latest devel version "making" properly. Not sure if I'm doing something wrong, so I'm attaching my logs.

- First time, I ran it, I got a scipy error (logs attached) and it wouldn't build
- I tried running `make` again (without doing a `make distclean`) and the 2nd time scipy installs correctly, but then the instlaler just hangs and doesn't finish.
  -> When I `ctrl+c` to quit, it shows `matplotlib-3.10.1` errors, so seems like it's getting stuck in `matplotlib-3.10.1`. (Which I'm attaching the log file for)
  -> Analyzying the log file, looks like it can't properly get `matplotlib-3.10.1`. Version 10.6 doesn't have it (only has `matplotlib-3.8` and the URL it's trying to download from for 10.7 is wrong (It should be: https://github.com/sagemath/sage/releases/download/10.7.beta1/matplotlib-3.10.1.tar.gz)

I tried installing a fresh copy of sagedev (not my forked version) and a similar thing happens, but this time it failed when trying to install numpy.

Wanted to see what the best way to approach fixing my development version is.

Also, I'm thinking I should create a ticket along the lines of "if unable to download xxx, then an error should be thrown instead of just hanging and waiting forever", but before doing that I want to make sure that it is really a problem with the dev version and not a problem on my end (as my internet is a little weird here, so it could potentially be my internet being weird)

Kindly,
Aram
scipy-1.15.2.log
matplotlib-3.10.1.log
config.log
numpy-2.2.4.log

Eric Gourgoulhon

unread,
Apr 23, 2025, 7:25:07 AM4/23/25
to sage-devel
Hi,

This line in the scipy log:
[spkg-install] g++: fatal error: Killed signal terminated program cc1plus
points towards a memory issue. Could you increase the RAM devoted to WSL2 or decrease the number of processes if you are performing a parallel build (e.g use make -j4 instead of make -j8) ?

Eric.

Aram Dermenjian

unread,
Apr 23, 2025, 1:17:15 PM4/23/25
to sage-...@googlegroups.com
This definitely solves the sci-py problem! Thanks.

I'm still getting hung up on the 2nd issue though where for some reason matplotlib just won't install. The terminal goes to something like:
```
[sagenb_export-3.3] [spkg-pipinst] Installing collected packages: sagenb_export
[sagenb_export-3.3] [spkg-pipinst]   changing mode of /sage/sagedev/local/var/lib/sage/venv-python3.12.5/bin/sagenb-export to 755
[sagenb_export-3.3] [spkg-pipinst] Successfully installed sagenb_export-3.3
[sagenb_export-3.3] Deleting build directory /sage/sagedev/local/var/lib/sage/venv-python3.12.5/var/tmp/sage/build/sagenb_export-3.3
[sagenb_export-3.3] Finished installing sagenb_export-3.3
```
(each time something slightly different) and then it just stalls there. (I Left it like that for 4 hours and no change. Then when I ctrl+c to stop the running process matplotlib throws an error. 

-Aram

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-devel/53b4ddd4-6e55-44fa-b6b0-87f9ee66d4f1n%40googlegroups.com.
matplotlib-3.10.1.log

enriqu...@gmail.com

unread,
Apr 24, 2025, 2:13:58 AM4/24/25
to sage-devel
If I am not wrong this is caused because sometimes downloading files fail. In my experience a direct download of the files, copied in the folder upstream, and restarting make is enough.

Aram Dermenjian

unread,
Apr 24, 2025, 2:26:06 AM4/24/25
to sage-...@googlegroups.com
Yes, that's what I'm currently trying to do, but finding all the packages with wrong checksums is turning out to not be so fun. Have to keep rerunning `make` to try and see which package breaks next.

2 questions though:
1. Is there not currently a way to do a "check integrity" run or something? Where you first check the checksums of all files before trying to run make?
2. I think there's still a bug in the following from the log
```
ERROR [transfer|run:135]: [Errno socket error] [Errno 404] Not Found: '//github.com/sagemath/sage/releases/download/10.7/matplotlib-3.10.1.tar.gz'
```
Notice how when it's trying to pull, it's trying to pull from 10.7 and *not* from 10.7.beta1. I looked in `/src/bin/sage-version.sh` (which is auto-generated) and the SAGE_VERSION is correctly set to '10.7.beta1'. (/src/sage/VERSION.txt is also showing the correct version) So somewhere along the line, when it's trying to download the correct tarbell, it's not doing it properly. 
Is this intended? Or should I create an issue ticket for this?

-Aram

Marc Culler

unread,
Apr 24, 2025, 10:20:19 AM4/24/25
to sage-devel
I have run into a similar issue with the matplotlib spkg.  I don't think the issue is with the download.  The log file shows a few 404's but eventually the download works and the hash is correct.  I think the real issue is that the matplotlib package requires a version of meson-python which is older than the one which sage installs.  I see the following in the log file for the matrplotlib build:

[spkg-install] < ERROR: Could not find a version that satisfies the requirement meson-
[spkg-install]   python<0.17.0,>=0.13.1 (from versions: none)
[spkg-install] < ERROR: No matching distribution found for meson-python<0.17.0,>=0.13.1

Sage is installing meson-python 0.17.0 and that is too new for matplotlib 3.10.1, which is the latest version of matplotlib on pypi.

- Marc

Dima Pasechnik

unread,
Apr 24, 2025, 11:18:15 AM4/24/25
to sage-...@googlegroups.com, Aram Dermenjian
On Thu, Apr 24, 2025 at 1:26 AM Aram Dermenjian <aram.derme...@gmail.com> wrote:
Yes, that's what I'm currently trying to do, but finding all the packages with wrong checksums is turning out to not be so fun. Have to keep rerunning `make` to try and see which package breaks next.

2 questions though:
1. Is there not currently a way to do a "check integrity" run or something? Where you first check the checksums of all files before trying to run make?
2. I think there's still a bug in the following from the log
```
ERROR [transfer|run:135]: [Errno socket error] [Errno 404] Not Found: '//github.com/sagemath/sage/releases/download/10.7/matplotlib-3.10.1.tar.gz'
```
Notice how when it's trying to pull, it's trying to pull from 10.7 and *not* from 10.7.beta1. I looked in `/src/bin/sage-version.sh` (which is auto-generated) and the SAGE_VERSION is correctly set to '10.7.beta1'. (/src/sage/VERSION.txt is also showing the correct version) So somewhere along the line, when it's trying to download the correct tarbell, it's not doing it properly. 
Is this intended? Or should I create an issue ticket for this?

It looks like a madness with Sage mirrors (which are a severely outdated thing, TBF - as I said, on poor connections, please trim upstream/mirrors_list to a minimum).
Normally speaking, if the package is not on mirrors, it is downloaded from the URL found in checksums,ini:

$ cat build/pkgs/matplotlib/checksums.ini
tarball=matplotlib-VERSION.tar.gz
sha1=e4802f77d563ee3e3fc7045d4605d888cd1fb58f
sha256=e8d2d0e3881b129268585bf4765ad3ee73a4591d77b9a18c214ac7e3a79fb2ba
upstream_url=https://files.pythonhosted.org/packages/source/m/matplotlib/matplotlib-VERSION.tar.gz

where VERSION is filled from package-version.txt

$ cat build/pkgs/matplotlib/package-version.txt
3.10.1

So you can get matplotlib from
(and files.pythonhosted.org is normally a very good place to get files from, it's where the PyPI filehosting, i.e. where pip gets its packages from)

HTH
Dima

Dima Pasechnik

unread,
Apr 24, 2025, 12:51:42 PM4/24/25
to sage-...@googlegroups.com
You can try to restart make after you hit ctrl-C. Sometimes it just works.

> Also, I'm thinking I should create a ticket along the lines of "if unable to download xxx, then an error should be thrown instead of just hanging and waiting forever",

it might help to trim the list of mirrors in upstream/mirror_list - only leave few mirrors geographically nearby.


Dima Pasechnik

unread,
Apr 24, 2025, 12:52:24 PM4/24/25
to sage-...@googlegroups.com
The matplotib vs meson-python issue is pure madness, see

The problem is not that one cannot build matplotlib spkg. It does work on systems we tested, and the release manager agreed.

That something  does not match on PyPI is not an argument. We don't use meson-python to build matplotlib. Yes, matplotlib we ship cannot be built with meson-python we ship, but it doesn't matter, as meson-python is not
needed to build matplotlib.

Having said this, the right way out is to vendor neither matpotlib, nor meson-python.
Then you just get what PyPI offers, and it's not our headache any more.


 

Aram Dermenjian

unread,
Apr 24, 2025, 1:02:31 PM4/24/25
to sage-...@googlegroups.com
Yeah a few times I tried doing make after and there seemed to be *some* success sometimes. Anyway, my internet is a little more stable so it seemed to download everything correctly. 

Now I seem to be getting a sagemath_doc_html error (log attached). It looks like something to do with trying to import libgap? I checked apt to see what libgap I have and here's what it gave:
libgap-dev/jammy,now 4.11.1-1 amd64 [installed]
libgap7/jammy,now 4.11.1-1 amd64 [installed,automatic]

But I'm not 100% sure. When I try to run sage, I get the following error (which seems very similar to the doc error)

--------------------------------------------------------
Error in sys.excepthook:
Traceback (most recent call last):
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/IPython/core/application.py", line 284, in excepthook
    return self.crash_handler(etype, evalue, tb)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/IPython/core/crashhandler.py", line 163, in __call__
    if rptdir is None or not Path.is_dir(rptdir):
                             ^^^^^^^^^^^^^^^^^^^
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/pathlib.py", line 875, in is_dir
    return S_ISDIR(self.stat().st_mode)
                   ^^^^^^^^^
AttributeError: 'str' object has no attribute 'stat'

Original exception was:
Traceback (most recent call last):
  File "/sage/sd/src/bin/sage-ipython", line 15, in <module>
    app.initialize()
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/traitlets/config/application.py", line 118, in inner
    return method(app, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/IPython/terminal/ipapp.py", line 278, in initialize
    self.init_shell()
  File "/sage/sd/src/sage/repl/interpreter.py", line 854, in init_shell
    self.shell.extension_manager.load_extension(SAGE_EXTENSION)
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/IPython/core/extensions.py", line 76, in load_extension
    return self._load_extension(module_str)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/IPython/core/extensions.py", line 93, in _load_extension
    if self._call_load_ipython_extension(mod):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sage/sd/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/IPython/core/extensions.py", line 145, in _call_load_ipython_extension
    mod.load_ipython_extension(self.shell)
  File "/sage/sd/src/sage/repl/__init__.py", line 6, in load_ipython_extension
    sage.repl.ipython_extension.load_ipython_extension(*args)
  File "/sage/sd/src/sage/misc/misc.py", line 1030, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/sage/sd/src/sage/repl/ipython_extension.py", line 747, in load_ipython_extension
    SageCustomizations(shell=ip)
  File "/sage/sd/src/sage/repl/ipython_extension.py", line 592, in __init__
    import sage.all  # noqa: F401
    ^^^^^^^^^^^^^^^
  File "/sage/sd/src/sage/all.py", line 98, in <module>
    from sage.groups.all import *
  File "/sage/sd/src/sage/groups/all.py", line 5, in <module>
    from sage.groups.matrix_gps.all import *
  File "/sage/sd/src/sage/groups/matrix_gps/all.py", line 13, in <module>
    import sage.groups.matrix_gps.pickling_overrides
  File "/sage/sd/src/sage/groups/matrix_gps/pickling_overrides.py", line 7, in <module>
    from sage.groups.matrix_gps.finitely_generated_gap import FinitelyGeneratedMatrixGroup_gap
  File "/sage/sd/src/sage/groups/matrix_gps/finitely_generated_gap.py", line 30, in <module>
    from sage.groups.matrix_gps.matrix_group_gap import MatrixGroup_gap
  File "/sage/sd/src/sage/groups/matrix_gps/matrix_group_gap.py", line 24, in <module>
    from sage.groups.libgap_mixin import GroupMixinLibGAP
  File "/sage/sd/src/sage/groups/libgap_mixin.py", line 15, in <module>
    from sage.libs.gap.libgap import libgap
ImportError: /sage/sd/src/sage/libs/gap/libgap.cpython-312-x86_64-linux-gnu.so: undefined symbol: GAP_CollectBags

sagemath_doc_html-none.log

Dima Pasechnik

unread,
Apr 24, 2025, 4:48:05 PM4/24/25
to sage-...@googlegroups.com
Sage needs GAP 4.13 or newer.
Assuming you actually built GAP spkg OK, the error might be due to the system-wide installed old version of GAP (and libgap)
interfering with the normal operations of Sage interface.

One way to debug this is to fire up Sage shell (i.e. ./sage --sh, or ./sage --buildsh) and run

   ldd  /sage/sd/src/sage/libs/gap/libgap.cpython-312-x86_64-linux-gnu.so

which will print the full paths to the libraries this Python module is linked to..

I'd uninstall the old system-wide GAP, and see if it helps.

Dima

Aram Dermenjian

unread,
Apr 24, 2025, 5:01:14 PM4/24/25
to sage-...@googlegroups.com
I ran gap and it said it's version 4.13.1, so it theoretically should be ok?

I ran the `ldd` code you said, but I'm not sure how to read the output. Here's what I get:

(sage-sh) aram@Cali-Alien:sd$ ldd /sage/sd/src/sage/libs/gap/libgap.cpython-312-x86_64-linux-gnu.so
        linux-vdso.so.1 (0x00007ffd603ee000)
        libgap.so.7 => /lib/x86_64-linux-gnu/libgap.so.7 (0x00007f333560a000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f33353e1000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f333535f000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3335343000)
        libreadline.so.8 => /lib/x86_64-linux-gnu/libreadline.so.8 (0x00007f33352ef000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3335206000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3336169000)
        libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f33351d4000)

Dima Pasechnik

unread,
Apr 24, 2025, 5:19:09 PM4/24/25
to sage-...@googlegroups.com
On Thu, Apr 24, 2025 at 4:01 PM Aram Dermenjian <aram.derme...@gmail.com> wrote:
I ran gap and it said it's version 4.13.1, so it theoretically should be ok?

what does this mean, exactly, you ran GAP? How? Did you run Sage's GAP, or a system-wide GAP?
 

I ran the `ldd` code you said, but I'm not sure how to read the output. Here's what I get:

(sage-sh) aram@Cali-Alien:sd$ ldd /sage/sd/src/sage/libs/gap/libgap.cpython-312-x86_64-linux-gnu.so
        linux-vdso.so.1 (0x00007ffd603ee000)
        libgap.so.7 => /lib/x86_64-linux-gnu/libgap.so.7 (0x00007f333560a000)

The above line says that  /lib/x86_64-linux-gnu/libgap.so.7 (a system-wide libgap) is linked to Sage's libgap interface.
libgap.so.7 is from GAP 4.11, so it's too old.

If you uninstall system-wide GAP, then the output of this ldd command should change, and point to a libgap.so.9 or something like this in the
directory you built Sage in.


Aram Dermenjian

unread,
Apr 25, 2025, 12:57:19 PM4/25/25
to sage-...@googlegroups.com
Looks like this ended up fixing it. All working now and back to normal. Thanks all for the help <3

On Thu, 24 Apr 2025 at 23:36, Dima Pasechnik <dim...@gmail.com> wrote:


On Thu, Apr 24, 2025 at 4:23 PM Aram Dermenjian <aram.derme...@gmail.com> wrote:
By "ran gap", I meant that I ran the command `gap` from my terminal.

But once you stated that it looks like the systemwide gap is version 4.11, I double checked (using `which gap`) and apparently I have a second installation of gap on my machine that I personally installed.

To get rid of the old gap, I'm thinking I just need to run `sudo apt uninstall libgap-dev libgap7`?

this should do. If you want to double check, you can check that 
/lib/x86_64-linux-gnu/libgap.so.7
is gone after you ran apt as above.

 
Or is there something else in particular?

On Thu, 24 Apr 2025 at 23:15, Dima Pasechnik <dim...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages