Build failure when installing SciPy

72 views
Skip to first unread message

Ashutosh Rajora

unread,
Mar 7, 2025, 4:39:41 PM3/7/25
to sage-support
Operating System: Ubuntu on Windows Subsystem for Linux (WSL)  Ubuntu 22.04.5 LTS
SageMath repo: Latest from git (cloned and tried to build from source)  

I did everything as mentioned in the guide and setting up and installing sagemath, i after
./configure

i tried to build with the  command: make -j4

the build went smooth but an error occurred while building SciPy,

i am attaching the SciPy log file below, 

i don't  know if this is a memory issue: tried running following

EigenVector22@LAPTOP-NLAVJRP4:~/sage$ free -h
               total        used        free      shared  buff/cache   available
Mem:           7.8Gi       458Mi       7.1Gi       1.0Mi       187Mi       7.1Gi
Swap:          2.0Gi       389Mi       1.6Gi
EigenVector22@LAPTOP-NLAVJRP4:~/sage$

Help would really be appreciated.

Thanks,
scipy-1.12.0.log

Dima Pasechnik

unread,
Mar 7, 2025, 5:14:16 PM3/7/25
to sage-s...@googlegroups.com
It looks indeed as an insufficient RAM for the C++ compiler.
Do you have a fixed amount of RAM allocated to WSL? It should better be 4Gb or more.

I am not sure what  "free -h" is showing here.
If RAM is dynamically shared between Windows and WSL, it doesn't mean much.

Try re-running "make"

Ashutosh Rajora

unread,
Mar 7, 2025, 11:20:10 PM3/7/25
to sage-support
how to check this:


" It looks indeed as an insufficient RAM for the C++ compiler.
Do you have a fixed amount of RAM allocated to WSL? It should better be 4Gb or more."

i checked the .wslconfig file and it is as follows:
[wsl2]
memory=8GB
swap=2GB

after this i tried shutting down wsl and re running it,

and again running the make command, but i am encountered with the same issue, i am attaching the latest log file: 
scipy-1.12.0.log

Ashutosh Rajora

unread,
Mar 8, 2025, 12:32:59 PM3/8/25
to sage-support
Can anybody please assist with this issue.

Dima Pasechnik

unread,
Mar 8, 2025, 2:41:43 PM3/8/25
to sage-s...@googlegroups.com
perhaps you are running too many complications in parallel, and that's why one of them errors out. As scipy uses ninja, check out ninja documentation on how to limit the number - that's a parameter to add to ninja call.
This might need a small patch to scipy,
or using another version of scipy...


Also, try increasing the size of swap - 2Gb is too small for 8Gb RAM, make it 6 or 8Gb.

Ashutosh Rajora

unread,
Mar 8, 2025, 3:52:40 PM3/8/25
to sage-support
Thanks a lot sir,

Previously I tried re-running "make" but it had failed,

so this time particularly mentioned it to run no parallel jobs while building SciPy, ensured this by running  :

make SAGE_NUM_THREADS=1 MAKE="make -j1" scipy
make SAGE_NUM_THREADS=2 MAKE="make -j2"

and the BUILD was SUCCESSFUL!

I am now testing the build, lets see how the testing goes.
Again Thanks.

Ashutosh Rajora

unread,
Mar 9, 2025, 4:58:46 AM3/9/25
to sage-support

The testing ended, but i can see a lot of FAILED TESTS, are they normal? and can i proceed to contribute or these need to be fixed?

----------------------------------------------------------------------
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/symbolic/expression.pyx  # 2 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/symbolic/ring.pyx  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/symbolic/expression_conversions.py  # 20 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/symbolic/integration/external.py  # 13 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/symbolic/integration/integral.py  # 3 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/doctest/util.py  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/calculus/calculus.py  # 6 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/calculus/desolvers.py  # 13 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/matrix/matrix1.pyx  # 4 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/interfaces/fricas.py  # 169 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/gamma.py  # 4 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/log.py  # 3 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/error.py  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/jacobi.py  # 4 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/special.py  # 10 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/generalized.py  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/orthogonal_polys.py  # 6 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/functions/other.py  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/infinity.py  # 2 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/real_mpfr.pyx  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/complex_double.pyx  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/rational_field.py  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/real_double.pyx  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/integer_ring.pyx  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/finite_rings/integer_mod.pyx  # 2 doctests failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/rings/finite_rings/integer_mod_ring.py  # 1 doctest failed
sage -t --warn-long 5.0 --random-seed=136679533914642111015813988340208459895 src/sage/combinat/posets/posets.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 30192.8 seconds
    cpu time: 4945.0 seconds
    cumulative wall time: 4574.3 seconds
Features detected for doctesting: 4ti2,conway_polynomials,cvxopt,database_cremona_mini_ellcurve,database_ellcurves,database_graphs,dvipng,fpylll,fricas,gap_package_polycyclic,gfan,giac,graphviz,imagemagick,info,jupyter_sphinx,lrcalc_python,lrslib,mpmath,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,pillow,polytopes_db,pplpy,primecountpy,ptyprocess,pyparsing,rpy2,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.braiding,sage.libs.ecl,sage.libs.flint,sage.libs.gap,sage.libs.homfly,sage.libs.linbox,sage.libs.m4ri,sage.libs.ntl,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modular,sage.modules,sage.numerical.mip,sage.plot,sage.rings.complex_double,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.polynomial.pbori,sage.rings.real_double,sage.rings.real_mpfr,sage.schemes,sage.symbolic,sagemath_doc_html,scipy,singular,sphinx,sympy,threejs    
EigenVector22@LAPTOP-NLAVJRP4:~/sage$


Thanks,

Dima Pasechnik

unread,
Mar 9, 2025, 12:28:36 PM3/9/25
to sage-s...@googlegroups.com
the test logs should be in logs/tests.log,
post them here, otherwise it's hard to say what's wrong
Reply all
Reply to author
Forward
0 new messages