unable to build sage-10.3.beta4 on Ubuntu 22.04

195 views
Skip to first unread message

Wouter Castryck

unread,
Jan 6, 2024, 1:05:42 PM1/6/24
to sage-devel
Hi all,

I'm trying to build Sage 10.3 beta from source in Ubuntu 22.04 by rather naively following
but I keep bumping into errors when it tries to compile the sagelib package. I pasted part of the error below, but see the attached config.log and sagelib-10.3.beta4.log files for the full logs.

These specific instances correspond to the following configuration:

./configure --config-cache --enable-ccache --prefix=/opt/sage/sage-10.3 --with-system-pari=no

But this is just one of several attempts; the issue is always similar. (Here, the pari option was because I had read in another post about a potential conflict with giac.)

Any help would be most welcome, thanks!

best,
Wouter

------

[sagelib-10.3.beta4]       g++ -std=gnu++11 -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-rpath-link,/opt/sage/sage-10.3/lib -L/opt/sage/sage-10.3/lib -Wl,-rpath,/opt/sage/sage-10.3/lib -g -O2 build/temp.linux-x86_64-cpython-310/sage/matrix/matrix_integer_sparse.o -L/opt/sage/sage-10.3/lib -L/usr/lib/x86_64-linux-gnu/openblas-pthread/ -L/opt/sage/sage-10.3/lib -L/opt/sage/sage-10.3/lib -L/usr/lib/x86_64-linux-gnu -lgmp -llinbox -lntl -lmpfr -liml -lflint -lfflas -lffpack -lopenblas -lgivaro -lgmp -lgmpxx -lgivaro -lgmp -lgmpxx -lfflas -lffpack -lopenblas -lgivaro -lgmp -lgmpxx -lflint -o build/lib.linux-x86_64-cpython-310/sage/matrix/matrix_integer_sparse.cpython-310-x86_64-linux-gnu.so -lpari -fopenmp
[sagelib-10.3.beta4]       error: command '/opt/sage/sage-10.3/libexec/ccache/g++' failed with exit code 1
[sagelib-10.3.beta4]       error: subprocess-exited-with-error
[sagelib-10.3.beta4]       
[sagelib-10.3.beta4]       × python setup.py develop did not run successfully.
[sagelib-10.3.beta4]       │ exit code: 1
[sagelib-10.3.beta4]       ╰─> See above for output.

sagelib-10.3.beta4.log
config.log

Dima Pasechnik

unread,
Jan 6, 2024, 1:53:44 PM1/6/24
to sage-devel
I would try to skip cache and ccache options in your call to
./configure

Matthias Koeppe

unread,
Jan 6, 2024, 3:00:05 PM1/6/24
to sage-devel
Relevant error from sagelib... log:

    /usr/bin/ld: ///usr/local/lib/libntl.a(RR.o): relocation R_X86_64_TPOFF32 against symbol `_ZN3NTL2RR4precE' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: failed to set dynamic section sizes: bad value
    collect2: error: ld returned 1 exit status

To fix, remove the broken installation of NTL in /usr/local

Wouter Castryck

unread,
Jan 6, 2024, 5:13:36 PM1/6/24
to sage-devel
This indeed fixed it, thanks a lot!

Op zaterdag 6 januari 2024 om 21:00:05 UTC+1 schreef Matthias Koeppe:

Wouter Castryck

unread,
Jan 9, 2024, 5:35:51 AM1/9/24
to sage-devel
SageMath is up and running, so this is just out of curiosity: are the following small issues normal, given that it concerns a beta release, or are they an indication that something went wrong nevertheless?

* when launching SageMath, two deprecation warnings are printed (see below),

* the instructions say that, when running make ptestlong, one should "not get disturbed by 2 to 3 failures", but here there are quite a few more (see the log file attached), and they all seem related to the fricas module.

Thanks again!

Wouter


-----------------------

/opt/sage/sage-10.3/bin/sage-venv-config:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('sagemath-standard==10.3b4')
/opt/sage/sage-10.3/bin/sage-ipython:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('sagemath-standard==10.3b4')
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.3.beta4, Release Date: 2023-12-26              │
│ Using Python 3.10.12. Type "help()" for help.                      │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage:


Op zaterdag 6 januari 2024 om 23:13:36 UTC+1 schreef Wouter Castryck:
test.log

Dima Pasechnik

unread,
Jan 9, 2024, 5:53:20 AM1/9/24
to sage-devel
It looks like the fricas package is broken in your installation. Perhaps it's just not installed.
Do you have logs/pkgs/fricas-1.3.8.p1.log ?
If not, it was not installed. It's an optional package.

You can install it by running

make fricas && make build

(or make -j8 instead of just make) - 8 can be replaced by whatever the appropriate # of cores is.

Dima Pasechnik

unread,
Jan 9, 2024, 5:58:31 AM1/9/24
to sage-devel
By the way, if you haven't yet installed fricas,
could you try running ./sage and there

sage: from sage.features.fricas import FriCAS
sage: FriCAS().is_present()

What does it output?
Reply all
Reply to author
Forward
0 new messages