[cffi-devel] Re: CFFI fails to load libs on 64bit machine

Heiko Schroeter schroete at iup.physik.uni-bremen.de
Wed Apr 26 09:28:00 UTC 2006


James Bielman <jamesjb <at> jamesjb.com> writes:

> 
> Heiko Schroeter <schroete <at> iup.physik.uni-bremen.de> writes:
> 
> > i'am using the CFFI on 32-bit machines without any problem.
> > Switching to a 64-bit platform breaks the loading of a lib.
> 
> [snip]
> 
> > Unable to load foreign library: libgslcblas.so
> >    [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
> >  0: (CFFI::HANDLE-LOAD-FOREIGN-LIBRARY-ERROR "libgslcblas.so" 
"Unable to load 
> > foreign library: ~A" "libgslcblas.so")
> >
> > It doesn't matter if i use alternative 1 or 2.
> >
> > Is it a general matter that CFFI cannot handle 64-bit libs ?
> 
> No, my primary Linux box is an Ubuntu amd64 machine, and it does work
> for me.  Just to make sure, you are using an x86-64 SBCL? (what does
> (MACHINE-TYPE) return?)  Also, what about trying:

This might be the error:
(machine-type) returns "X86" !!! Funny enough though.

>   (sb-alien:load-shared-object "libgslcblas.so")
> 
> directly?

Returns an error that the lib cannot be loaded:
libgslcblas cannot be found.


Will try to get a 64Bit SBCL up and running first.
Thanks for the hint.

Heiko






More information about the cffi-devel mailing list