Its not obvious for a Mac newbie like me to get FFI running on MacOSX.<br>What I (re?) discovered is below. Please correct me if I'm wrong.<br><br>To vm maintainers : wouldn't it be a good idea to pass the flag ffiLoad to ioLoadModule() instead of relying only on a single global variable whether it is a plugin that is requested or not ?<br>
This way we could have both secured/fast plugin loading and opened FFI (if distributed in the bundle). Unless there are other reasons unknown of me...<br><br>Nicolas<br><br>-----------------------------------------------------<br>
Ah, some news!<br>
In order to track and debug the problem with FFI, I built a VM.<br>
(uneasy because latest svn xcodeproj is not exactly configured for a
one click build...).<br>
<br>
The problem is that most vm are configured to search for plugin only in
squeak bundle<br>
(global variable gSqueakPluginsBuiltInOrLocalOnly in files sqMain.c and
sqMacUnixExternalPrims.c)<br>
I guess this is to save time at startup (and batteries for iPhone...)<br>
And also to get some more secure VM (can't load an invalid plugin from
an older squeak vm).<br>
<br>
Unfortunately, no difference is made between loading a squeak plugin and
loading a FFI library...<br>
There is a ffiLoad flag passed to findAndLoadModule() in sqNamedPrims.c<br>
but not to subfunction ioLoadModule() in sqMacUnixExternalPrims.c... (a
mistake IMHO)<br>
So this setting is preventing FFI to work.<br>
<br>
What you should do is change this setting:<br>
- select your squeak vm in the finder.<br>
- Then choose a menu item like "display package content" (it's a guess,
my version is configured in french).<br>
- Then edit the contents/info.plist with a property editor.<br>
- Then uncheck the box corresponding to SqueakPluginsBuiltInOrLocalOnly
and save properties<br>
<br>
Then FFI should be operational again...<br>
(But Smallapack may well crash, at least that's what happens here...)<br>
<br>
I think I will CC squeak-dev/vm-dev to check If I this is the expected
solution.<br>
<br>
Nicolas