To sum up my findings, ASDF:MAKE-BUILD seems to dislike ASD systems which
don't specify their total system dependencies, resulting in a link failure.
This problem apparently stems from faulty scheme of composition of ar archives
employed by ECL, namely assumption that hierarchically composed ar archives
readily yield the non-root archive contents for final link-time observation.
Let me illustrate the point, by the use of two ASD systems, A and B:
- A is standalone,
- B depends on A.
What ECL appears to do, when you call (C:MAKE-BUILD :B :TYPE :STATIC-LIBRARY):
1. compile A/*.o, ECLINIT..a.o
2. link all that into liba.a
3. compile B/*.o, ECLINIT..b.o
4. link B/*.o, ECLINIT..b.o, liba.a into libb.a
Then, when you try to link that into a final executable, it fails to find
init_lib_A, because the linker is unable to peek recursively into
It is also illustrative to observe that requesting :SHARED-LIBRARY type
works with this example, because .A -> .SO composition isn't simple ar
shrink-wrapping, but rather partial linking.
Of course this still fails when the implicit dependency hierarchy depth is more
than two, because then ECL still folds the leaf dependencies into .a files,
thereby obscuring them as described above.
The problem can be side-stepped, with obvious downsides, by specifying
the complete sum of dependencies in the root system's :DEPENDS-ON _and_
employing the :SHARED-LIBRARY trick, so that all the contents of .a archives
is accessible at link time.
This doesn't cover all of the issues I've encountered on the journey towards
the holy grail of having complete ASDF system composition, but the rest
is for later time.
regards, Samium Gromoff
From: Juan Jose Garcia-Ripoll <jjgarcia@us...> - 2008-03-25 22:05:16
On Tue, Mar 25, 2008 at 11:52 AM, Samium Gromoff
> This problem apparently stems from faulty scheme of composition of ar archives
> employed by ECL,
There is no such assumption. You are not supposed to provide other
libraries as arguments to C:BUILD for making a static library.
ASDF:MAKE-BUILD is currently designed for FASL files, and perhaps
shared libraries, but not static libraries.
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)