Ask Your Question
0

sage binary "base-toolchain" failed

asked 2018-10-19 19:33:22 +0100

anonymous user

Anonymous

updated 2018-10-20 21:54:48 +0100

I'm trying to use SageMath 8.3 binary for Ubuntu 16.04 LTS.

The binary does not work out of the box, it complains "RecursionError", which seems to be caused by Anaconda overriding the default python2.7 interpreter. So I temporarily comment out the Anaconda path, and the python interpreter is now the default 2.7.

Then there is this "bas-toolchain" error:

patching /home/abc/usr/SageMath/local/bin/g++
Traceback (most recent call last):
  File "./relocate-once.py", line 208, in <module>
    ch(3478673, 3478845).save()
  File "./relocate-once.py", line 113, in patch
    self.search_and_replace, self.filename
  File "./relocate-once.py", line 52, in __init__
    super(FileBinaryPatch, self).__init__(search_and_replace, filename)
  File "./relocate-once.py", line 40, in __init__
    self.st = os.stat(filename)
OSError: [Errno 2] No such file or directory: '/home/abc/usr/SageMath/local/bin/g++'
Makefile:31: recipe for target 'base-toolchain' failed
make: *** [base-toolchain] Error 1

I created a symlink of g++

ln -sf /usr/bin/g++ ./local/bin/g++

but it doesn't work.

I have no idea what to do, please help. Thanks in advance!

Edit (10/20/2018):

The binary also reports error. Output of sudo ./sage:

Traceback (most recent call last):
  File "/home/abc/usr/SageMath/relocate-once.py", line 208, in <module>
    ch(3478673, 3478845).save()
  File "/home/abc/usr/SageMath/relocate-once.py", line 113, in patch
    self.search_and_replace, self.filename
  File "/home/abc/usr/SageMath/relocate-once.py", line 52, in __init__
    super(FileBinaryPatch, self).__init__(search_and_replace, filename)
  File "/home/abc/usr/SageMath/relocate-once.py", line 40, in __init__
    self.st = os.stat(filename)
OSError: [Errno 2] No such file or directory: '/home/abc/usr/SageMath/local/bin/g++'

ERROR:  The Sage installation tree has moved

from /home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2
  to /home/abc/usr/SageMath

This is not supported, and Sage will not work. To install Sage from a
binary package:

1. Open the .tar.bz2 archive (or .dmg on OSX)

2. Move the SageMath folder/app to where you want it to be. You can
   also rename the directory now.

3. Start sage for the first time. This will then automatically patch
   paths in binaries.

After starting Sage for the first time you cannot change the
installation any more. To install Sage elsewhere, start over from the
binary package. Or recompile Sage from scratch in the new location
("make distclean && make")

I also tried sudo sage --nodotsage, same output. It looks like the binary in the first run must call the make.

edit retag flag offensive close merge delete

Comments

1

I suggest starting over completely, following the steps 1-3 in the output you quoted. Also in general you should not run sage with sudo, just run ./sage.

John Palmieri gravatar imageJohn Palmieri ( 2018-10-21 00:08:25 +0100 )edit

That works! It looks like one need to extract the .tar.bz2 again if the folder has been moved elsewhere after the execution of sage. And it does not require root privilege.

msgboxa gravatar imagemsgboxa ( 2018-10-21 02:20:52 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-10-20 18:21:57 +0100

If you've installed a binary for Sage, there is no need to run make. (If you want to run make, download the source code instead.)

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-10-19 19:33:22 +0100

Seen: 1,011 times

Last updated: Oct 20 '18