[Vm-dev] Re: adding external plugins to Squeak 4.2 on the Mac

John McIntosh johnmci at smalltalkconsulting.com
Sun Jul 17 04:42:31 UTC 2011


Craig one reason a plugin won't load is an issue with the major/minor
version numbers in the headers.
There could be disagreement there and you would need to check what is
compiled into the VM versus what is in your plugin.
see what #define VM_PROXY_MINOR  is

also see notes form June 16th  "[Vm-dev] Re: heads-up on
sqVirtualMachine harmonization"

Failure via

/*	Note: This is coded so that is can be run from Squeak. */

EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {
    sqInt ok;

	interpreterProxy = anInterpreter;
	ok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;
	if (ok == 0) {
		return 0;
	}
	ok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;
	return ok;
}



On Sun, Jul 17, 2011 at 12:31 AM, Craig Latta <craig at netjam.org> wrote:
>
>
> Hi--
>
>     Igor writes:
>
>> > I'm adapting the Spoon remote-browsing support for Squeak 4.2. I
>> > use an external plugin (Flow). On the Mac, if I build a stock 4.2 VM
>> > myself and add my Flow bundle to the Resources folder, it works. If
>> > I add the Flow bundle to the Resource folder of the offically-built
>> > VM, it doesn't work.
>>
>> do you rename you plugin? because if i remember correctly there's a
>> check that module name (compiled into a plugin) should be same as
>> library file name. Otherwise VM refuses to use it.
>
>     Well, that wouldn't explain why the unmodified 4.2 VM that I built
> myself works; it's the same external primitives code.
>
>> And again, problem with loading plugins is pain in the ass. We should
>> create an interface where language side could instruct VM to load
>> modules explicitly with good error reporting (if plugin cannot be
>> loaded).
>
>     Yeah, there actually is decent error-reporting code in the Mac VM,
> but it requires a rather obscure flag to be set in order to run. When I
> build a VM I always remove the check and force it to run all the time.
>
>     Well, I guess I need the very person who built the release VM to
> tell me why it won't load my plugin (by using a debugger with access to
> the source file paths mentioned in the debugging symbols). This appears
> to be John McIntosh. John, would you please grab [1] and let me know?
>
>
>     thanks!
>
> -C
>
> [1] http://dl.dropbox.com/u/15188004/Flow%20test.zip
>
> --
> Craig Latta
> www.netjam.org/resume
> +31 6 2757 7177
> + 1 415 287 3547
>
>
>



-- 
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================


More information about the Vm-dev mailing list