Ask Your Question
2

Building Sage 8.9 from source fails

asked 2019-10-11 06:06:28 -0600

Szabolcs gravatar image

updated 2019-10-11 12:35:28 -0600

tmonteil gravatar image

I am trying to build Sage 8.9 from source on Linux (Ubuntu 16.04, gcc 6). It fails. I could build Sage 8.8 on the same machine without problems.

It says that python2 and python3 failed to build, and suggests to look at the log files. The log files contain:

ImportError: No module named readline
readline module failed to import

and

ModuleNotFoundError: No module named 'readline'
readline module failed to import

Has anyone experienced the same and is there a simple solution?

Unfortunately, I do not have root access myself, thus I can't quickly try to install the readline dev package.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2019-10-13 06:11:40 -0600

To use system's readline on on Ubuntu 16.04, one needs to install libncurses5-dev and libreadline-dev (16.04 has a bug: the former is not a dependency of the latter, even though by right it should be)

As far as building Sage's readline goes, unfortunately we have not figured out yet what exactly goes wrong with building Sage's readline on 16.04. As a workaround, in the file build/pkgs/readline/patches/0002-ltinfo.patch replace the line

+       SHLIB_LIBS='$(TERMCAP_LIB)'

with

+   SHLIB_LIBS='-ltinfo -lncurses'

This shoud give a working readline built by Sage (hopefully)

edit flag offensive delete link more
1

answered 2019-10-11 06:41:15 -0600

tmonteil gravatar image

updated 2019-10-11 07:00:27 -0600

It seems related to https://groups.google.com/forum/?from...

Could you please try to:

  1. remove SAGE_DIR/build/pkgs/readline/spkg-configure.m4
  2. run make configure
  3. run ./configure
  4. recompile Sage

and then tell us what it does ?

Also, could you please tell us the output of (in a terminal):

ls /lib/x86_64-linux-gnu/libreadline*
edit flag offensive delete link more

Comments

make configure would say make: 'configure' is up to date. even if I start with a clean source tree. Did I miss anything in the build instructions? I now deleted configure, did make configure, ./configure, and now waiting for the build to finish ...

Szabolcs gravatar imageSzabolcs ( 2019-10-11 10:37:57 -0600 )edit

It fails with the same message.

The output of ls /lib/x86_64-linux-gnu/libreadline* is

/lib/x86_64-linux-gnu/libreadline.so.5 /lib/x86_64-linux-gnu/libreadline.so.6 /lib/x86_64-linux-gnu/libreadline.so.5.2 /lib/x86_64-linux-gnu/libreadline.so.6.3

Szabolcs gravatar imageSzabolcs ( 2019-10-11 10:48:57 -0600 )edit

Checking the log file more carefully revealed this line:

*** WARNING: renaming "readline" since importing it failed: /home/szhorvat/sage-8.9/local/lib/libreadline.so.6: undefined symbol: UP

Szabolcs gravatar imageSzabolcs ( 2019-10-11 10:57:00 -0600 )edit

this is a symptome of underlinking in readline. In its infinite wisdom readline's devs refuse to fix this old bug; it needs to be linked with libtinfo or other suchlike library, and it keeps resufacings in various forms...

Dima gravatar imageDima ( 2019-10-11 12:16:43 -0600 )edit
tmonteil gravatar imagetmonteil ( 2019-10-11 12:24:35 -0600 )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

1 follower

Stats

Asked: 2019-10-11 06:06:28 -0600

Seen: 65 times

Last updated: Oct 13