How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

561 views
Skip to first unread message

Paul Leopardi

unread,
Jul 19, 2016, 11:00:16 AM7/19/16
to sage-support
Hi all,
My build of Sage 7.2 on Ubuntu 16.04 failed in atlas-3.10.2, with an error that I don't understand and don't know how to fix.
What should I be doing to obtain a successful build of Sage 7.2 from source?
All the best, Paul

DETAILS:

I downloaded sage-7.2.tar.gz to my home Linux box:

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       xenial

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ uname -a
Linux catawba 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I then followed the instructions at http://doc.sagemath.org/html/en/installation/source.html to install from source.

$ tar xvfz sage-7.2.tar.gz
$ cd sage-7.2
$ make

This failed with the following error message:

"Error: The spkg-install script is written in Python, but the Python
package is not yet installed in Sage.  You should add $(PYTHON)
as dependency in build/pkgs/atlas/dependencies"

I have attached the make output surrounding the error message, as the file make.out.
One point to note in the attachment is that the python2-2.7.10.p1 build within Sage 7.2 reported
"Finished installing python2-2.7.10.p1.spkg"
before the error message in the atlas-3.10.2.p2 build.

Also the files build/pkgs/atlas, build/pkgs/atlas/dependencies and logs/pkgs/atlas-3.10.2.p2.log contain:

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls build/pkgs/atlas
checksums.ini  configuration.py  dependencies  enums.py  package-version.txt  patches  spkg-check  spkg-install  spkg-src  SPKG.txt  type

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ cat build/pkgs/atlas/dependencies
| $(PYTHON)

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ more /home/leopardi/sync/src-downloaded/sage/sage-7.2/logs/pkgs/atlas-3.10.2.p2.log
Found local metadata for atlas-3.10.2.p2
Using cached file /home/leopardi/sync/src-downloaded/sage/sage-7.2/upstream/atlas-3.10.2.tar.bz2
atlas-3.10.2.p2
====================================================
Setting up build directory for atlas-3.10.2.p2
Finished set up
Error: The spkg-install script is written in Python, but the Python
package is not yet installed in Sage.  You should add $(PYTHON)
as dependency in build/pkgs/atlas/dependencies
make.out

John Cremona

unread,
Jul 19, 2016, 12:09:20 PM7/19/16
to SAGE support
Try running ./configure before make.

John Cremona
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

Paul Leopardi

unread,
Jul 19, 2016, 5:57:26 PM7/19/16
to sage-support
On Wednesday, 20 July 2016 02:09:20 UTC+10, John Cremona wrote:
Try running ./configure before make.

I have now done the following and have attached config.log. I will next run make and will report the results.

Why do the instructions in  http://doc.sagemath.org/html/en/installation/source.html and README.md *not* say to run ./configure before make?
(Also, step 4. of the instructions mentions README.txt but there is no such file.)

DETAILS

