On 03/28/2012 05:59 PM, Sam Steingold wrote:
>> * Michael Kappert<zvpunry.xnccreg@...> [2012-03-28 00:12:21 +0200]:
>>> I think it is best to use dynamic modules and put (require
>>> "requirement") in the lisp file.
>> Ok - unfortunately simply require-ing the module did not work because
>> clisp-link first compiles all requested modules and only then creates
>> the dynmod directory and shared libs.
> so what's wrong with (eval-when (:compile-toplevel) (require...)) ?
Sorry if I was unclear. I didn't call clisp-link directly but tried
configure --with-module=gir --with-module=gtk+3 --cbc build.gtk+3
Iow. I didn't look at clisp-link at all but copied&modified files from
the modules included with CLISP.
Nothing is wrong with the above REQUIRE form itself, but with the way
clisp-link is used in the overall Makefile (in the 'full' target): It
first tries to compile all requested modules before creating dynmod
entries. The above REQUIRE form above is executed when compiling module
gtk+3, but the gir module load file (dynmod/gir.lisp) is not yet
available at this point.
I was able to compile the modules one after the other with
configure --with-module=gir --cbc build.gtk+3
make MODULES='gir gtk+3'
Strangely, omitting module gir from the initial build does not work -
probably the same effect as above.
Btw, module gir does not use a C component (anymore), which means that a
current CLISP (newer than 2010-09-14) is needed to build it.
Apart from that, I do have some things working already.
If anyone wants to take a look or try it, I've uploaded the modules here:
(examples included) but beware that it's still under development.
Any kind of feedback is welcome of course.
>> I guess I need to understand clisp-link and link.sh better...
> this will help, yes :-)
> please help with the docs too.
I have the following remarks:
- The example at http://www.clisp.org/impnotes.html#mod-set-example
has the argument to clisp-link in the wrong order:
4. $ -link add linux base base+linux
4. $ -link add base base+linux linux
- clisp-link handles absolute directories incorrectly:
./clisp-link add base base+gir /modules/configured/gir
(ext:appease-cerrors ; for DEF-CALL-OUT to non-existent functions
=> note the "../" is wrong here.
- clisp-link add <source> <target> <module>
exits with error if <target> exists. It would be nice if at least
clisp-link add <target> <target> <module> was allowed.