[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] lazy-ffi: what am I missing?
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-users] lazy-ffi: what am I missing? |
Date: |
Wed, 31 Mar 2010 15:19:23 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Hi Jeronimo
On Wed, 31 Mar 2010 15:17:25 -0300 Jeronimo Pellegrini <address@hidden> wrote:
> On Wed, Mar 31, 2010 at 01:51:42PM -0400, Mario Domenech Goulart wrote:
>> On Tue, 30 Mar 2010 23:06:29 -0300 Jeronimo Pellegrini <address@hidden>
>> wrote:
>>
>> > $ csc -X lazy-ffi.scm thing.scm
>> >
>> > (Do I really need to include the lazy-ffi source when compiling?)
>>
>> According to the wiki docs, yes:
>>
>> To use this extension in compiled code, invoke the compiler with
>> -extension lazy-ffi. This is necessary because the extension defines
>> a special read-syntax which has to be registered before the source
>> code is read in. This is not required for interpreted code.
>
> Ok, I understand. But does it need to load the *source* of the
> extension? I thought csc would be able to load the extension
> (the shared library) before compiling.
> (It would be more convenient than having to give the full path of the
> egg when compiling)
>
>
> BTW, you mentioned a "-extension" flag; I suppose you meant "-extend"?
>
> -X -extend FILENAME load file before compilation commences
I think so. I'm not completely sure, but here's what I think:
* the documentation for lazy-ffi has been copied from the release/3
branch (eggs repository) and some information regarding to the
chicken tools became outdated.
* csc for chicken 3 has a -extension command line option (and -extend
too). It seems that csc for chicken 4 doesn't have -extension, but
it has -extend.
* as far as I understand the argument to -extend may be the name of an
extension, since it calls
(load (##sys#resolve-include-filename thing #f #t))
behind the scenes. Here on my system I get:
(##sys#resolve-include-filename "lazy-ffi" #f #t)
"/usr/local/chicken-4.4.4/lib/chicken/5/lazy-ffi.so"
So, I think the correct command line option is really -extend. Since
I'm not completely sure, I'll let Felix decide how to fix it.
Best wishes.
Mario