[Vm-dev] Compiling OSProcessPlugin for Cocoa Cog VM (Mac)
David T. Lewis
lewis at mail.msen.com
Fri Dec 31 06:25:14 UTC 2010
Please also check that you are using the latest OSProcessPlugin
from SqueakSource. I recently removed the deprecated aio methods
and a lot of other old stuff, and also made some changes for Pharo
compatibility. The up to date version should no longer have dependencies
on the aio functions.
I normally expect OSPP to be built as an external plugin on Unix
and Linux, but I do not have a Mac to test so you should follow
John's advice for this.
Let me know if the printAllStacks reference is a problem. It is
used in #primitivePrintAllStacksOnSignal but I doubt that anyone
actually uses that feature, so we can just get rid of it if it
causes problems on Mac.
The aio functions from OSProcessPlugin have all been moved to
AioPlugin (www.squeaksource.com/AioPlugin). I think that this
plugin will work on Mac, although you may need to build it
internal to make it work.
Similarly, the X11 functions from OSProcessPlugin were all moved
to XDisplayControlPlugin (www.squeaksource.com/XDCP). I do not
know if this is useful on Mac or not (probably not).
In any case, it should be possible to compile OSPP without any
X11 or aio function references now.
On Thu, Dec 30, 2010 at 05:47:52PM -0800, John M McIntosh wrote:
> This one is tricky and yes it's linked as an external plugin .
> The problem is that it needs to be weak linked against the globals that contain the argv/c etc...
> Further to this see
> #warning what about these guyes?
> /*** Variables -- globals for access from pluggable primitives ***/
> int argCnt= 0;
> char **argVec= 0;
> char **envVec= 0;
> which you need to properly hookup in
> int main(int argc, char *argv)
> The warning is there because I didn't hook them up but just as soon as someone wanted to compile up the osprocess plugin.... (years later... )
> Oh no doubt one should look at all the #warnings and ask John mmmm AND AND AND?
> BTW to get it to link I had to do
> OTHER_LDFLAGS = "-flat_namespace -undefined warning"
> that will save oh a night of grief I think...
> On 2010-12-30, at 4:25 PM, Igor Stasenko wrote:
> > On 31 December 2010 01:22, Esteban Lorenzano <estebanlm at gmail.com> wrote:
> >> Hi,
> >> I'm trying to compile UnixOSProcessPlugin as an external plugin for Cocoa Cog VM.
> >> I created a project (in the future CMakeGenerator will doit, but for now it was hand), and I'm having some problems due to "Symbol not found" errors. The problems were because dependences of OSProcessPlugin with aio functions (fixed by Igor now), and with dependences with #printAllStacks.
> >> Well... my doubt is: should OSProcessPlugin be an internal plugin? or there are something wrong?
> >> I used OSProcessPlugin before (in 4.2.5) as an external plugin... so, I think it *should* be external, but I don't know :(
> > it appears it won't work as external one, because of several
> > dependencies, which seen only if you link against main VM body.
> > And this should be fixed, because its lame :)
> >> Cheers,
> >> Esteban
> > --
> > Best regards,
> > Igor Stasenko AKA sig.
> John M. McIntosh <johnmci at smalltalkconsulting.com> Twitter: squeaker68882
> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Vm-dev