<br><br><div class="gmail_quote">On Tue, Jul 20, 2010 at 10:22 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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&#39;m wrong.<br><br>To vm maintainers : wouldn&#39;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></blockquote><div><br><br>Nicolas, for SqueakDBX, I had to write this:<br>

<br>
<a href="http://www.squeakdbx.org/Compiling%20and%20installing%20OpenDBX">http://www.squeakdbx.org/Compiling%20and%20installing%20OpenDBX</a><br>
<br>
where
 it says &quot;Problems with Mac OS&quot;<br>
<br>

And yes, I agree it would be great to have the correct behavior by 
default. Hope John can do that.<br>

<br>

Mariano<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">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&#39;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 &quot;display package content&quot; (it&#39;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&#39;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><font color="#888888">
<br>
Nicolas
</font><br><br>
<br></blockquote></div><br>