[Openmcl-devel] Darwin problems using UFFI

Gary Byers gb at clozure.com
Wed Jun 23 10:26:04 PDT 2004


On Wed, 23 Jun 2004, Miguel Arroz wrote:

> Hi!
>
>    I'm kind of newbie to LISP, so sorry if this is a stupid question,
> but...
>
>    I'm working with OpenMCL (latest version) on Darwin (Mac OS X
> 10.3.4). I'm trying to use clsql, but for that I need uffi. I'm getting
> a lot of problems when clsql tries to load uffi, so I tried to run the
> uffi tests. This is the result (sorry for the flood):
>
> ? (asdf:operate 'asdf:test-op 'uffi)
> ; loading system definition from
> ; /Users/arroz/Documents/LISP/uffi/uffi-tests.asd into #<Package
> "ASDF38">
> ; registering #<SYSTEM UFFI-TESTS #x64B2BFE> as UFFI-TESTS
> ; $ cd /Users/arroz/Documents/LISP/uffi/tests/; make
> BASE=uffi-c-test OBJECT=uffi-c-test.o SOURCE=uffi-c-test.c
> SHARED_LIB=uffi-c-test.so sh make.sh
> rm uffi-c-test.o
> ;Compiler warnings for
> "/Users/arroz/Documents/LISP/uffi/tests/compress.lisp" :
> ;   Undeclared free variable LENGTH (2 references), in COMPRESS.
> ;   Undeclared free variable LENGTH (2 references), in UNCOMPRESS.
> ;   Unused lexical variable NEWDESTLEN (2 references), in UNCOMPRESS.

[and the functions that generated these warnings at compile time generated
errors at run time, not surprisingly.]

The macro UFFI:CONVERT-FROM-FOREIGN-STRING needs to use backquote instead
of quote ...  I found that it was simplest to change the offending clause
to:

    #+openmcl ,@(if length
                `((ccl:%str-from-ptr ,obj ,length))
                `((ccl:%get-cstring ,obj))))))




More information about the Openmcl-devel mailing list