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

David T. Lewis lewis at mail.msen.com
Sat Sep 12 01:48:42 UTC 2015


On Fri, Sep 11, 2015 at 07:29:11PM -0400, Chris Cunnington wrote:
> 
> On 2015-09-11 3:18 PM, tim Rowledge wrote:
> >
> >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.

:-)

I am quite confident that Ian would not be unhappy if someone were to
send him a nice note. That does not happen often enough. Ian is the author
of the Unix VM platform code, and a number of other things that the
Squeak/Pharo community rely on every day. I think that Andreas Raab was
also responsible for developing the module lookup strategy.

As far as I am aware, the module search logic in SVN trunk would be the
latest and presumably best version of Ian's implementation. The oscog
branch was forked at an earlier time, and may have differences that
reflect an earlier version of Ian's work, at least with respect to module
lookup logic.

Unless there is some compelling reason to look elsewhere, the latest
version of Ian's work is in SVN trunk, and that should serve as the
reference implementation with respect to the module lookup strategy
for plugin modules and VM loadable modules (another of Ian's related
contributions).

Dave



More information about the Vm-dev mailing list