[Ecls-list] defstruct/init problem

Hannu Koivisto azure at iki.fi
Wed Feb 13 02:30:07 UTC 2002


I introduced alien.lsp to the src/lsp directory.  I also added it
to the system definition so that it gets compiled right after
ffi.lsp.  Everything worked just fine until I added a (defstruct
...) form (I tried very simple ones such as (defstruct foo bar) in
addition to my real, more complex form and that made no difference)
to that file.  After this change the built ecl binary cannot
initialize itself.  It seems that ecl expands my defstruct to
something that contains ensure-class, which is thus needed in
init_LSP_ALIEN in alien.h:

(gdb) run
[New Thread 1024 (LWP 23732)]
[Switching to Thread 1024 (LWP 23732)]

Breakpoint 6, FEundefined_function (fname=0x8238f40)
    at /home/azure/projects/software/ecls/src/c/error.d:186
186             FEcondition(3, @'undefined-function', @':name', fname);
(gdb) up
#1  0x0806a867 in symbol_function (sym=0x8238f40)
    at /home/azure/projects/software/ecls/src/c/reference.d:55
55                      FEundefined_function(sym);
(gdb) up
#2  0x0810d28a in init_LSP_ALIEN (flag=0x1)
    at /home/azure/projects/software/ecls/build/lsp/alien.h:48
48              (void)funcall(8,symbol_function(VV[15]),VV[1],
                              Cnil,Cnil)/*  ENSURE-CLASS*/;

Unfortunately ensure-class is part of CLOS and CLOS is not yet
initialized at that point; thus the undefined-function error.

What puzzles me is that for example loop2.lsp uses defstruct but no
call to ensure-class is generated into init_LSP_LOOP2.

Any ideas?

Please don't send copies of list mail

More information about the ecl-devel mailing list