I've spent some time figuring out a bunch of build failures on MacOS 15.4 (@ Apple M4) with clang 17, and managed to have both 10.7.beta0 and 10.6 compile with the following changes:
When running ptestlong (MAKE="make -j8" make ptestlong) from a clean environment (in particular, no "source .homebrew-build-env"), it seemed like the documentation build part took a very long time (might be because of
https://groups.google.com/g/sage-devel/c/lr03GlRBr9g/m/Yx8yo7p4AQAJ, sage.parallel.ncpus.ncpus() also returns 1 on my machine). Otherwise, I get:
----------------------------------------------------------------------
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/doctest/forker.py # 5 doctests failed
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/tests/cmdline.py # 1 doctest failed
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/matrix/matrix2.pyx # 1 doctest failed
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/rings/tate_algebra_ideal.pyx # 1 doctest failed
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/misc/session.pyx # 2 doctests failed
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/doctest/control.py # 7 doctests failed
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/repl/load.py # 1 doctest failed
sage -t --long --warn-long 30.0 --random-seed=74068020013893956633724212161580658271 src/sage/rings/polynomial/plural.pyx # 6 doctests failed
----------------------------------------------------------------------
Total time for all tests: 1638.8 seconds
cpu time: 10255.8 seconds
cumulative wall time: 10530.7 seconds
Of these, only the tests in the following files persisted after running them individually:
- src/sage/matrix/matrix2.pyx
- src/sage/rings/tate_algebra_ideal.pyx
- src/sage/misc/session.pyx
- src/sage/repl/load.py
After running "source .homebrew-build-env", only the test in src/sage/matrix/matrix2.pyx keeps still failing, I'll paste the stack trace below.
Benjamin
**********************************************************************
File "src/sage/matrix/matrix2.pyx", line 1731, in sage.matrix.matrix2.Matrix.pseudoinverse
Failed example:
Mx = M.pseudoinverse(algorithm='numpy') # needs numpy
Expected nothing
Got:
doctest:warning
File "<doctest sage.matrix.matrix2.Matrix.pseudoinverse[12]>", line 1, in <module>
Mx = M.pseudoinverse(algorithm='numpy') # needs numpy
File "/Users/behackl/code/sage-devel/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/linalg/_linalg.py", line 2239, in pinv
res = matmul(transpose(vt), multiply(s[..., newaxis], transpose(u)))
File "/Users/behackl/code/sage-devel/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/linalg/_linalg.py", line 3383, in matmu
l
return _core_matmul(x1, x2)
File "/opt/homebrew/Cellar/pyt...@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/warnings.py", line 110, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
:
RuntimeWarning: divide by zero encountered in matmul
doctest:warning
File "<doctest sage.matrix.matrix2.Matrix.pseudoinverse[12]>", line 1, in <module>
Mx = M.pseudoinverse(algorithm='numpy') # needs numpy
File "/Users/behackl/code/sage-devel/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/linalg/_linalg.py", line 2239, in pinv
res = matmul(transpose(vt), multiply(s[..., newaxis], transpose(u)))
File "/Users/behackl/code/sage-devel/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/linalg/_linalg.py", line 3383, in matmu
l
return _core_matmul(x1, x2)
File "/opt/homebrew/Cellar/pyt...@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/warnings.py", line 110, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
:
RuntimeWarning: overflow encountered in matmul
doctest:warning
File "<doctest sage.matrix.matrix2.Matrix.pseudoinverse[12]>", line 1, in <module>
Mx = M.pseudoinverse(algorithm='numpy') # needs numpy
File "/Users/behackl/code/sage-devel/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/linalg/_linalg.py", line 2239, in pinv
res = matmul(transpose(vt), multiply(s[..., newaxis], transpose(u)))
File "/Users/behackl/code/sage-devel/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/numpy/linalg/_linalg.py", line 3383, in matmu
l
return _core_matmul(x1, x2)
File "/opt/homebrew/Cellar/pyt...@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/warnings.py", line 110, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
:
RuntimeWarning: invalid value encountered in matmul
**********************************************************************
1 item had failures:
1 of 27 in sage.matrix.matrix2.Matrix.pseudoinverse
[2952 tests, 1 failure, 4.42s wall]