FFI Question on Linux

Douglas Brebner douglas+list at fang.demon.co.uk
Sun Oct 22 13:41:42 UTC 2000


On Sun, 22 Oct 2000, Bert Freudenberg wrote:
> On Sun, 22 Oct 2000, Douglas Brebner wrote:
> 
> > On Sun, 22 Oct 2000, Bert Freudenberg wrote:
> > > 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.
> 
> There's also the line (handle= tryLoading("", pluginName,".so")) there.
> Hey, you sent a patch, you know the code ;)

Not as well as I thought, it's working now. I must have got mixed up while
trying to fix several problems at once. Sorry for the confusion. :(

However...

> > > 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.

...this is the problem. You get a 'Callout mechanism not available' error
if the FFI prims load successfully, but the external library doesn't.

Loading X11.so will fail on NetBSD. You need the patch in order to load
any external libs (all libX11.so style names here). OTOH, it looks like
Linux *will* find X11.so. <sigh>

Unix: one OS divided by a common spec. :/

> > BTW, the latest (2.8pre4) source builds all the plugins with
> > libFoo.so.0.0 style names.
> 
> Really? I only see two plugins named Profiler.so and System.so.

They're libProfiler.so and libSystem.so here. (NetBSD)
I also have libSqueakFFIPrims.so.

-- 
Douglas (who wants to beat both FFI and unix black and blue)





More information about the Squeak-dev mailing list