Ask Your Question
2

Building Sage 8.9 from source fails

asked 2019-10-11 13:06:28 +0100

Szabolcs gravatar image

updated 2023-01-09 23:59:52 +0100

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 13:11:40 +0100

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 13:41:15 +0100

tmonteil gravatar image

updated 2019-10-11 14:00:27 +0100

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 17:37:57 +0100 )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 17:48:57 +0100 )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 17:57:00 +0100 )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 19:16:43 +0100 )edit
tmonteil gravatar imagetmonteil ( 2019-10-11 19:24:35 +0100 )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 13:06:28 +0100

Seen: 884 times

Last updated: Oct 13 '19