leopardi@catawba:~/sync/src-downloaded/sage$ rm -rf sage-7.2
leopardi@catawba:~/sync/src-downloaded/sage$ ls sage-7.2
ls: cannot access 'sage-7.2': No such file or directory
leopardi@catawba:~/sync/src-downloaded/sage$ tar xfz sage-7.2.tar.gz
leopardi@catawba:~/sync/src-downloaded/sage$ ls sage-7.2           
bootstrap  build  config  configure  configure.ac  COPYING.txt  m4  Makefile  README.md  sage  src  upstream  VERSION.txt
leopardi@catawba:~/sync/src-downloaded/sage$ cd sage-7.2
leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for root user... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ar... yes
checking for m4... yes
checking for ranlib... yes
checking for strip... yes
checking for GNU or BSD tar... /bin/tar
checking for GNU make... /usr/bin/make
checking for latex... yes
checking for perl... /usr/bin/perl
checking for Perl version 5.8.0 or later... yes
checking for git... /usr/bin/git
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking complex.h usability... yes
checking complex.h presence... yes
checking for complex.h... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for gcc option to accept ISO C99... none needed
checking for Fortran flag needed to accept free-form source... -ffree-form
checking if gcc accepts -dumpversion option... yes
checking gcc version... 5.4.0
checking if g++ accepts -dumpversion option... yes
checking g++ version... 5.4.0
checking for sqrt in -lm... yes
checking multiprecision library... MPIR
checking BLAS library... atlas
checking package versions...
    4ti2-1.6.7
    alabaster-0.7.7
    arb-2.8.1.p0
    atlas-3.10.2.p2
    autotools-20141105
    babel-2.2.0
    backports_abc-0.4
    backports_ssl_match_hostname-3.5.0.1
    benzene-20130630
    bliss-0.73
    boost_cropped-1.58.0
    brial-0.8.4.3
    buckygen-1.0
    bzip2-1.0.6-20150304
    cbc-2.9.4
    ccache-3.2.2
    cddlib-094g.p0
    cephes-2.8.p1
    certifi-2016.2.28
    cliquer-1.21.p3
    cmake-3.2.3
    combinatorial_designs-20140630
    compilerwrapper-1.2
    configure-164
    conway_polynomials-0.4.p0
    coxeter3-1.1
    cryptominisat-2.9.6
    csdp-6.2
    cvxopt-1.1.8.p1
    cycler-0.10.0
    cysignals-1.1.0
    cython-0.24.p0
    d3js-3.4.8
    database_cremona_ellcurve-20160211
    database_gap-4.8.3
    database_jones_numfield-4
    database_mutation_class-1.0
    database_odlyzko_zeta-20061209
    database_pari-20140908
    database_stein_watkins-20110713
    database_stein_watkins_mini-20070827
    database_symbolic_data-20070206
    dateutil-2.2
    decorator-4.0.6
    docutils-0.12
    dot2tex-2.9.0.p0
    ecl-15.3.7.p1
    eclib-20150827
    ecm-6.4.4
    elliptic_curves-0.8
    fflas_ffpack-1.6.0.p2
    flask-0.10.1
    flask_autoindex-0.5
    flask_babel-0.9
    flask_oldsessions-0.10
    flask_openid-1.2.5
    flask_silk-0.2
    flint-2.5.2.p0
    flintqs-1.0
    freetype-2.6
    fricas-1.2.4
    functools32-3.2.3-2
    gambit-14.1.0
    gap-4.8.3
    gap3-jm5-2015-02-01
    gap_packages-4.8.3.p1
    gc-7.2f.p0
    gcc-4.9.3.p1 not installed (configure check)
    gdb-7.8
    gf2x-1.1.p1
    gfan-0.5.p0
    giac-1.2.2.37
    giacpy-0.5.6
    git-2.6.2 not installed (configure check)
    git_trac-20150522
    givaro-3.7.1
    glpk-4.55.p1
    gmp-5.1.3
    gp2c-0.0.9pl5
    graphs-20151224
    gsl-2.1
    iconv-1.14
    igraph-0.7.1
    imagesize-0.7.0
    iml-1.0.4p1.p1
    ipykernel-4.3.1
    ipython-4.1.2
    ipython_genutils-0.1.0
    ipywidgets-4.1.1
    itsdangerous-0.24
    jinja2-2.8
    jmol-14.2.11_2015.01.20
    jsonschema-2.5.1
    jupyter_client-4.2.2
    jupyter_core-4.1.0
    latte_int-1.7.3
    lcalc-1.23.p14
    libfplll-20160331
    libgap-4.8.3
    libgd-2.1.1.1.p0
    libogg-1.3.1
    libpng-1.2.51.p0
    libtheora-1.1.1
    lidia-2.3.0+latte-patches-2014-10-04
    lie-2.2.2
    linbox-1.3.2.p1
    lrcalc-1.2.p0
    lrslib-051
    m4ri-20140914
    m4rie-20150908
    markupsafe-0.23
    mathjax-2.5
    matplotlib-1.5.1
    maxima-5.35.1.p2
    mcqd-1.0
    meataxe-2.4.24.p1
    mistune-0.7.2
    modular_decomposition-20100607
    mpc-1.0.3.p0
    mpfi-1.5.1
    mpfr-3.1.4
    mpir-2.7.2
    mpmath-0.19
    nauty-26r1
    nbconvert-4.2.0
    nbformat-4.0.1
    ncurses-5.9.20131221
    networkx-1.11
    normaliz-3.1.0
    nose-1.3.3
    notebook-4.2.0
    ntl-9.6.2.p1
    numpy-1.11.0
    openblas-0.2.15
    openssl-1.0.2h
    ore_algebra-0.2
    palp-2.1.p1
    pari-2.8-2341-g61b65cc.p0
    pari_galdata-20080411
    pari_jupyter-1.1.0
    pari_seadata_small-20090618
    patch-2.7.5
    patchbot-2.5.5
    pathlib2-2.1.0
    pathpy-7.1
    pexpect-4.0.1.p1
    pickleshare-0.7.2
    pillow-3.2.0
    pip-8.1.1
    pkgconf-0.9.7
    pkgconfig-1.1.0
    planarity-2.2.0
    plantri-4.5
    polytopes_db-20120220
    ppl-1.1
    ptyprocess-0.5.1
    pycrypto-2.6.1.p0
    pygments-2.1.3
    pynac-0.6.5
    pyparsing-2.1.1
    python2-2.7.10.p1
    python3-3.4.3
    python_igraph-0.7.0
    python_openid-2.2.5
    pytz-2016.3
    pyzmq-15.2.0
    qepcad-B.1.69.p0
    r-3.2.4-revised.p0
    ratpoints-2.1.3.p3
    readline-6.3.008
    rpy2-2.7.8
    rubiks-20070912.p18
    rw-0.7
    saclib-2.2.6
    sage_mode-0.14
    sagenb-0.12
    sagetex-3.0
    scipy-0.17.0.p1
    scons-1.2.0
    setuptools-20.3.1
    setuptools_scm-1.11.0
    simplegeneric-0.8.1
    singledispatch-3.4.0.3
    singular-3.1.7p1.p1
    six-1.10.0
    snowballstemmer-1.2.1
    speaklater-1.3
    sphinx-1.4.1.p0
    sqlite-3.8.4.3
    symmetrica-2.0.p9
    sympow-1.018.1.p11
    sympy-1.0.p0
    tachyon-0.98.9.p5
    tdlib-0.3.1
    termcap-1.3.1.p3
    threejs-r70
    tides-2.0
    topcom-0.17.4.p0
    tornado-4.3
    traitlets-4.2.1
    twisted-15.5.0
    valgrind-3.10.0
    vcversioner-2.16.0.0
    werkzeug-0.11.5
    zeromq-4.0.5
    zlib-1.2.8.p0
    zn_poly-0.9.p11
    zope_interface-4.1.3
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating build/make/Makefile-auto
config.status: executing depfiles commands
config.status: executing mkdirs commands
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/logs/pkgs
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/local
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/etc
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/include
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/lib
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/share
config.status: creating directory /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed
config.status: creating symbolic link lib64 -> lib

