[Ecls-list] Soft Links, and si::top-level
timothy
tschaef at sbcglobal.net
Fri Jun 16 02:53:15 UTC 2006
Hello,
I have two questions:
First,
does ecl follow symlinks? When trying to load an .asd file in asdf, it
tells me it cannot load the file:
> (asdf:oos 'asdf:load-op :iterate)
Filesystem error with pathname
#P"/usr/share/common-lisp/systems/iterate.asd".
Either
1) the file does not exist, or
2) we are not allow to access the file, or
3) the pathname points to a broken symbolic link.
Broken at LAMBDA.
>> :b
Backtrace: LAMBDA > asdf:operate > asdf:oos > eval
>>:q
> (asdf:oos 'asdf:load-op :rfc2109)
Filesystem error with pathname
#P"/home/timothy/.asdf-systems/rfc2109.asd".
Either
1) the file does not exist, or
2) we are not allow to access the file, or
3) the pathname points to a broken symbolic link.
Broken at LAMBDA.
/usr/share/common-lisp/systems/iterate.asd
-> ../source/iterate/iterate.asd
/home/timothy/.asdf-systems/rfc2109.asd -> ../code/rfc2109/rfc2109.asd
These are valid links which I can load successfully in cmucl. I copied
the iterate directory from the system directory to a local directory in
my home, pushed it onto asdf:*central-registry*, and eval'd (asdf:oos
'asdf:load-op :iterate), iterate loaded correctly and began compiling
(which barfed on the use of a #\nul; the iterate code says #\Null is
invalid, but I can find no justification for this statement: both are
extra-standard). Am I missing something?
Second,
I am linking ecl to a simple c file, and would like to call the lisp top
level. However, calling SI::TOP-LEVEL in the code leads to an error. A
gdb session shows that it is generating an unfound symbol error, that it
cannot find SI::TOP-LEVEL. Here is my main code:
int
main(int argc, char **args)
{
cl_object top_level;
/* Initialize Allegro gaming library */
if (allegro_init() != 0) {
fprintf(stderr, "allegro_init() failed.\n");
return 1;
}
/* This should be always the first call */
cl_boot(argc, args);
si_select_package((cl_object)make_simple_string("CL-USER"));
const char * lisp_code = "(SI::TOP-LEVEL)";
cl_object output;
output =
cl_safe_eval(c_string_to_object(lisp_code), Cnil, OBJNULL);
return(0);
}
END_OF_MAIN();
The END_OF_MAIN() gives a clue to why I can't just put this in a lisp
file; main is really somewhere else; the above main() is not the real
main. If I load the ecl program, (fboundp 'SI:TOP-LEVEL) --> t. Do I
need something else? Does this have something to do with all that
Cblock stuff in the C files generated by build-program?
Thanks; I'm looking forward to doing some graphics programming with
Allegro (the gaming library) and ecl.
Tim S.
More information about the ecl-devel
mailing list