[Vm-dev] Building OSProcessPlugin on macs

Igor Stasenko siguctua at gmail.com
Wed Jul 6 15:53:44 UTC 2011


I trying to make a working OSProcessPlugin for mac vms.

Okay, i loaded the
VMConstruction-Plugins-OSProcessPlugin.oscog-eem.30

and then building VM with:

StackMacOSConfig new
	addExternalPlugins: #( FT2Plugin );
	addInternalPlugins: #( UnixOSProcessPlugin );
	generateSources; generate.

(this is new api which i recently added to make it easier to generate
VM with custom set of plugins)

It builds fine as internal plugin (fails as external one of course,
because no access to these variables:

Linking C shared library
/Users/sig/projects/cog/sig-cog/results/StackVM.app/Contents/Resources/libUnixOSProcessPlugin.dylib
Undefined symbols:
  "_envVec", referenced from:
      _envVec$non_lazy_ptr in UnixOSProcessPlugin.c.o
     (maybe you meant: _envVec$non_lazy_ptr)
  "_primitiveFail", referenced from:
      _primitiveIsAtEndOfFile in UnixOSProcessPlugin.c.o
  "_argCnt", referenced from:
      _argCnt$non_lazy_ptr in UnixOSProcessPlugin.c.o
     (maybe you meant: _argCnt$non_lazy_ptr)
  "_argVec", referenced from:
      _argVec$non_lazy_ptr in UnixOSProcessPlugin.c.o
     (maybe you meant: _argVec$non_lazy_ptr)
  "_sqFileStdioHandlesInto", referenced from:
      _getStdHandle in UnixOSProcessPlugin.c.o
ld: symbol(s) not found

Remember we're discussed this, and i think we should add an API
function for this, instead of relying on linker to bind those symbols
at run time.
Because this is too brittle and vague for external plugin.

Okay, at least internal one builds, but then when i run tests.. a
dozen of them failing.

UnixProcessTestCase:
18 run, 3 passes, 0 expected failures, 14 failures, 1 errors, 0
unexpected passes

UnixProcessFileLockTestCase
23 run, 23 passes, 0 expected failures, 0 failures, 0 errors, 0
unexpected passes

UnixProcessAccessorTestCase
46 run, 46 passes, 0 expected failures, 0 failures, 0 errors, 0
unexpected passes

OSPipeTestCase
11 run, 11 passes, 0 expected failures, 0 failures, 0 errors, 0
unexpected passes

UnixProcessUnixFileLockingTestCase
40 run, 12 passes, 0 expected failures, 28 failures, 0 errors, 0
unexpected passes

UnixProcessWin32FileLockingTestCase
40 run, 12 passes, 0 expected failures, 28 failures, 0 errors, 0
unexpected passes

Maybe i'm using wrong package for image-side code?
I loaded OSProcess package,
but i see there are separate OSProcess-Base , OSProcess-Mac, OSProcess-Tests etc

are they identical (since i see that David updating both), or it is
better to use splitted versions?

@Esteban, i see that you also making UnixOSProcessPlugin, but i wonder
what is this:

configureUnixOSProcessPlugin: maker
	super configureHostWindowPlugin: maker.
	maker includeDirectories: '${platformsDir}/Cross/plugins/SocketPlugin'.


why it uses rather unrelated configureHostWindowPlugin: there?

Because mine (which for Carbon builds) are following:

configureUnixOSProcessPlugin: maker
	"extra rules for UnixOSProcessPlugin"

	maker includeDirectories: '${crossDir}/plugins/FilePlugin'.

I am missing something? Please let me know.


-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list