|
From: Michael K. <mic...@gm...> - 2012-03-23 22:54:32
|
Hi,
I'm using hand-written bindings (for libgirepository) to generate
GTK+-3.x bindings. I can put everything in one module but I'd like to
have the libgirepository bindings in a separate module.
Is there a way to make clisp load the prerequisite, or use the 'full'
linking set when building the dependent module?
I tried (in link.sh.in)
${MAKE-make} clisp-module \
CC="${CC}" CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" \
CLISP_LINKKIT="$absolute_linkkitdir" CLISP="${CLISP} -K full"
and then try to build the module with
$ make MODULES=gtk+3
but I still see
make[1]: Entering directory `<clisp>/build.gir/gtk+3'
<clisp>/clisp -K boot ...
Michael
--
|
|
From: Sam S. <sd...@gn...> - 2012-03-25 03:49:53
|
Hi,
> * Michael Kappert <zvp...@tz...> [2012-03-23 23:54:25 +0100]:
>
> Is there a way to make clisp load the prerequisite, or use the 'full'
> linking set when building the dependent module?
I think it is best to use dynamic modules and put (require
"requirement") in the lisp file.
> I tried (in link.sh.in)
> ${MAKE-make} clisp-module \
> CC="${CC}" CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" \
> CLISP_LINKKIT="$absolute_linkkitdir" CLISP="${CLISP} -K full"
>
> and then try to build the module with
> $ make MODULES=gtk+3
>
> but I still see
> make[1]: Entering directory `<clisp>/build.gir/gtk+3'
> <clisp>/clisp -K boot ...
this is weird. new-clx requires syscalls and the build works fine.
please take a look at how it is done.
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://truepeace.org http://openvotingconsortium.org
http://ffii.org http://jihadwatch.org http://thereligionofpeace.com
The plural of "anecdote" is not "data".
|
|
From: Michael K. <mic...@gm...> - 2012-03-27 22:12:30
|
On 03/25/2012 05:49 AM, Sam Steingold wrote:
>> * Michael Kappert<zvp...@tz...> [2012-03-23 23:54:25 +0100]:
>>
>> Is there a way to make clisp load the prerequisite, or use the 'full'
>> linking set when building the dependent module?
>
> 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.
I guess I need to understand clisp-link and link.sh better...
>> I tried (in link.sh.in)
>> ${MAKE-make} clisp-module \
>> CC="${CC}" CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" \
>> CLISP_LINKKIT="$absolute_linkkitdir" CLISP="${CLISP} -K full"
>>
>> and then try to build the module with
>> $ make MODULES=gtk+3
btw, this was wrong, it does not add modules to dynmod/ but replaces
them with the newly requested...
>> but I still see
>> make[1]: Entering directory `<clisp>/build.gir/gtk+3'
>> <clisp>/clisp -K boot ...
>
> this is weird. new-clx requires syscalls and the build works fine.
> please take a look at how it is done.
The new-clx lisp files are compiled with -K boot. It seems new-clx does
not call syscalls functions at compile time. (The "gtk+3" module queries
GTK+ Typelibs[1] at compile time, via a macro that produces a huge progn
containing FFI forms.).
Thanks,
Michael
[1] http://developer.gnome.org/gi/unstable/gi-overview.html
--
|
|
From: Michael K. <mic...@gm...> - 2012-04-08 20:08:10
|
On 03/28/2012 05:59 PM, Sam Steingold wrote: >> * Michael Kappert<zvp...@tz...> [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 cd 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: https://bitbucket.org/mak08/clisp-gir (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 should be 4. $ -link add base base+linux linux - clisp-link handles absolute directories incorrectly: ./clisp-link add base base+gir /modules/configured/gir produces dynmod/gir.lisp (ext:appease-cerrors ; for DEF-CALL-OUT to non-existent functions (cl:load (cl:merge-pathnames "..//modules/configured/gir/ffigen.fas" cl:*load-truename*))) => 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. Michael -- |
|
From: Sam S. <sd...@gn...> - 2012-03-28 15:59:39
|
> * Michael Kappert <zvp...@tz...> [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...)) ? > I guess I need to understand clisp-link and link.sh better... this will help, yes :-) please help with the docs too. >>> but I still see >>> make[1]: Entering directory `<clisp>/build.gir/gtk+3' >>> <clisp>/clisp -K boot ... >> >> this is weird. new-clx requires syscalls and the build works fine. >> please take a look at how it is done. > > The new-clx lisp files are compiled with -K boot. It seems new-clx > does not call syscalls functions at compile time. (The "gtk+3" module > queries GTK+ Typelibs[1] at compile time, via a macro that produces a > huge progn containing FFI forms.). take a look at the anymodule target in Makefile. if you are not using configure, you should be able to do $ cd gtk+3 && make clisp-module CLISP="whatever" if you discover that you really do need all those other make variables, you can just edit the build Makefile and replace CLISP="/home/sds/src/clisp/current/build/clisp -K boot -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc" ; \ with whatever suits you. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000 http://www.childpsy.net/ http://camera.org http://americancensorship.org http://dhimmi.com http://ffii.org http://mideasttruth.com http://jihadwatch.org God had a deadline, so He wrote it all in Lisp. |