building Sage still uses some "old-style" SPKG's, causes errors

95 views
Skip to first unread message

Chris Xu

unread,
May 20, 2024, 1:11:08 PM5/20/24
to sage-devel
Hi,

I'm attempting to build SageMath from source. I run Windows 10 WSL/Ubuntu 20.04 and Python 3.10.8. I followed all of the instructions in the "Getting Started" manual, including changing the PATH variable to what was specified. What ends up happening in my installation when I run "make" is that some of the packages in the "build" folder are using old-style SPKG's, namely:

build/pkgs/sage_conf
build/pkgs/sage_docbuild
build/pkgs/sage_setup
build/pkgs/sage_sws2rst
build/pkgs/sage_sagelib
build/pkgs/sagemath_bliss
build/pkgs/sagemath_categories
build/pkgs/sagemath_coxeter3
build/pkgs/sagemath_environment
build/pkgs/sagemath_mcqd
build/pkgs/sagemath_meataxe
build/pkgs/sagemath_objects
build/pkgs/sagemath_repl
build/pkgs/sagemath_sirocco
build/pkgs/sagemath_tdlib
build/pkgs/pplpy_doc

What is common to all of these directories is that "package-version.txt" has a slash in the contents and is thus detected by the bash script build/bin/sage-spkg as an old-style SPKG (line 297 "Error: Installing old-style SPKGs is no longer supported"). Now you'd think that I could just change the contents in each of the package-version.txt files into the one that they reference (e.g. 0.8.9 for pplpy-doc), but this causes further errors because old-style SPKGs are legitimately no longer supported. The file "spkg-install.in" has a command "cd src", but under these old-style SPKG's, there is no src file to cd into. (this is taking place inside local/var/lib/venv-python3.10/var/tmp/sage/build/<pkgname>-<pkgversion>.) Then further along it tries to install the package (e.g. with the command sdh-install) but then I get an error saying that they cannot recognize the folder as a Python object since is no "setup.py" or "pyproject.toml". This isn't an issue with new-style SPKGs, since they download a tarball, which then gives a /src/ subfolder, which has "setup.py" and/or "pyproject.toml". (NOTE: for pplpy_doc, this is fine, the installation is just skipped, but for the next folder in the build sequence, sage_conf, I run into this error.)

I'd like to know if there is any fix to this mysterious error.

Best,
Chris

Matthias Koeppe

unread,
May 20, 2024, 2:28:14 PM5/20/24
to sage-devel
The files that have "slash in the contents" are actually symbolic links.

On WSL, it is important to use Linux git (not some other git that may be on your system) with the exact options as instructed in https://github.com/sagemath/sage/blob/develop/README.md#instructions-to-build-from-source

Matthias Koeppe

unread,
May 20, 2024, 3:00:21 PM5/20/24
to sage-devel
I've opened https://github.com/sagemath/sage/pull/38039 (needs review) to add a check for this in the configure phase.
Reply all
Reply to author
Forward
0 new messages