Its not obvious for a Mac newbie like me to get FFI running on MacOSX.
What I (re?) discovered is below. Please correct me if I'm wrong.
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 ?
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...
Nicolas
-----------------------------------------------------
Ah, some news!
In order to track and debug the problem with FFI, I built a VM.
(uneasy because latest svn xcodeproj is not exactly configured for a
one click build...).
The problem is that most vm are configured to search for plugin only in
squeak bundle
(global variable gSqueakPluginsBuiltInOrLocalOnly in files sqMain.c and
sqMacUnixExternalPrims.c)
I guess this is to save time at startup (and batteries for iPhone...)
And also to get some more secure VM (can't load an invalid plugin from
an older squeak vm).
Unfortunately, no difference is made between loading a squeak plugin and
loading a FFI library...
There is a ffiLoad flag passed to findAndLoadModule() in sqNamedPrims.c
but not to subfunction ioLoadModule() in sqMacUnixExternalPrims.c... (a
mistake IMHO)
So this setting is preventing FFI to work.
What you should do is change this setting:
- select your squeak vm in the finder.
- Then choose a menu item like "display package content" (it's a guess,
my version is configured in french).
- Then edit the contents/info.plist with a property editor.
- Then uncheck the box corresponding to SqueakPluginsBuiltInOrLocalOnly
and save properties
Then FFI should be operational again...
(But Smallapack may well crash, at least that's what happens here...)
I think I will CC squeak-dev/vm-dev to check If I this is the expected
solution.
Nicolas
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project