[Ecls-list] LOAD-TIME-VALUE and literal object externalisation.

Samium Gromoff _deepfire at feelingofgreen.ru
Tue Apr 22 17:58:34 UTC 2008

At Tue, 22 Apr 2008 15:47:58 +0200,
Juan Jose Garcia-Ripoll wrote:
> Hi,
> bytecode compiled functions were not externalizable. Not because it is
> impossible: the compiler simply ignored they could be printed
> readably. I have fixed this in CVS

It seems I've discovered yet another angle which makes it fail:


(defparameter bar (make-hash-table))

(setf (gethash :foo bar) (lambda ()))


(funcall (load-time-value (gethash :foo bar)))

ecl -eval '(load (compile-file "foo.lisp"))' -eval '(compile-file "foo1.lisp")

;;; Loading #P"/usr/lib/ecl/cmp.fas"
;;; Loading #P"/usr/lib/ecl/sysfun.lsp"
;;; Compiling foo.lisp.
;;; Compiling (DEFPARAMETER BAR ...).
;;; End of Pass 1.
;;; Emitting code for #:G125.
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC  -fstrict-aliasing -Dlinux -O "-I/usr/include/" -w -c "/mnt/ext/home/deepfire/local/foo.c" -o "/mnt/ext/home/deepfire/local/foo.o"
;;; Note: Invoking external command:
;;; gcc -o "/mnt/ext/home/deepfire/local/foo.fas" -L"/usr/lib/" "/mnt/ext/home/deepfire/local/foo.o"  -shared    -lecl -ldl  -lm   -lgmp
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;; Finished compiling foo.lisp.
;;; Loading "/mnt/ext/home/deepfire/local/foo.fas"
;;; Compiling foo1.lisp.An error occurred during initialization:
Cannot externalize object #<compiled-function 08159918>.

regards, Samium Gromoff

More information about the ecl-devel mailing list