#11359: ECL does not fully recover from relocation
----------------------+-----------------------------------------------------
   Reporter:  nbruin  |          Owner:  GeorgSWeber   
       Type:  defect  |         Status:  new           
   Priority:  minor   |      Milestone:  sage-4.7.1    
  Component:  build   |       Keywords:  ecl relocation
Work_issues:          |       Upstream:  N/A           
   Reviewer:          |         Author:                
     Merged:          |   Dependencies:                
----------------------+-----------------------------------------------------

Comment(by nbruin):

 One problem (perhaps the only one?) is that ECL uses the C compiler for
 compiling lisp (much like cython) and gives it include paths and library
 paths that it found out upon configuration. {{{local/bin/sage-location}}}
 is obviously not updating those. Example in a relocated "sage -ecl":
 {{{
 (defun f (x y) (+ x y))
 (compile 'f) ;; fails
 (setf c::*ecl-include-directory* (concatenate 'string (SI:GETENV
 "SAGE_ROOT") "/local/include/"))
 (setf c::*ecl-library-directory* (concatenate 'string (SI:GETENV
 "SAGE_ROOT") "/local/lib/"))
 (compile 'f) ;; now it works
 }}}
 There is a slight problem that the paths also end up in other variables
 (perhaps because of the way that sage calls configure when configuring
 ECL?):
 {{{
 > c::*cc-flags*

 " -I/usr/local/sage/4.6.2-copy/local/include -D_GNU_SOURCE
 -D_FILE_OFFSET_BITS=64 -g -O2  -fPIC  -Dlinux"
 > c::*ld-flags*

 " -L/usr/local/sage/4.6.2-copy/local/lib  -lecl  -lgmp -lgc -ldl  -lm "
 }}}
 Since it is a bit unsanitary to have references to old locations lying
 around (one might link to wrong versions of libraries if the old location
 still exists!), we should probably strip those variables as well.

 Possible solutions:
  - Patch ECL so that the above code is used to initialize these variables
  - Wrap our invocation of ECL so that we always update the values of these
 variables
  - equip {{{local/bin/sage-location}}} with the logic to update the
 relevant parts of ECL. That probably means recompiling (part of) ECL,
 because these values will be stored as a string in a ".fas"-file
 somewhere, which essentially a ".so".

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11359#comment:1>
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