config.log

Paul Leopardi

unread,
Jul 19, 2016, 6:14:15 PM7/19/16
to sage-support
From config.log I noticed that
PATH: /home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin
PATH: /home/leopardi/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin

so just to be on the safe side, I ran the following. I will next run make, and will report on the results.


DETAILS

leopardi@catawba:~/sync/src-downloaded/sage$ rm -rf sage-7.2
leopardi@catawba:~/sync/src-downloaded/sage$ echo $PATH
/home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin:/home/leopardi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
leopardi@catawba:~/sync/src-downloaded/sage$ ls /usr/local/bin
bugpoint      clang-3.9     git-clang-format  llvm-as          llvm-c-test   llvm-dsymutil   llvm-lib   llvm-mcmarkup  llvm-profdata  llvm-size        llvm-tblgen  sancov      verify-uselistorder
c-index-test  clang-check   llc               llvm-bcanalyzer  llvm-cxxdump  llvm-dwarfdump  llvm-link  llvm-nm        llvm-ranlib    llvm-split       obj2yaml     sanstats    yaml2obj
clang         clang-cl      lli               llvm-config      llvm-diff     llvm-dwp        llvm-lto   llvm-objdump   llvm-readobj   llvm-stress      opt          scan-build
clang++       clang-format  llvm-ar           llvm-cov         llvm-dis      llvm-extract    llvm-mc    llvm-pdbdump   llvm-rtdyld    llvm-symbolizer  qd-config    scan-view
leopardi@catawba:~/sync/src-downloaded/sage$ ls /home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin
ls: cannot access '/home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin': No such file or directory
leopardi@catawba:~/sync/src-downloaded/sage$ export PATH=/home/leopardi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
leopardi@catawba:~/sync/src-downloaded/sage$ . ~/.bashrc
leopardi@catawba:~/sync/src-downloaded/sage$ echo $PATH
/home/leopardi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

