#11678: sage-4.7 gives error on relocating the root directory
--------------------------+-------------------------------------------------
   Reporter:  ppurka      |          Owner:  tdb       
       Type:  defect      |         Status:  new       
   Priority:  minor       |      Milestone:  sage-4.7.2
  Component:  relocation  |       Keywords:            
Work_issues:              |       Upstream:  N/A       
   Reviewer:              |         Author:            
     Merged:              |   Dependencies:            
--------------------------+-------------------------------------------------
 I installed sage-4.7 in a directory as '''~/tmp/Downloadz/sage/sage-4.7'''
 and I could run sage by doing '''cd ~/tmp/Downloadz/sage/sage-4.7; ./sage
 -n'''

 A day ago, I decided to move the directory into a more permanent location
 (from ~/tmp :)) and moved the whole folder by '''mv
 ~/tmp/Downloadz/sage/sage-4.7 ~/Installations/.'''. Now, on trying to run
 sage, I get the following errors:

 First, for the notebook:
 {{{
 ~/Installations/sage-4.7> ./sage -n
 ----------------------------------------------------------------------
 | Sage Version 4.7, Release Date: 2011-05-23                         |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------

 Please wait while the Sage Notebook server starts...
 Traceback (most recent call last):
   File "/home/ppurka/Installations/sage-4.7/local/bin/sage-notebook", line
 9, in <module>
     from sage.server.notebook.all import notebook
   File "/home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/server/notebook/all.py", line 22, in <module>
     from sagenb.notebook.all import *
 ImportError: No module named sagenb.notebook.all
 }}}

 For sage itself:
 {{{
 ...allations/sage-4.7 [130] > ./sage
 ----------------------------------------------------------------------
 | Sage Version 4.7, Release Date: 2011-05-23                         |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 ---------------------------------------------------------------------------
 ImportError                               Traceback (most recent call
 last)

 /home/ppurka/Installations/sage-4.7/local/bin/<string> in <module>()

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/preparser_ipython.py in <module>()
       6
 ###########################################################################

       7
 ----> 8 import sage.misc.interpreter
       9
      10 import preparser

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/interpreter.py in <module>()
     100
     101 import os
 --> 102 import log
     103 import re
     104

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/log.py in <module>()
      63
      64 import interpreter
 ---> 65 import latex
      66 import misc
      67

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/latex.py in <module>()
      39 import subprocess
      40
 ---> 41 from misc import tmp_dir, graphics_filename
      42 import sage_eval
      43 from sage.misc.misc import SAGE_DOC

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/misc.py in <module>()
    2104     return "0"*(size-len(str(s))) + str(s)
    2105
 -> 2106 import sage.server.support
    2107
    2108 def embedded():

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/server/support.py in <module>()
      17 import sage.misc.pager
      18
 ---> 19 import sage.misc.sagedoc as sagedoc
      20 import sage.misc.sageinspect as sageinspect
      21

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/sagedoc.py in <module>()
      26 from sage.misc.viewer import browser
      27 from sage.misc.misc import SAGE_DOC, tmp_dir
 ---> 28 from sagenb.misc.sphinxify import sphinxify
      29 import sage.version
      30

 ImportError: No module named sagenb.misc.sphinxify
 WARNING: Failure executing code: 'import sage.misc.preparser_ipython;
 sage.misc.preparser_ipython.magma_colon_equals=True'
 ---------------------------------------------------------------------------
 ImportError                               Traceback (most recent call
 last)

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/IPython/ipmaker.pyc in force_import(modname)
      64         reload(sys.modules[modname])
      65     else:
 ---> 66         __import__(modname)
      67
      68

 /home/ppurka/Installations/sage-4.7/local/bin/ipy_profile_sage.py in
 <module>()
       1 import os
       2 if 'SAGE_CLEAN' not in os.environ:
 ----> 3     import sage.misc.misc
       4     from sage.misc.interpreter import preparser, _ip
       5     preparser(True)

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/misc.py in <module>()
    2104     return "0"*(size-len(str(s))) + str(s)
    2105
 -> 2106 import sage.server.support
    2107
    2108 def embedded():

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/server/support.py in <module>()
      17 import sage.misc.pager
      18
 ---> 19 import sage.misc.sagedoc as sagedoc
      20 import sage.misc.sageinspect as sageinspect
      21

 /home/ppurka/Installations/sage-4.7/local/lib/python2.6/site-
 packages/sage/misc/sagedoc.py in <module>()
      26 from sage.misc.viewer import browser
      27 from sage.misc.misc import SAGE_DOC, tmp_dir
 ---> 28 from sagenb.misc.sphinxify import sphinxify
      29 import sage.version
      30

 ImportError: No module named sagenb.misc.sphinxify
 Error importing ipy_profile_sage - perhaps you should run %upgrade?
 WARNING: Loading of ipy_profile_sage failed.

 <ERROR: name 'sage_prompt' is not defined>
 }}}

 grep-ing the sources leads to tons of files which have the earlier path
 hardcoded into the source files. Just a sample:
 {{{
 ~/Installations/sage-4.7> grep -r Downloadz *
 <showing only some output here>
 Binary file devel/sage/sage/__init__.pyc matches
 Binary file devel/sage/sage/misc/package.pyc matches
 Binary file devel/sage/sage/misc/lazy_import_cache.pyc matches
 Binary file devel/sage/sage/misc/__init__.pyc matches
 Binary file local/lib/python2.6/site-
 packages/speaklater-1.2-py2.6.egg/speaklater.pyc matches
 }}}

 All the errors were fixed as soon as I made a symbolic link as follows:
 {{{
 ln -s ~/Installations/sage-4.7 ~/tmp/Downloadz/sage/.
 }}}

 Since the file '''~/Installations/sage-4.7/README.txt''' claims that sage
 should be relocatable, I believe this is a relocation bug in sage.

 If it matters, my system is a Gentoo Linux amd64 system. I do have a
 sage-4.7 installation in / installed via the sage-on-gentoo overlay. This
 installation (the one in ~/Installations) was compiled "manually" by
 downloading the sage tarball from the website. It was originally compiled
 inside the ~/tmp/Downloadz/sage directory.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11678>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to