Ask Your Question
0

building sage from git.

asked 2023-10-19 06:21:50 +0200

Ayan gravatar image

updated 2023-10-19 14:02:30 +0200

FrédéricC gravatar image

Hi I am trying to build sage from the source by cloning from the git repository. I tried with both the master and the develop branch. I am using Fedora 39. There is a issue with building sagelib. The relevant error is below. Any help appreciated.

Ayan


[sagelib-10.1]     error: command '/usr/bin/gcc' failed with exit code 1
[sagelib-10.1]     error: subprocess-exited-with-error
[sagelib-10.1]
[sagelib-10.1]     × python setup.py develop did not run successfully.
[sagelib-10.1]     │ exit code: 1
[sagelib-10.1]     ╰─> See above for output.
[sagelib-10.1]
[sagelib-10.1]     note: This error originates from a subprocess, and is likely not a problem with pip.
[sagelib-10.1]     full command: /home/ayan/programs/sage/local/var/lib/sage/venv-python3.11.1/bin/python3 -c '
[sagelib-10.1]     exec(compile('"'"''"'"''"'"'
[sagelib-10.1]     # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
[sagelib-10.1]     #
[sagelib-10.1]     # - It imports setuptools before invoking setup.py, to enable projects that directly
[sagelib-10.1]     #   import from `distutils.core` to work with newer packaging standards.
[sagelib-10.1]     # - It provides a clear error message when setuptools is not installed.
[sagelib-10.1]     # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
[sagelib-10.1]     #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
[sagelib-10.1]     #     manifest_maker: standard file '"'"'-c'"'"' not found".
[sagelib-10.1]     # - It generates a shim setup.py, for handling setup.cfg-only projects.
[sagelib-10.1]     import os, sys, tokenize
[sagelib-10.1]
[sagelib-10.1]     try:
[sagelib-10.1]         import setuptools
[sagelib-10.1]     except ImportError as error:
[sagelib-10.1]         print(
[sagelib-10.1]             "ERROR: Can not execute `setup.py` since setuptools is not available in "
[sagelib-10.1]             "the build environment.",
[sagelib-10.1]             file=sys.stderr,
[sagelib-10.1]         )
[sagelib-10.1]         sys.exit(1)
[sagelib-10.1]
[sagelib-10.1]     __file__ = %r
[sagelib-10.1]     sys.argv[0] = __file__
[sagelib-10.1]
[sagelib-10.1]     if os.path.exists(__file__):
[sagelib-10.1]         filename = __file__
[sagelib-10.1]         with tokenize.open(__file__) as f:
[sagelib-10.1]             setup_py_code = f.read()
[sagelib-10.1]     else:
[sagelib-10.1]         filename = "<auto-generated setuptools caller>"
[sagelib-10.1]         setup_py_code = "from setuptools import setup; setup()"
[sagelib-10.1]
[sagelib-10.1]     exec(compile(setup_py_code, filename, "exec"))
[sagelib-10.1]     '"'"''"'"''"'"' % ('"'"'/home/ayan/programs/sage/src/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' --no-user-cfg develop --no-deps
[sagelib-10.1]     cwd: /home/ayan/programs/sage/src/
[sagelib-10.1] error: subprocess-exited-with-error
[sagelib-10.1]
[sagelib-10.1] × python setup.py develop did not run successfully.
[sagelib-10.1] │ exit code: 1
[sagelib-10.1] ╰─> See above for output.
[sagelib-10.1]
[sagelib-10.1] note: This error originates from a subprocess, and is likely not a problem with pip.
edit retag flag offensive close merge delete

Comments

The 6th line says "See above for output." Can you find error messages before this in the log file?

John Palmieri gravatar imageJohn Palmieri ( 2023-10-19 07:08:08 +0200 )edit

fedora 39 may be too new, using a too recent version of something, maybe gcc ?

FrédéricC gravatar imageFrédéricC ( 2023-10-19 15:52:17 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2023-11-01 08:44:53 +0200

Ayan gravatar image

updated 2023-11-01 08:50:03 +0200

It turns out that there was NTL installed in the machine from the repositories. That was somehow interfering with the build process. It could be leftover of manual install of NTL as well that was causing the problem. However, after uninstalling NTL and deleting all the files including the header files the install of sagemath went on fine using its own NTL. So it is not an issue with fedora39.

edit flag offensive delete link more
0

answered 2023-10-19 17:46:52 +0200

QMeqGR gravatar image

updated 2023-10-19 17:47:30 +0200

I'm on Fedora 39, stock system. After downloading the git repository I do

cd sage

./bootstrap

CFLAGS="-O2" ./configure --no-create --no-recursion

make -j8

I don't have any problems building 10.2.beta7 this way.

edit flag offensive delete link more

Comments

It does not work for me. The same command as above.

[sagelib-10.1] error: Command "gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -g -O2 -O2 -fPIC -Isage/libs -I/usr/include -Isage/cpython -I/home/ayan/programs/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/cysignals -I/home/ayan/programs/sage/src -I/home/ayan/programs/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/numpy/core/include -I/home/ayan/programs/sage/local/var/lib/sage/venv-python3.11.1/include/python3.11 -I/home/ayan/programs/sage/local/var/lib/sage/venv-python3.11.1/include/python3.11 -c sage/libs/ecl.c -o build/temp.linux-x86_64-cpython-311/sage/libs/ecl.o -Dlinux" failed with exit status 1

Ayan gravatar imageAyan ( 2023-10-20 07:29:20 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2023-10-19 06:21:50 +0200

Seen: 203 times

Last updated: Nov 01 '23