trouble compiling sage in git-trac

41 views
Skip to first unread message

David Perkinson

unread,
Jun 10, 2015, 9:13:15 AM6/10/15
to sage-...@googlegroups.com
I am still trying to post revisions to sandpile.py.  The next issue is compiling sage with the git-trac directory.  The file pexpect.py seems to be missing.  Here is the error message:

Found local metadata for conway_polynomials-0.4.p0
Using cached file /home/davidp/sage-devel/git-trac-command/upstream/conway_polynomials-0.4.tar.bz2
conway_polynomials-0.4.p0
====================================================
Setting up build directory for conway_polynomials-0.4.p0
Finished set up
****************************************************
Host system:
Linux xyzzy 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/davidp/sage-devel/git-trac-command/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../src/configure --prefix=/home/davidp/sage-devel/git-trac-command/local --with-local-prefix=/home/davidp/sage-devel/git-trac-command/local --with-gmp=/home/davidp/sage-devel/git-trac-command/local --with-mpfr=/home/davidp/sage-devel/git-trac-command/local --with-mpc=/home/davidp/sage-devel/git-trac-command/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm 
Thread model: posix
gcc version 4.9.2 (GCC)
****************************************************
Traceback (most recent call last):
  File "./spkg-install", line 4, in <module>
    from sage.all import save
  File "/home/davidp/sage-devel/git-trac-command/local/lib/python2.7/site-packages/sage/all.py", line 84, in <module>
    from sage.misc.all       import *         # takes a while
  File "/home/davidp/sage-devel/git-trac-command/local/lib/python2.7/site-packages/sage/misc/all.py", line 87, in <module>
    from functional import (additive_order,
  File "/home/davidp/sage-devel/git-trac-command/local/lib/python2.7/site-packages/sage/misc/functional.py", line 26, in <module>
    import sage.interfaces.expect
  File "/home/davidp/sage-devel/git-trac-command/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 58, in <module>
    import pexpect
ImportError: No module named pexpect

real    0m0.176s
user    0m0.145s
sys    0m0.027s
************************************************************************
Error installing package conway_polynomials-0.4.p0
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
  /home/davidp/sage-devel/git-trac-command/logs/pkgs/conway_polynomials-0.4.p0.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/davidp/sage-devel/git-trac-command/local/var/tmp/sage/build/conway_polynomials-0.4.p0 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/davidp/sage-devel/git-trac-command/local/var/tmp/sage/build/conway_polynomials-0.4.p0' && '/home/davidp/sage-devel/git-trac-command/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************

Volker Braun

unread,
Jun 10, 2015, 9:55:00 AM6/10/15
to sage-...@googlegroups.com
Try to rebuild everything from scratch (make distclean && make). Will take a while...

David Perkinson

unread,
Jun 10, 2015, 10:09:11 AM6/10/15
to sage-...@googlegroups.com
I've already tried that.  I get the same error message.

Volker Braun

unread,
Jun 10, 2015, 10:17:30 AM6/10/15
to sage-...@googlegroups.com
Which version of Sage are you trying to build and whats in logs/pkgs/pexpect-2.0.p6.log? The first error is relevant, the last error is probably not.

David Perkinson

unread,
Jun 10, 2015, 10:34:01 AM6/10/15
to sage-...@googlegroups.com
Sage version 6.8.beta3, released 2015-06-04

There is no logs/pkgs/pexpect-2.0.p6.log.

Volker Braun

unread,
Jun 10, 2015, 11:09:54 AM6/10/15
to sage-...@googlegroups.com
On Wednesday, June 10, 2015 at 4:34:01 PM UTC+2, David Perkinson wrote:
There is no logs/pkgs/pexpect-2.0.p6.log.

So that explains your error. You need to check the build log to find out why; presumably some dependency failed.

Nathann Cohen

unread,
Jun 10, 2015, 11:13:20 AM6/10/15
to Sage devel
> So that explains your error. You need to check the build log to find out
> why; presumably some dependency failed.

conway_polynomial does not state a dependency on pexpect. Couldn't
this be the problem?

Nathann

Nathann Cohen

unread,
Jun 10, 2015, 11:17:07 AM6/10/15
to Sage devel, David Perkinson
David: there is in SAGE_ROOT/build/pkgs/conway_polynomials/ a file
named 'dependencies', whose first line should be:

| $(SAGERUNTIME)

Could you replace it with

$(INST)/$(PEXPECT) | $(SAGERUNTIME)

And tell us if running 'make' works better then?

Nathann

David Perkinson

unread,
Jun 10, 2015, 11:24:54 AM6/10/15
to sage-...@googlegroups.com, dav...@reed.edu
Sure, I can try that.   Should I enter:

> make distclean && make

which will take several hours, or is some variant of the following better:

> export SAGE_KEEP_BUILT_SPKGS='yes'
> make

Thanks.

Nathann Cohen

unread,
Jun 10, 2015, 11:25:59 AM6/10/15
to Sage devel, David Perkinson
Yo !

> which will take several hours, or is some variant of the following better:

The second should work. No reason to destroy what you already built I'd say.

Nathann

Nathann Cohen

unread,
Jun 10, 2015, 11:32:35 AM6/10/15
to Sage devel, David Perkinson
Hmmmm... Even if it works it is not a good fix :-/

Volker, what do you think of this scenario:
- the git-trac module has been installed before conway_polynomials
- you don't need pexpect to *install* git-trac, but you need pexpect
to load the git-trac modules
- installing conway_polynomials calls "from sage.all import save",
which loads git-trac, which breaks because pexpect is not installed

Nathann

Volker Braun

unread,
Jun 10, 2015, 11:39:23 AM6/10/15
to sage-...@googlegroups.com, dav...@reed.edu
git-trac should never be imported in Sage, and it doesn't look that way from the traceback.

SAGERUNTIME should depend on PEXPECT, directly or indirectly.

Nathann Cohen

unread,
Jun 10, 2015, 11:47:17 AM6/10/15
to Sage devel, David Perkinson
> git-trac should never be imported in Sage, and it doesn't look that way from
> the traceback.

Oh. True. It seems that /home/davidp/sage-devel/git-trac-command/ is
SAGE_ROOT.... O_o

> SAGERUNTIME should depend on PEXPECT, directly or indirectly.

Yes yes yes, that makes sense. But right now it does not hold
(probably my fault):

SAGERUNTIME = $(SCRIPTS) $(INST)/sage $(INST)/$(IPYTHON)

And pexpect only appears as a dependency of sagenb, and it has python
as a dependency. Should I add it to SAGERUNTIME directly?

Nathann

David Perkinson

unread,
Jun 10, 2015, 12:17:09 PM6/10/15
to sage-...@googlegroups.com, dav...@reed.edu
Success!

Thanks for the help.

Nathann Cohen

unread,
Jun 10, 2015, 2:05:24 PM6/10/15
to Sage devel, David Perkinson
> Success!
>
> Thanks for the help.

You can remove the modification that you made to that file, it is
useless now. You probably won't even need it next time you will update
your version of Sage (though you may need it if you run 'make
distclean' again).

And we will try to fix this soon.

Nathann

Nathann Cohen

unread,
Jun 10, 2015, 2:29:19 PM6/10/15
to Sage devel, David Perkinson
> And we will try to fix this soon.

Done at #18666 [1] (needs_review)

Nathann

[1] http://trac.sagemath.org/ticket/18666
Reply all
Reply to author
Forward
0 new messages