leopardi@catawba:~/sync/src-downloaded/sage$ tar xfz sage-7.2.tar.gz
config.log

Paul Leopardi

unread,
Jul 19, 2016, 6:49:48 PM7/19/16
to sage-support
The result of ./make after ./configure is the same error message as the result of ./make without ./configure:

 
make[3]: Leaving directory '/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/tmp/sage/build/python2-2.7.10.p1/src'
Installing valgrind suppression file...
Testing importing of various modules...
ctypes module imported OK
math module imported OK
hashlib module imported OK
crypt module imported OK
readline module imported OK
socket module imported OK

real    2m4.845s
user    1m40.688s
sys     0m8.560s
Successfully installed python2-2.7.10.p1
You can safely delete the temporary build directory
/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/tmp/sage/build/python2-2.7.10.p1
Finished installing python2-2.7.10.p1.spkg
sage-logger 'sage-spkg atlas-3.10.2.p2' '/home/leopardi/sync/src-downloaded/sage/sage-7.2/logs/pkgs/atlas-3.10.2.p2.log'

Found local metadata for atlas-3.10.2.p2
Using cached file /home/leopardi/sync/src-downloaded/sage/sage-7.2/upstream/atlas-3.10.2.tar.bz2
atlas-3.10.2.p2
====================================================
Setting up build directory for atlas-3.10.2.p2
Finished set up
Error: The spkg-install script is written in Python, but the Python
package is not yet installed in Sage.  You should add $(PYTHON)
as dependency in build/pkgs/atlas/dependencies
Makefile:1072: recipe for target '/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/atlas-3.10.2.p2' failed
make[2]: *** [/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/atlas-3.10.2.p2] Error 1
make[2]: Leaving directory '/home/leopardi/sync/src-downloaded/sage/sage-7.2/build/make'
Makefile:826: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/leopardi/sync/src-downloaded/sage/sage-7.2/build/make'

real    30m30.566s
user    26m1.472s
sys     1m35.500s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all'):

* package: atlas-3.10.2.p2
  log file: /home/leopardi/sync/src-downloaded/sage/sage-7.2/logs/pkgs/atlas-3.10.2.p2.log
  build directory: /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/tmp/sage/build/atlas-3.10.2.p2

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

Makefile:16: recipe for target 'all' failed
make: *** [all] Error 1

python2-2.7.10.p1.log
atlas-3.10.2.p2.log

Volker Braun

unread,
Jul 19, 2016, 7:12:24 PM7/19/16
to sage-support
So is /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python executable?

Dima Pasechnik

unread,
Jul 20, 2016, 5:57:56 AM7/20/16
to sage-support
I guess having a systemwide python2 might be a way out, as well...

Paul Leopardi

unread,
Jul 20, 2016, 8:42:57 AM7/20/16
to sage-support


On Wednesday, 20 July 2016 09:12:24 UTC+10, Volker Braun wrote:
So is /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python executable?

