FFI Question on Linux

Douglas Brebner douglas+list at fang.demon.co.uk
Sun Oct 22 10:45:18 UTC 2000


On Sun, 22 Oct 2000, Bert Freudenberg wrote:
> On Sun, 22 Oct 2000, Douglas Brebner wrote:
> 
> > There's been a change to ioLoadModule() which breaks loading plugins
> > and libraries. It looks for Foo.so but not libFoo.so
> > 
> > This fixed the problem here.
> 
> Really? How could this effect the FFI module, which is looked up
> as 'SqueakFFIPrims' and named 'SqueakFFIPrims.so', so the line
>              (handle= tryLoading(        "./", pluginName, ".so"))
> should work fine? There's no 'lib' prefix involved here. You're right wrt

Of course, that won't work if SqueakFFIPrims.so isn't in the current
directory.

> the X11 example, which is looked up as 'X11' but needs to find
> 'libX11.so'. But the error 'Callout mechanism not available' generally
> means the SqueakFFIPrims-module could not be loaded.

My dlopen() manpage says that you either need an absolute pathname, or
a name like "lib<name>.so[.xx[.yy]]" for a DSO to be found. I don't think
dlopen() will find SqueakFFIPrims.so in the normal library search path.

BTW, the latest (2.8pre4) source builds all the plugins with libFoo.so.0.0
style names.

-- 
Douglas





More information about the Squeak-dev mailing list