[Ecls-list] xcvb support for ecl
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Fri Apr 8 20:06:12 UTC 2011
On Thu, Apr 7, 2011 at 10:03 PM, Faré <fahree at gmail.com> wrote:
> Could Juanjo or another hacker work with me
> and/or Peter over skype and/or IRC to get the damn thing working?
I am having a hell of a month right now. Would it be ok if I just answer by
email? Asynchronous processing of information is more convenient when one
does not have very precise schedules.
> If I understand correctly,
> * I want to compile everything I will later link into a .o with
> (compile-file lsp-file :system-p t :output o-file)
> * If I want to load, I first have to convert to a fasl with
> (c::build-fasl fas-file :lisp-files (list o-file))
> * If I want to link files together, I call (c::builder ...) and there
> I'm not sure exactly what to do or not to do
Depends. Do you want to join all files into a unique FASL?
(c::build-fasl fasl-file :lisp-files (list o-file1 o-file2 ... o-fileN))
Does it have to be a program instead? Then change -fasl with -program.
> Things I don't understand:
> * When to or not to produce and/or use a static or dynamic library, in
> the context of an overall Lisp application [IIUC, make systems into a
> .a for easier linking, otherwise load individual files as .so]
In ASDF-ECL I build a static library for each large component, such as
cl-ppcre, alexandria, etc. The reasons for this are based on linker
limitations: C:BUILD-FASL can not take an arbitrary number of object files,
because the command line argument for "ld" is limited to a given size.
Instead ASDF-ECL prceeds as follwows
- Compile all object files in the order mandated by ASDF.
- Whenever a file has to be loaded, use build-fasl on it and load it.
- At any point a library is fully compiled, join all object files into a *.a
library using C::BUILD-STATIC-LIBRARY (same syntax as BUILD-FASL).
- For convenience, that static library can be converted into a large FASL
file using (C::BUILD-FASL joined-fasl-file-name :lisp-files (list
- Finally, all libraries are linked together into a single program using
(C::BUILD-PROGRAM output-program :lisp-files (list library-1 library-2 ...
> * How to make sure the initialization functions of objects and
> libraries are called [IIUC, nothing required]
No requirement to do that. ECL's object files execute all statements
sequentially in the order in which they were declared in the source file.
> * What to put or not to put in the prologue and epilogue. [IIUC, only
> prologue required, when building a .exe, and that can be standardized
> into setting a few variables and jumping to a main lisp function]
You probably do not have to add anything.
> * If using .a libraries, do I coalesce previous libraries in a bigger
> one, or get a chain of libraries that require each other? [IIUC, a
When linking multiple *.a libraries using BUILD-PROGRAM or BUILD-FASL to get
a larger entity, they simply have to be specified in the order in which they
would have been loaded by the lisp image.
> * Same question when using .so files. [IIUC, it depends and it's
Same as above.
> * In a chain of .so libraries that require each other, what is the
> proper way to load them, and how do I control the load path?
List them in the appropriate order. This is what my use of ASDF:TRAVERSE is
for in ASDF-ECL.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ecl-devel