[cffi-devel] Re: [Openmcl-devel] Problems with CFFI and Openmcl on Mac/Intel
Henry Irvine
henryirvine at yahoo.com
Thu Apr 12 03:26:29 UTC 2007
On Apr 11, 2007, at 10:38 PM, Gary Byers wrote:
> Are you trying to load a 32-bit foreign library in a 64-bit lisp ?
> (I don't know what "libtest.so" is, but the value of CFFI::ARGUMENTS
> in frame 0 makes me wonder about that.)
>
> If this is the problem, I imagine that the CFFI test suite has options
> to generate 64-bit test libraries; I seem to remember a similar issue
> with ppc64.
>
> In the shell,
>
> shell> file /path/to/libtest.so
>
> or
>
> shell> lipo /path/to/libtest.so -info
>
> might help to determine the architecture of the library.
How right you are...
~/lisp/Lisp_Sources/site/cffi/tests $ file libtest.so
libtest.so: Mach-O bundle i386
~/lisp/Lisp_Sources/site/cffi/tests $ file libtest2.so
libtest2.so: Mach-O bundle i386
~/lisp/Lisp_Sources/site/cffi/tests $ lipo libtest.so -info
Non-fat file: libtest.so is architecture: i386
~/lisp/Lisp_Sources/site/cffi/tests $ lipo libtest2.so -info
Non-fat file: libtest2.so is architecture: i386
I added a -m64 flag to the makefile for the test libs,
now they are
~/lisp/Lisp_Sources/site/cffi/tests $ lipo libtest2.so -info
Non-fat file: libtest2.so is architecture: x86_64
~/lisp/Lisp_Sources/site/cffi/tests $ lipo libtest.so -info
Non-fat file: libtest.so is architecture: x86_64
~/lisp/Lisp_Sources/site/cffi/tests $ file libtest2.so
libtest2.so: Mach-O 64-bit bundle x86_64
CFFI-tests now infini-loops with cpu usage at 100% while compiling
the file calbacks.lisp (that is a problem for another night...),
however if I interrupt and do the following...
CL-USER> (asdf:oos 'asdf:load-op 'cffi-tests)
; loading system definition from /Users/hirvine/lisp/Lisp_Sources/
systems/cffi-tests.asd into #<Package "ASDF0">
; registering #<SYSTEM CFFI-TESTS #x30004114729D> as CFFI-TESTS
; loading system definition from /Users/hirvine/lisp/Lisp_Sources/
systems/rt.asd into #<Package "ASDF0">
; registering #<SYSTEM :RT #x30004119034D> as RT
; loading system definition from /Users/hirvine/lisp/Lisp_Sources/
systems/cffi.asd into #<Package "ASDF0">
; registering #<SYSTEM CFFI #x3000411AB2CD> as CFFI
; $ cd /Users/hirvine/lisp/Lisp_Sources/site/cffi/tests/; make
make: Nothing to be done for `shlibs'.
Invoking restart: Skip compiling #P"/Users/hirvine/lisp/Lisp_Sources/
site/cffi/tests/callbacks.lisp"
Invoking restart: Continue, treating #<COMPILE-OP NIL #x300040FFF4FD>
on #<CL-SOURCE-FILE "callbacks" #x3000410048FD> as
having been successful.
Invoking restart: Skip loading #P"/Users/hirvine/lisp/Lisp_Sources/
compiled/.fasls/openmcl-unix-x86-64-1.1/Users/hirvine/lisp/
Lisp_Sources/site/cffi/tests/callbacks.dx64fsl"
NIL
CL-USER> (asdf:oos 'asdf:test-op 'cffi-tests)
How many times shall we run the tests (uncompiled)? [1]:
Doing 182 pending tests of 182 tests total.
--- snip ---
No tests failed.
;;; Finished running tests (uncompiled) 1 times.
How many times shall we run the tests (compiled)? [1]:
Doing 182 pending tests of 182 tests total.
--- snip ---
No tests failed.
;;; Finished running tests (compiled) 1 times.
NIL
Thanks Gary!
More information about the cffi-devel
mailing list