[Vm-dev] Re: [squeak-dev] Criteria For Plugin Compatibility

Chris Cunnington brasspen at gmail.com
Fri Sep 11 23:29:11 UTC 2015



On 2015-09-11 3:18 PM, tim Rowledge wrote:
>   
>
> On 11-09-2015, at 12:00 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>> a) a plugin compiled for Spur may not work with V3 or vice verse.  The issue is the header size of an object.  Some plugins, but not all, use this define, and the header sizes between Spur and V3 are incompatible.
>>
>> b) 32-bit plugins won't work with 64-bit VMs, and 64-bit plugins won't work with 32-bit VMs. Period.
> At the very least we should make sure the version checking that was designed specifically to help handle this is actually getting used properly.
> That ought to prevent crashes and help with providing some decent error messages.
>
>> Now there are platform-level packaging technologies, such as fat binaries on Mac OS X, that allow one to construct plugins that contain more than one binary.  But this is a lot of work to build and maintain.
> I suspect we could avoid that by using the versioning stuff to indicate which plugin file(s) the user/system fetches?
>
>
> As I (re)discovered this week, the unix vm  plugin/library loading is amazingly convoluted and looks in more directories than I think my Pi actually has. And it uses the name you give it prepended with ‘lib’ and appended with ‘.so’ and ‘dylib’, so searching for a plugin/lib involves an awful lot of checking and file testing. Looking in the platforms/unix/vm/sqUnixExternalPrims.c you can see what is being done. Note that ther eare two completely different approaches in that code and the Cog VM is using  (so far as I can tell) the NOT USE_SIMPLIFIED_PLUGIN_LOGIC branch.  The (somewhat old) copy of the plain interpreter VM equivalent I have around DOES use the simplified logic. We should probably clean that up...
Oh my. Both the Cog and Interpreter sqUnixExternalPrims.c have two 
implementations of ioLoadModule(). I think Cog ends up leaning on 
tryLoading() while the Interpreter leans on tryLoadModule(). It's 
appalling. Just count the number of uses of dlopen(). I'm no C 
programmer and following this stuff through step by step with gdb was 
needless torture. It's the reason my 32-bit Cog/Stack builds fail on 
Ubuntu 15.04. **shivers**

I think the reason is that nobody wants to offend their forebearers. The 
three of you attend Squeak Board meetings. Come to some kind of 
agreement on what can be ripped out and then send Ian an nice note.

What's most revolting is there are about five systems of tests looking 
for every possible combination (i.e. so.vm-display-X11, 
vm-display-X11.so, vm-display-X11.dylib, etc.) and they all fail. Only 
the last one works or something like that. **shivers like Bart Simpson**

Chris
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Fractured Idiom:- AMICUS PURIAE - Platonic friend
>
>



More information about the Vm-dev mailing list