This is what I have at the point where the build fails:

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls -hl local/bin/                                                                        
total 4.0K
-rwxr-xr-x 1 leopardi leopardi 387 Jul 20 08:15 pkg-config

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls -hl local/bin/pkg-config
-rwxr-xr-x 1 leopardi leopardi 387 Jul 20 08:15 local/bin/pkg-config

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ file local/bin/pkg-config 
local/bin/pkg-config: Bourne-Again shell script, ASCII text executable

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls -hl local/var/tmp/sage/build
total 68K
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:37 arb-2.8.1.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:45 atlas-3.10.2.p2
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:15 bzip2-1.0.6-20150304
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:34 flint-2.5.2.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:20 gf2x-1.1.p1
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:42 libpng-1.2.51.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:19 mpc-1.0.3.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:18 mpfr-3.1.4
drwxr-xr-x 3 leopardi leopardi 4.0K Jul 20 08:15 mpir-2.7.2
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:40 ncurses-5.9.20131221
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:24 ntl-9.6.2.p1
drwxr-xr-x 3 leopardi leopardi 4.0K Jul 20 08:14 patch-2.7.5
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:15 pkgconf-0.9.7
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:43 python2-2.7.10.p1
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:41 readline-6.3.008
drwxr-xr-x 3 leopardi leopardi 4.0K Jul 20 08:41 sqlite-3.8.4.3
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:15 zlib-1.2.8.p0

I checked python2-2.7.10.p1.log and discovered a problem: I had DESTDIR set to "/home/leopardi/usr/local". As a result, there were lines like:

(cd /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin; ln -s python2 python)
rm -f /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python2
etc.

I am trying the build again with export DESTDIR="".

Paul Leopardi

unread,
Jul 20, 2016, 8:43:56 AM7/20/16
to sage-support


On Wednesday, 20 July 2016 19:57:56 UTC+10, Dima Pasechnik wrote:
I guess having a systemwide python2 might be a way out, as well...


No, I have a system-wide python2. That was not the issue, as far as I can tell.
 

Paul Leopardi

unread,
Jul 20, 2016, 9:28:22 AM7/20/16
to sage-support
On Wednesday, 20 July 2016 22:42:57 UTC+10, Paul Leopardi wrote:
 
I checked python2-2.7.10.p1.log and discovered a problem: I had DESTDIR set to "/home/leopardi/usr/local". As a result, there were lines like:

(cd /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin; ln -s python2 python)
rm -f /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python2
etc.

I am trying the build again with export DESTDIR="".

The build now gets much further and fails in brial-0.8.4.3.
See the attached log file.

checking whether /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1 version is >= 2.7... no
configure: error: Python interpreter is too old
Error configuring BRiAl

real    0m5.036s
user    0m0.912s
sys     0m0.236s
************************************************************************
Error installing package brial-0.8.4.3
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
  /home/leopardi/sync/src-downloaded/sage/sage-7.2/logs/pkgs/brial-0.8.4.3.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/tmp/sage/build/brial-0.8.4.3 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/tmp/sage/build/brial-0.8.4.3' && '/home/leopardi/sync/src-downloaded/sage/sage-7.2/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
Makefile:1148: recipe for target '/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/brial-0.8.4.3' failed
make[2]: *** [/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/brial-0.8.4.3] Error 1
brial-0.8.4.3.log

Paul Leopardi

unread,
Jul 20, 2016, 9:44:53 AM7/20/16
to sage-support

Attached config.log for brial-0.8.4.3


config.log

Volker Braun

unread,
Jul 20, 2016, 12:36:10 PM7/20/16
to sage-support
You probably have to recompile from scratch (make distclean && make)

Paul Leopardi

unread,
Jul 20, 2016, 4:57:53 PM7/20/16
to sage-support
On Thursday, 21 July 2016 02:36:10 UTC+10, Volker Braun wrote:
You probably have to recompile from scratch (make distclean && make)

I had completely removed sage-7.2, then untarred again:

$ rm -rf sage-7.2
$ tar xfz sage-7.2.tar.gz
$ cd sage-7.2
$ nohup make > make.out & sleep 1; tail -f make.out

Surely this is the same (better?) than recompiling from scratch?

I looked into the configure and config.log for brial-0.8.4.3.log (attached)

Line 16383 of ./configure says:
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.7" >&5

The relevant part of config.log says:

