#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):

 The following two fixes resolve the issues

 == Cleaning paths from *..-flags* variables ==

 In {{{<ECL-PACKAGE>/spkg-install}}} replace the lines
 {{{
 CPPFLAGS="$CPPFLAGS -I$SAGE_LOCAL/include"
 LDFLAGS="$LDFLAGS -L$SAGE_LOCAL/lib"
 }}}
 by
 {{{
 C_INCLUDE_PATH="$SAGE_LOCAL/include"
 export C_INCLUDE_PATH
 }}}
 (web documentation indicates that Sun Studio and IBM compilers also
 support this variable, so although it's not POSIX (neither is CPPFLAGS),
 it doesn't seem to be GNU exclusive.)

 == Making initialization of *ecl-...-directory* variables runtime ==

 Patch {{{<ECL-PACKAGE>/src/src/cmp/cmpdefs.lsp}}} such that the lines
 {{{
 (defvar *ecl-include-directory* @includedir\@)
 (defvar *ecl-library-directory* @libdir\@)
 }}}
 are replaced by
 {{{
 ;;; The following code sets the default values of the include and library
 directories used for
 ;;; invocation of the C-compiler during compilation to values relative to
 ECL's idea
 ;;; of the current "system" directory. The logical pathname "SYS:"
 normally points to
 ;;; ".../local/lib/ecl", where "..." would normally be "/usr" (if ECL is
 installed in
 ;;; "/usr/local"). So, we strip off the last 2 components of "SYS:" and
 append "include" or
 ;;; "lib". This results in the values
 ;;;   ".../local/lib/"  and  ".../local/include/"  in the above example.
 ;;; Since this substitution happens at runtime, these values get adjusted
 appropriately if
 ;;; the ".../local" tree gets relocated.
 (defvar *ecl-include-directory* (namestring (make-pathname :directory
 (append (butlast (pathname-directory (translate-logical-pathname "SYS:"))
 2) '("include")))))
 (defvar *ecl-library-directory* (namestring (make-pathname :directory
 (append (butlast (pathname-directory (translate-logical-pathname "SYS:"))
 2) '("lib")))))
 }}}

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