On Sat, May 21, 2011 at 12:49 AM, Nils Bruin <nbruin@...> wrote:
> The following problem arises with ECL as packaged within Sage. Sage comes
> with essentially its own $SAGE_ROOT/usr/local/ tree and tries to ensure
> that the whole install directory of sage can be moved and that sage still
> runs OK in the new location.
ECL admits two installation modes: one with a Unix directory and one with a
flattened directory, not something in between.
1. Is there already an option to set something in the run-time
> environment so that "vanilla" ecl picks up updated values for these paths?
The way ECL detects it lives in a flattened directory installation is
because the include and library directories live inside ECL's
/usr/lib/ecl-nn.nn.nn directory. So if you configure ECL using
includedir=/usr/local/lib/ecl-11.1.1/ and libdir=/usr/local/lib/ecl-11.1.1
then you will be safe.
> 2. The variables cc::*cc-flags* and cc::*ld-flags* seem to be picking up
> an "-I..." and an "-L..." themselves in Sage's configuration. Is that
> normal (i.e., does that always happen)? Is it intentional?
This happens only when you configure ECL passing it some CFLAGS or LDFLAGS
arguments, such as ./configure CFLAGS=-I/usr/include , etc, etc.
Of course it is intentional, because ECL is assuming that the user is
providing it with the correct information about where to find the GMP
library, or the GC library or the C library.
However, your problem is that this information is not real, because it is
going to change any other time ECL runs again.
> 3. What would be the right spot to patch ECL so that the default values
> for these paths are constructed at runtime?
I would discourage you against patching ECL, because of the maintainance
problems it involves. If you want to change these values, then use the
following two configuration arguments that are available in CVS/git
--with-extra-files="file1 file2 ..." ; list of files to be added to the core
--with-init-form="a-lisp-form" ; something to execute at boot time
With this, you with add all your SAGE customizations to some file, sage.lsp,
place it wherever, and then add a function to it that first customizes ECL
and finally invokes the toplevel. For instance,
(defun sage-boot ()
(defparameter *ecl-include-directory* ...)
Then configure ECL to use that file with
Hope this helps.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)