sage 9.5 build failed at package numpy-1.21.4 (on Windows Server 2019 WSL)

163 views
Skip to first unread message

ph h

unread,
Feb 3, 2022, 4:22:11 AM2/3/22
to sage-devel
Greetings,

The instructions at  https://sagemanifolds.obspm.fr/install_ubuntu.html were followed.

It is much appreciated if someone would kindly point out what was missing in the build process.

Please find attached 'install.log.7z' and 'numpy-1.21.4.log.7z'

Regards,

phiho

P.S: 
$ uname -a
Linux 4.4.0-17763-Microsoft #2268-Microsoft Thu Oct 07 16:36:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux


numpy-1.21.4.log.7z
install.log.7z

Eric Gourgoulhon

unread,
Feb 3, 2022, 5:08:36 AM2/3/22
to sage-devel
Hi,

Have you followed the instructions in the section "Ubuntu on Windows Subsystem for Linux (WSL) prerequisite installation" of https://doc.sagemath.org/html/en/installation/source.html ?

Eric.

Matthias Koeppe

unread,
Feb 3, 2022, 11:19:55 AM2/3/22
to sage-devel
The compilation fails with a failed system call:

  /usr/include/x86_64-linux-gnu/bits/types.h:142:10: fatal error: /mnt/g/Maths/sage-9.5/clone/local/var/lib/sage/venv-python3.8/include/bits/time64.h: Invalid argument
    142 | #include <bits/time64.h> /* Defines __TIME*_T_TYPE macros.  */
        |          ^~~~~~~~~~~~~~~
  compilation terminated.
 
This is likely sporadic and will go away if you just restart "make".

ph h

unread,
Feb 3, 2022, 2:32:32 PM2/3/22
to sage-...@googlegroups.com
Hi,

Actually this approach was tried a few times before. The report was from a fresh clone and build.

'MAKE="make -j8" make' was just tried again and the re-make ended with these failed  packages:

<quote>
real 13m20.842s
user 14m38.391s
sys 6m4.781s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         arb-2.19.0.p0
  last build time: Feb 3 12:08
  log file:        /mnt/g/Maths/sage-9.5/clone/logs/pkgs/arb-2.19.0.p0.log

* package:         pplpy-0.8.6
  last build time: Feb 3 12:09
  log file:        /mnt/g/Maths/sage-9.5/clone/logs/pkgs/pplpy-0.8.6.log

* package:         sphinx-4.2.0
  last build time: Feb 3 12:09
  log file:        /mnt/g/Maths/sage-9.5/clone/logs/pkgs/sphinx-4.2.0.log

* package:         numpy-1.21.4
  last build time: Feb 3 12:13
  log file:        /mnt/g/Maths/sage-9.5/clone/logs/pkgs/numpy-1.21.4.log

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

</quote>

Please find attached 'config.log.7z' and the logs of failed packages including numpy-1.21.4.log2.7z.

FWIW, 'sage-9.4' was successfully built (the first time) from the tarball (with 'configure' pre-made, downloaded from github) on this same machine about a week ago.
(The tarball for 'sage-9.5' did not go far)

numpy-1.21.4 still failed in another re-make

Regards,

phiho

P.S: I will be out of town and will have no access to the Internet (a couple weeks or so), please allow me to catch up later on.


--
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 on the web visit https://groups.google.com/d/msgid/sage-devel/461e60bb-5ae8-453c-b332-2bf2b02d6e14n%40googlegroups.com.
config.log.7z
arb-2.19.0.p0.log.7z
sphinx-4.2.0.log.7z
pplpy-0.8.6.log.7z
numpy-1.21.4.log2.7z

Matthias Koeppe

unread,
Feb 3, 2022, 2:36:15 PM2/3/22
to sage-devel
It would probably be a good idea to do "make ccache" and then re-attempt the build. 

ph h

unread,
Feb 15, 2022, 3:14:30 AM2/15/22
to sage-...@googlegroups.com
Hi,

Thank you so much for your advice.

I just started afresh with a new clone from github and following the instructions from https://sagemanifolds.obspm.fr/install_ubuntu.html

After running './configure', conda was deactivated (twice):

$ which conda
/home/hph/miniconda3/bin/conda

$ conda deactivate
$ conda deactivate

Then:

$ make ccache
$ MAKE="make -j8" make

after 10 times of -re-make (with MAKE="make -j8"):

$ ls -l *.log | wc -l
152

$ ls -l *.log.error | wc -l
12

All the errors from the earlier make's seemed to be fixed eventually in the later re-make, all except 'scipy-1.7.2' and 'sagelib-9.5'

