Opened 12 years ago
Closed 12 years ago
#11419 closed defect (fixed)
relocation not working for sage-4.7.1.alpha1
Reported by: | mariah | Owned by: | tdb |
---|---|---|---|
Priority: | blocker | Milestone: | sage-4.7.1 |
Component: | relocation | Keywords: | |
Cc: | Merged in: | sage-4.7.1.alpha4 | |
Authors: | Nils Bruin | Reviewers: | Mariah Lenox |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
eno% cd sage-4.7.1.alpha1-x86_64-Linux-core2-fc eno% ./sage ---------------------------------------------------------------------- | Sage Version 4.7.1.alpha1, Release Date: 2011-05-30 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- ********************************************************************** * * * Warning: this is a prerelease version, and it may be unstable. * * * ********************************************************************** sage: L.<w> = Qp(7).extension(x^2 - 7) sage: quit; Exiting Sage (CPU time 0m1.18s, Wall time 0m20.03s). eno% cd .. eno% mv sage-4.7.1.alpha1-x86_64-Linux-core2-fc sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved eno% cd sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved eno% ./sage ---------------------------------------------------------------------- | Sage Version 4.7.1.alpha1, Release Date: 2011-05-30 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- ********************************************************************** * * * Warning: this is a prerelease version, and it may be unstable. * * * ********************************************************************** The Sage install tree may have moved (from /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc to /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved) Changing various hardcoded paths (please wait at most a few minutes)... Do not interrupt this. Done resetting paths sage: L.<w> = Qp(7).extension(x^2 - 7) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (1178, 0)) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/<ipython console> in <module>() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/rings/padics/padic_generic.pyc in extension(self, modulus, prec, names, print_mode, halt, **kwds) 463 else: 464 print_mode[option] = self._printer.dict()[option] --> 465 return ExtensionFactory(base=self, premodulus=modulus, prec=prec, halt=halt, names=names, check = True, **print_mode) 466 467 def local_print_mode(obj, print_options, pos = None, ram_name = None): /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/structure/factory.so in sage.structure.factory.UniqueFactory.__call__ (sage/structure/factory.c:886)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/rings/padics/factory.pyc in create_key_and_extra_args(self, base, premodulus, prec, print_mode, halt, names, var_name, res_name, unram_name, ram_name, print_pos, print_sep, print_alphabet, print_max_ram_terms, print_max_unram_terms, print_max_terse_terms, check, unram) 2206 if is_Expression(premodulus): 2207 # Here we assume that the output of coeffs is sorted in increasing order by exponent: -> 2208 coeffs = premodulus.coeffs() 2209 preseed = premodulus / coeffs[-1][0] 2210 preseed -= preseed.variables()[0]**coeffs[-1][1] /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression.coefficients (sage/symbolic/expression.cpp:18648)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression._maxima_ (sage/symbolic/expression.cpp:3674)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/structure/sage_object.so in sage.structure.sage_object.SageObject._interface_ (sage/structure/sage_object.c:3451)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/misc/lazy_import.so in sage.misc.lazy_import.LazyImport.__getattr__ (sage/misc/lazy_import.c:1353)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/misc/lazy_import.so in sage.misc.lazy_import.LazyImport._get_object (sage/misc/lazy_import.c:1023)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/interfaces/maxima_lib.py in <module>() 150 init_code.append('nolabels : true') 151 for l in init_code: --> 152 ecl_eval("#$%s$"%l) 153 ## To get more debug information uncomment the next line 154 ## should allow to do this through a method /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_eval (sage/libs/ecl.c:6301)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_eval (sage/libs/ecl.c:6252)() /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-moved/local/lib/python2.6/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_safe_eval (sage/libs/ecl.c:2544)() RuntimeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined. sage:
Apply to sage_scripts:
Attachments (2)
Change History (15)
comment:1 Changed 12 years ago by
comment:3 Changed 12 years ago by
I think this is due to the instruction load(to_poly_solver)
that is in init_code
in sage/interfaces/maxima_lib.py
.
The problem arises earlier in the initialization of maxima. The following is an excerpt of the instructions sent to ecl upon maxima_lib initialization, pasted into the ecl REPL:
sage/4.7.1-moved$ ./sage -ecl ECL (Embeddable Common-Lisp) 11.1.1 Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya Copyright (C) 1993 Giuseppe Attardi Copyright (C) 2000 Juan J. Garcia-Ripoll ECL is free software, and you are welcome to redistribute it under certain conditions; see file 'Copyright' for details. Type :h for Help. Top level. > (require 'maxima) ;;; Loading #P"/usr/local/sage/4.7.1-moved/local/lib/ecl/maxima.fas" ;;; Loading #P"/usr/local/sage/4.7.1-moved/local/lib/ecl/sb-bsd-sockets.fas" ;;; Loading #P"/usr/local/sage/4.7.1-moved/local/lib/ecl/sockets.fas" ("SB-BSD-SOCKETS" "SOCKETS" "MAXIMA") > (in-package :maxima) #<"MAXIMA" package> MAXIMA> (set-locale-subdir) NIL MAXIMA> (set-pathnames) "/usr/local/sage/4.7.1/local/share/info/./maxima-index.lisp" MAXIMA>
That's a hardcoded path! Luckily there is an override. If you do a
export MAXIMA_PREFIX = $SAGE_ROOT/local
before starting sage, the problem goes away. So this should go somewhere in the start-up of sage.
Changed 12 years ago by
Attachment: | trac_11419_set_MAXIMA_PREFIX.patch added |
---|
to be applied in local/bin to let sage-env set MAXIMA_PREFIX
comment:5 Changed 12 years ago by
Authors: | → Nils Bruin |
---|---|
Description: | modified (diff) |
Status: | new → needs_review |
comment:6 Changed 12 years ago by
I will check the patch a bit later but I think it will apply cleanly to sage_scripts in this format.
Changed 12 years ago by
Attachment: | trac_11419_set_MAXIMA_PREFIX-p2.patch added |
---|
set maxima prefix in sage-env
comment:7 Changed 12 years ago by
Description: | modified (diff) |
---|
The original patch didn't initially import cleanly in sage_scripts. So I regenerated it in, the new version is in git format as well.
Mariah can you test it?
comment:8 follow-up: 9 Changed 12 years ago by
This seems to fix the problem as far as I can tell, but would it be better to check whether MAXIMA_PREFIX
is set first? Something like this:
if [ -z "$MAXIMA_PREFIX" ]; then MAXIMA_PREFIX="$SAGE_ROOT/local" && export MAXIMA_PREFIX fi
Is it possible that people will be (successfully) using their own installation of maxima?
We could also use "$SAGE_LOCAL"
instead of "$SAGE_ROOT/local"
; I'm not sure whether stylistically we should have any preference.
comment:9 Changed 12 years ago by
Replying to jhpalmieri:
Is it possible that people will be (successfully) using their own installation of maxima?
I considered that, but with the maxima.fas on libecl.so setup loaded inside sage's main process, people do not have the choice which installation of sage they run. Allowing sage's maxima work with a maxima library from a different install is risky at best (I don't know what exactly maxima gets from there at runtime) That's why I unconditionally set the variable.
If people want to run their own maxima via a pexpect interface, they can do so by setting the environment variable in a script wrapping the executable.
comment:10 Changed 12 years ago by
I was going to make a detailed answer with the same kind of things. Unless you are running Gentoo or possibly Mandriva you won't have the maxima.fas bits.
And for the pexpect interface, you better have a maxima built with ecl and know how to make sure you get the ecl maxima if you have maxima installed with several lisps.
As for SAGE_LOCAL on principle I would use it instead of $SAGE_ROOT/local but admittely I don't care so much in sage-env. In module_list.py it drives me insane on the other hand.
comment:11 follow-up: 12 Changed 12 years ago by
Reviewers: | → Mariah Lenox |
---|---|
Status: | needs_review → positive_review |
I applied the patch to sage-4.7.1.alpha2 using hg_scripts.apply()
, did 'sage -b', then 'make testlong'. All tests passed. I then moved the sage directory and again did 'make testlong'. Again all tests passed. I also check that the patch fixed the reported problem.
Wanting to check this from a source build, I hand-edited 'sage-env' in spgk/base and in spkg/standard/sage_scripts-4.7.1.alpha2.spkg, then did 'make testlong' which built sage and ran the long tests. All tests passed. I then moved the sage directory and again did 'make testlong'. Again all tests passed.
Positive review!
(If a kind person would explain to me how to apply such script patches so that I can get just a modified source tree - other than doing it by hand - I would appreciate it.)
comment:12 Changed 12 years ago by
Replying to mariah:
(If a kind person would explain to me how to apply such script patches so that I can get just a modified source tree - other than doing it by hand - I would appreciate it.)
Answering my own question: 'sage -sdist'
comment:13 Changed 12 years ago by
Merged in: | → sage-4.7.1.alpha4 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
The problem occurs in sage-4.7.1.alpha0. So some change between sage-4.7 and sage-4.7.alpha0 is causing this problem.