Since 2.32 (probably earlier), ASDF can no longer produce standalone executables in ECL.
The reason is that all those executables (stupidly in my opinion) have dependencies on libraries that should now be linked with the program. In particular, ASDF itself, UIOP, etc.
Why is this so? Why do I have to link 800 Mb of library (ASDF and all its components) with every executable instead of abstracting a simpler load process where ASDF is not there unless, of course, a dependency on it is declared?
Juanjo
Dear Juanjo,
my apologies for breaking program-op on ECL for programs that didn't explicit depends-on asdf, asdf-driver or uiop, which used to work earlier, back when asdf-bundle's program-op used to be an ECL-only feature.
This regression was introduced somewhere in the 2.26.x rewrite, and is hopefully fixed in asdf 2.33.10. Please test. This is a somewhat more elaborate version of your patch, possibly overengineered: if not for initialization functions causing the whole shebang to be pulled in, it might have been enough to insert the sys:asdf.lib at the *end* of the link.
The reason is that all those executables (stupidly in my opinion) have dependencies on libraries that should now be linked with the program. In particular, ASDF itself, UIOP, etc.
Why is this so? Why do I have to link 800 [Kb] of library (ASDF and all its components) with every executable instead of abstracting a simpler load process where ASDF is not there unless, of course, a dependency on it is declared?
While it isn't impossible to make that work, that would have made it singularly more difficult to achieve, all the more in a portable way, especially so while preserving all the image life-cycle features: *image-restore-hook* *image-prelude* *image-entry-point* *image-postlude* *image-dump-hook*
It was hell enough to implement and debug this program-op feature so it will work portably on all of eight implementations (untested on mkcl), and what more support these features. I admit that saving 800kb on a minority of programs for which that matters was never a priority.
But now that it's working, ASDF could be made to work better with respect to program-op actually requiring uiop or not: 1- hooks could be provided to explicitly enable or disable such dependendency for program-op, and let the asdf and/or the user either bypass uiop or provide a "lite" replacement. 2- more useful error messages could be provided when the configuration is unusable. 3- the detection of whether uiop or asdf is actually needed could be more clever
I am probably not going to write any such feature, as I'm stepping away from ASDF maintainership, but I (and/or my successor) will accept patches.
Thanks a lot for finding the bug before I released 3.0.0. Sometimes, procrastination works.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Comparing oneself with Galileo or Einstein is certainly good for the ego — provided one refrains from going into too much detail. — John McCarthy
On Mon, May 13, 2013 at 3:17 PM, Faré fahree@gmail.com wrote:
This regression was introduced somewhere in the 2.26.x rewrite, and is hopefully fixed in asdf 2.33.10. Please test.
Thanks for the quick response: I will test it as soon as I return to Madrid. And sorry for the rant. I appreciate your work on making this more portable. I hope someone will find some time to simplify the resulting processes.
Best,
Juanjo
On Sat, May 11, 2013 at 10:37 PM, Juan Jose Garcia-Ripoll < juanjose.garciaripoll@gmail.com> wrote:
link 800 Mb of library
Sorry, 800kb (0.8 Mb nonetheless, apart from the time it takes to bootstrap ASDF in ECL).
This fixes it in a less than satisfactory manner
diff --git a/bundle.lisp b/bundle.lisp index 1dfada1..0c2f054 100644 --- a/bundle.lisp +++ b/bundle.lisp @@ -440,6 +440,10 @@ (output (output-files o c)) (bundle (first output)) (kind (bundle-type o))) + (when (typep o 'program-op) + (setf object-files + (list* (c::compile-file-pathname "sys:asdf" :type :lib) + object-files))) (when output (create-image bundle (append object-files (bundle-op-lisp-files o))
On Sat, May 11, 2013 at 10:56 PM, Juan Jose Garcia-Ripoll < juanjose.garciaripoll@gmail.com> wrote:
On Sat, May 11, 2013 at 10:37 PM, Juan Jose Garcia-Ripoll < juanjose.garciaripoll@gmail.com> wrote:
link 800 Mb of library
Sorry, 800kb (0.8 Mb nonetheless, apart from the time it takes to bootstrap ASDF in ECL).
-- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com