Hello,
Copilot and I are trying to build SageMath 10.9 from source on Ubuntu 24.04 under WSL.
The build uses Meson and a Python virtual environment.
Copilot says there is blocking issue related to numpy and cysignals.
Below is a clear summary of the situation.
1. Environment
- Ubuntu 24.04 (WSL)
- Python 3.12 (system default)
- Meson 1.11.1 inside a venv
- Cython 3.2.4 inside the venv
- numpy 2.2.x initially installed, then downgraded to 2.1.3
- pkg-config installed
- Build directory located in user home
2. Problem with numpy 2.2.x
When numpy 2.2.x is installed, Meson fails to detect numpy.
This is due to a confirmed upstream bug in numpy:
https://github.com/numpy/numpy/issues/29422
The bug indicates that numpy 2.2.x does not install f2py correctly.
As a result, Meson cannot run numpy.get_include and the build fails.
3. Attempt to downgrade numpy
I downgraded numpy to version 2.1.3.
This version installs correctly and can be imported.
However, SageMath 10.9 requires numpy >= 2.2.4.
Meson reports:
Program python3 found: YES (/home/ortollj/sage-venv/bin/python3)
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Run-time dependency python found: YES 3.12
Program python3 (pytest) found: NO
numpy-config found: NO found '2.1.3' but need ['>=2.2.4']
Run-time dependency numpy found: NO (tried pkg-config and config-tool)
src/meson.build:29:16: ERROR: Command `/home/ortollj/sage-venv/bin/python3 -c 'from os.path import relpath
import cysignals
path = cysignals.__file__.replace('"'"'__init__.py'"'"', '"'"''"'"')
try:
print(relpath(path))
except Exception:
print(path)'` failed with status 1.
A full log can be found at /home/ortollj/sage-src-10.9/build/meson-logs/meson-log.txt
ERROR: Meson compile failed even after recovery.