On Sat, May 21, 2011 at 12:49 AM, Nils Bruin <span dir="ltr"><<a href="mailto:nbruin@cecm.sfu.ca" target="_blank">nbruin@cecm.sfu.ca</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The following problem arises with ECL as packaged within Sage. Sage comes<br>
with essentially its own $SAGE_ROOT/usr/local/ tree and tries to ensure<br>
that the whole install directory of sage can be moved and that sage still<br>
runs OK in the new location.<br></blockquote><div><br>ECL admits two installation modes: one with a Unix directory and one with a flattened directory, not something in between.<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
1. Is there already an option to set something in the run-time<br>
environment so that "vanilla" ecl picks up updated values for these paths?</blockquote><div><br>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.<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
2. The variables cc::*cc-flags* and cc::*ld-flags* seem to be picking up<br>
an "-I..." and an "-L..." themselves in Sage's configuration. Is that<br>
normal (i.e., does that always happen)? Is it intentional?<br></blockquote><div><br>This happens only when you configure ECL passing it some CFLAGS or LDFLAGS arguments, such as ./configure CFLAGS=-I/usr/include , etc, etc.<br>
<br>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.<br><br>However, your problem is that this information is not real, because it is going to change any other time ECL runs again.<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
3. What would be the right spot to patch ECL so that the default values<br>
for these paths are constructed at runtime?<br></blockquote></div><br>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<br>
<br>--with-extra-files="file1 file2 ..." ; list of files to be added to the core<br>--with-init-form="a-lisp-form" ; something to execute at boot time<br><br>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,<br>
<br>(in-package "SI")<br>(defun sage-boot ()<br> (defparameter *ecl-include-directory* ...)<br> (si::top-level t))<br><br>Then configure ECL to use that file with<br><br>--with-extra-files="/path/to/sage.lsp" --with-init-form='(si::sage-boot)'<br>
<br>Hope this helps.<br><br>Juanjo<br clear="all"><br>
-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>