Please find attached 'config.log.7z' and 'Error building a wheel for scipy-1.7.2 - scipy-1.7.2.log.error.7z' (from re-make #5 to #10) and 'sagelib-9.5.log.error.7z'

The re-make #10, scipy-1.7.2 failed with:

error: Command "gfortran -Wall -g -ffixed-form -fno-second-underscore -g -O2 -fPIC -fPIC -O3 -funroll-loops -I/mnt/g/Maths/sage-9.5/clone/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/distutils/include -c -c scipy/interpolate/fitpack/curev.f -o build/temp.linux-x86_64-3.8/scipy/interpolate/fitpack/curev.o" failed with exit status 1

  ########### CLIB COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: x64
    Compiler    : gcc

  CPU baseline  :
    Requested   : 'min'
    Enabled     : SSE SSE2 SSE3
    Flags       : -msse -msse2 -msse3
    Extra checks: none

  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
    Generated   : none
  CCompilerOpt.cache_flush[809] : write cache to path -> /mnt/g/Maths/sage-9.5/clone/local/var/lib/sage/venv-python3.8/var/tmp/sage/build/scipy-1.7.2/src/build/temp.linux-x86_64-3.8/ccompiler_opt_cache_clib.py
  error: Command "gfortran -Wall -g -ffixed-form -fno-second-underscore -g -O2 -fPIC -fPIC -O3 -funroll-loops -I/mnt/g/Maths/sage-9.5/clone/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/distutils/include -c -c scipy/interpolate/fitpack/curev.f -o build/temp.linux-x86_64-3.8/scipy/interpolate/fitpack/curev.o" failed with exit status 1
  Building wheel for scipy (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Failed to build one or more wheels
********************************************************************************
Error building a wheel for scipy-1.7.2
********************************************************************************

real 3m25.289s
user 6m14.359s
sys 1m47.406s

In the re-make #12, 'sagelib-9.5' build failed with:
error: [Errno 22] Invalid argument: 'sage/rings/power_series_poly.pxd'

Discovering Python/Cython source code....
distributions = ['']
Discovered Python/Cython sources, time: 2.99 seconds.
running build
Generating auto-generated sources
Building interpreters for fast_callable
running build_cython
Enabling Cython debugging support
error: [Errno 22] Invalid argument: 'sage/rings/power_series_poly.pxd'

real 0m17.411s
user 0m4.844s
sys 0m11.797s


Regards,

phiho


config.log.7z
Error building a wheel for scipy-1.7.2 - scipy-1.7.2.log.error.7z
sagelib-9.5.log.error.log.7z

Matthias Koeppe

unread,
Feb 15, 2022, 11:46:41 AM2/15/22
to sage-devel
I would suggest to try whether the "Invalid argument" syscall errors go away if you clone the Sage source tree in the Linux file system, for example, in "/sage", instead of a location mounted from the Windows file system (/mnt/g/Maths/sage-9.5/clone/).

Matthias Koeppe

unread,
Feb 15, 2022, 11:47:08 AM2/15/22
to sage-devel
(Is G: a network drive by any chance?)

ph h

unread,
Feb 15, 2022, 12:24:19 PM2/15/22
to sage-...@googlegroups.com
Hi,

G: is a local HDD. sage 9.4 was successfully built on the same HDD

BTW, I will try to clone sage under my home directory instead of /mnt (and cross my fingers, smile) to see if that helps with the build

Regards,

phiho


being nobody00

unread,
Feb 16, 2022, 2:57:37 PM2/16/22
to sage-devel
Hi Eric,

Thank you for the tip, it is very helpful . I am sorry that I missed this mail and have not responded before

Regards,

phiho

ph h

unread,
Feb 16, 2022, 3:04:41 PM2/16/22
to sage-devel
Hi  Matthias,

I have just finished the builds for sage 9.5 and 9.6 b01 successfully on the root drive (instead of mounted drive which was OK for sage 9.4)

Thank you so much for your patience. I am wondering what is the problem with the mounted drive. 
Is it a bug in WSL or  a feature in Ubuntu and/or Sage I am concerned about the limited disk space on the root drive

Again, thank you for your help and patience.

Regards,

phiho

Matthias Koeppe

unread,
Feb 16, 2022, 5:10:25 PM2/16/22
to sage-devel
I think it's a bug in WSL 1. We should update our WSL install instructions to mention this limitation.

You could also try if switching to WSL 2 improves the situation when using the mounted drive.

Tobias Diez

unread,
Feb 17, 2022, 7:48:19 AM2/17/22
to sage-devel
From the logs:
error: Command "gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./sage/cpython -I/mnt/g/Maths/sage-9.5/clone/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/cysignals -I./sage/rings -I/mnt/g/Maths/sage-9.5/clone/pkgs/sagemath-standard -I/usr/include/python3.8 -I/mnt/g/Maths/sage-9.5/clone/local/var/lib/sage/venv-python3.8/lib/python3.8/site-packages/numpy/core/include -Ibuild/cythonized -I/mnt/g/Maths/sage-9.5/clone/local/var/lib/sage/venv-python3.8/include -I/usr/include/python3.8 -c build/cythonized/sage/arith/power.c -o build/temp.linux-x86_64-3.8/build/cythonized/sage/arith/power.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c99" failed with exit status 1
Exception ignored in: <function Pool.__del__ at 0x7f439611e430>
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 268, in __del__
    self._change_notifier.put(None)
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 368, in put
    self._writer.send_bytes(obj)
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 411, in _send_bytes
    self._send(header + buf)
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor

Looks similar to errors I had due to sage's handling of the build/temp.xyz folder (combined with a bug in WSL). You can try the workaround of setting SAGE_BUILD_DIR  mentioned at the end of https://doc.sagemath.org/html/en/installation/source.html#ubuntu-on-windows-subsystem-for-linux-wsl-prerequisite-installation. For me this worked.

ph h

unread,
Feb 17, 2022, 1:43:21 PM2/17/22
to sage-...@googlegroups.com
Hi,

Thanks for the hint but  setting SAGE_BUILD_DIR does not seem to work in this case.

Regards,

phiho


Reply all
Reply to author
Forward
0 new messages