[VM][OS X] FFI plugin 1.1.0b1

Alain Fischer alain.fischer at bluewin.ch
Mon Mar 4 23:44:36 UTC 2002


Hi John,


Le Lundi 4 mars 2002, à 08:11 , John M McIntosh a écrit :

>> On Sunday, March 3, 2002, at 10:07 PM, Alain Fischer wrote:
>>
>>> I have tried to found where the framework module is loaded in the VM 
>>> code when called
>>> by the FFI plugin but found noting. The only part which seem to run 
>>> the external function
>>> is a bunch of incomprehensible assembler code for me.
>
> Somewhere the original note never made it to my inbox.

Yes, the list seem to catch a gamma burst because I have seen my message 
on the list more than 12 hours
after Iposted it.

> For the carbon mac vm, the code to load the framework is now in 
> sqMacExternalPrims.c The function is LoadFrameworkBundle, which is code 
> taken from an Apple example. This code does a find folder on 
> kFrameworksFolderType and proceeds from there to find the framework.

Thanks for the explanation, now I understand better how all this work. 
And it seem that we must search in all the standard
location where a framework could be. Peraps the is a function to do this 
search but my knowledge of the Carbon api are
very thin.

> People who build plugins etc should take note, 99% of the plugin not 
> working issues will happen in this C code as it attempts to load and 
> resolve plugins/frameworks.

I have seen that this was a pain without building a plugin, just using 
it. I had a lot of 'Unable to find function address' and this
was very discouraging, I was in a black maze trying to understand what 
was appening.

> But it seems it's not quite what you want.

If I have the choice, may favorite choice is to minimaly change the VM 
itself. Peraps I will try to code a plugin laaaaattttter
when the VM become more familiar to me, but there is a long way to go.

> I'm just about to issue 3.2.5, so this is go into 3.2.6. If Mr. Fischer 
> can email me then I'll send him an early copy to test once I figure out 
> what to do, now I wonder if it's kPrivateFrameworksFolderType...

Yes, I will be happy to test your new VM. I have tried to build the SF 
3.2.5 VM sunday without success, it seem that
the .pbproj have not all the necesssary reference to link all the 
symbols. The only VM that I build and used a while
was the 3.2.1b2.

Peraps this can help you, I have seen that these two method where 
missing in your PrintJobPlugin

!PrintJobPlugin class methodsFor: 'translation' stamp: 'AFi 3/2/2002 
18:00'!
requiresCrossPlatformFiles
	"If there cross platform files to be associated with the plugin, 
here is where you want to flag"
	^true! !
!PrintJobPlugin class methodsFor: 'translation' stamp: 'AFi 3/2/2002 
18:01'!
hasHeaderFile
	"If there is a single intrinsic header file to be associated with 
the plugin, here is where you want to flag"
	^true! !

>> Whatever you do, the framework first has to be linked into your VM, 
>> either dynamically or 'statically'.
>>
>>> I need some advice from the VM guru. Will it be simple to modify the 
>>> FFI plugin to find
>>> framework in the correct location or to develop a specific plugin ?
>
> Ya, we should do this. Also for plugins...
>
> -- --
> =========================================================================
> ==
> John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> =========================================================================
> ==


Thanks for your explanation and thanks to maintain and develop the Mac 
VM, this is a lot of work.
Have a nice day
Alain




More information about the Squeak-dev mailing list