configure:16383: checking whether /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1 version is >= 2.7
configure:16394: /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1 -c import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)
./configure: line 16395: /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1: Permission denied
configure:16397: $? = 126
configure:16402: result: no
configure:16404: error: Python interpreter is too old

Note "Permission denied"

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls -lht /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1
-rw-rw-r-- 1 leopardi leopardi 236 Jul 20 23:08 /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1
leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ more /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1
PACKAGE NAME: python2-2.7.10.p1
INSTALL DATE: Wed Jul 20 23:08:30 AEST 2016
UNAME: Linux catawba 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
SageMath version 7.2, Release Date: 2016-05-15

So somehow $PYTHON is being set to the pathname of a file that is not a Python interpreter.

Much earlier in the make output, while making mpir-2.7.2:
Warning: Unsetting PYTHON (="/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1"), since it doesn't seem
         to contain the name of / path to a Python interpreter.


configure
config.log

Volker Braun

unread,
Jul 20, 2016, 6:06:37 PM7/20/16
to sage-support
Well do you have PYTHON set in your environment? I'm pretty sure that there are a number of python-related environment settings that will cause problems....

Paul Leopardi

unread,
Jul 20, 2016, 6:21:14 PM7/20/16
to sage-support


On Thursday, 21 July 2016 08:06:37 UTC+10, Volker Braun wrote:
Well do you have PYTHON set in your environment? I'm pretty sure that there are a number of python-related environment settings that will cause problems....


I did have but the value of PYTHON in my environment

was different from the value at the time of the failure:
/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1
 
I am trying again after clearing my ~/.bashrc of all variable definitions, logging out and logging back in again.
And by "trying again", yes, I do mean removing the whole sage-7.2 directory, untarring it again, and running make.

Paul Leopardi

unread,
Jul 20, 2016, 6:57:55 PM7/20/16
to sage-support

The build now gets past the point where it failed previously.

in brial-0.8.4.3-log:

checking for a Python interpreter with version >= 2.7... python
checking for python... /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages

The key point missing from the documentation is that you need to have your environment as clean as possible before you start make.

Paul Leopardi

unread,
Jul 21, 2016, 7:38:38 AM7/21/16
to sage-support
On Thursday, 21 July 2016 08:57:55 UTC+10, Paul Leopardi wrote:

The build now gets past the point where it failed previously.


The build now fails in dochtml with a problem that looks like this WONTFIX bug:  https://trac.sagemath.org/ticket/18891
and also looks like this unresolved issue: https://groups.google.com/forum/#!msg/sage-devel/Lz4NjfvjMbg/c-xdU8uwAAAJ
It also looks like this bug https://trac.sagemath.org/ticket/21014
which is fixed in this commit: https://git.sagemath.org/sage.git/commit?id=d741fbb99328eb03aea7c78db8d8370700ee705c

I will wipe the sage-7.2 directory again, but before starting the make, I will apply the patch described in the commit.
Before I do so, I will try an experiment: apply the patch to the existing sage-7.2 directory, and run make again.


Paul Leopardi

unread,
Jul 21, 2016, 8:43:22 AM7/21/16
to sage-support
On Thursday, 21 July 2016 21:38:38 UTC+10, Paul Leopardi wrote:
Before I do so, I will try an experiment: apply the patch to the existing sage-7.2 directory, and run make again.


The experiment apparently succeeded. The make ran to a successful conclusion.

I could not successfully relocate the built directory, but Sage did run once I updated SAGE_ROOT in /usr/local/bin/sage to say

SAGE_ROOT=/home/leopardi/sync/src-downloaded/sage/sage-7.2

leopardi@catawba:~/src/sage-sandbox$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.2, Release Date: 2016-05-15                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘

ERROR:  The Sage installation tree has moved

from /home/leopardi/sync/src-downloaded/sage/sage-7.2
  to /home/leopardi/opt/sage/sage-7.2

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")

Thanks for all the help!

Dima Pasechnik

unread,
Jul 21, 2016, 8:50:10 AM7/21/16
to sage-support


On Thursday, July 21, 2016 at 1:43:22 PM UTC+1, Paul Leopardi wrote:
On Thursday, 21 July 2016 21:38:38 UTC+10, Paul Leopardi wrote:
Before I do so, I will try an experiment: apply the patch to the existing sage-7.2 directory, and run make again.


The experiment apparently succeeded. The make ran to a successful conclusion.

I could not successfully relocate the built directory, but Sage did run once I updated SAGE_ROOT in /usr/local/bin/sage to say

SAGE_ROOT=/home/leopardi/sync/src-downloaded/sage/sage-7.2

leopardi@catawba:~/src/sage-sandbox$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.2, Release Date: 2016-05-15                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘

ERROR:  The Sage installation tree has moved

from /home/leopardi/sync/src-downloaded/sage/sage-7.2
  to /home/leopardi/opt/sage/sage-7.2

This is not supported, and Sage will not work.

well, this is indeed not supported. Do not move your tree...


 

Paul Leopardi

unread,
Jul 21, 2016, 9:01:14 AM7/21/16
to sage-support

On Thursday, 21 July 2016 22:50:10 UTC+10, Dima Pasechnik wrote:
On Thursday, July 21, 2016 at 1:43:22 PM UTC+1, Paul Leopardi wrote:
ERROR:  The Sage installation tree has moved

from /home/leopardi/sync/src-downloaded/sage/sage-7.2
  to /home/leopardi/opt/sage/sage-7.2

This is not supported, and Sage will not work.

well, this is indeed not supported. Do not move your tree...

Then why do the installation instructions at  http://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment
say "After building Sage, you may optionally copy or move the entire build tree to /usr/local or another location. If you do this, then you must run ./sage once so that various hardcoded locations get updated. For this reason, it might be easier to simply build Sage in its final location."
Does the build of sage itself use up the "starting Sage the first time" so that the given instructions will never work? If so, should the misleading part of the instructions be deleted?

Dima Pasechnik

unread,
Jul 21, 2016, 9:47:53 AM7/21/16
to sage-support

indeed, it is a bad documentation bug (this used to work at some point in recent past).
Thanks for reporting it. I opened https://trac.sagemath.org/ticket/21073
to deal with it.

John H Palmieri

unread,
Jul 21, 2016, 11:31:54 AM7/21/16
to sage-support


On Thursday, July 21, 2016 at 4:38:38 AM UTC-7, Paul Leopardi wrote:
On Thursday, 21 July 2016 08:57:55 UTC+10, Paul Leopardi wrote:

The build now gets past the point where it failed previously.


The build now fails in dochtml with a problem that looks like this WONTFIX bug:  https://trac.sagemath.org/ticket/18891

Does the branch at https://trac.sagemath.org/ticket/21014 fix it? That branch will actually be merged soon, as opposed to whatever is at #18891.

--
John

Paul Leopardi

unread,
Jul 22, 2016, 4:47:35 AM7/22/16
to sage-s...@googlegroups.com, John H Palmieri
Hi John,
Yes that branch fixes the problem.

Paul Leopardi

unread,
Jul 22, 2016, 8:19:22 AM7/22/16
to sage-support
On Thursday, 21 July 2016 21:38:38 UTC+10, Paul Leopardi wrote:
On Thursday, 21 July 2016 08:57:55 UTC+10, Paul Leopardi wrote:

The build now gets past the point where it failed previously.


The build now fails in dochtml with a problem that looks like this WONTFIX bug:  https://trac.sagemath.org/ticket/18891
and also looks like this unresolved issue: https://groups.google.com/forum/#!msg/sage-devel/Lz4NjfvjMbg/c-xdU8uwAAAJ
It also looks like this bug https://trac.sagemath.org/ticket/21014
which is fixed in this commit: https://git.sagemath.org/sage.git/commit?id=d741fbb99328eb03aea7c78db8d8370700ee705c

I will wipe the sage-7.2 directory again, but before starting the make, I will apply the patch described in the commit.


Wiping sage-7.2 and applying the patch from https://trac.sagemath.org/ticket/21014 does work. Sage built successfully.
Reply all
Reply to author
Forward
0 new messages