[Vm-dev] Is there a way to compile StackVM from XCode?

Igor Stasenko siguctua at gmail.com
Sun Dec 12 14:03:40 UTC 2010


On 12 December 2010 14:49, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
>
>
>
> On Sun, Dec 12, 2010 at 2:18 PM, Igor Stasenko <siguctua at gmail.com> wrote:
>>
>> On 12 December 2010 13:27, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
>> >
>> > Thanks Eliot. I did your idea and I could make progress. Then I have the errors that John said...so I am trying to compile the StackVM. Now, the error I have is:
>> >
>> >
>> > Build Croquet of project CoreVM with configuration Development
>> >
>> > Ld build/Development/Croquet.app/Contents/MacOS/Croquet normal i386
>> > cd /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM
>> > setenv MACOSX_DEPLOYMENT_TARGET 10.5
>> > /Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/Development -F/Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/Development -filelist /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/CoreVM.build/Development/Croquet.build/Objects-normal/i386/Croquet.LinkFileList -mmacosx-version-min=10.5 -framework CoreFoundation -framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Foundation -framework SystemConfiguration -framework AppKit -prebind -o /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/Development/Croquet.app/Contents/MacOS/Croquet
>> >
>> > ld: duplicate symbol _warning in /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/CoreVM.build/Development/Croquet.build/Objects-normal/i386/interp.o and /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/CoreVM.build/Development/Croquet.build/Objects-normal/i386/gcc3x-interp.o
>> > collect2: ld returned 1 exit status
>> > Command /Developer/usr/bin/gcc-4.2 failed with exit code 1
>> >
>>
>> it looks like there are some error in configuration, because linker
>> tries to link interp.o and gcc3x-interp.o
>> which are the same interpreter code, except that gcc3x-interp is
>> modified a little through 'gnuification' step.
>> Normally, for building VM with GCC you should use only gcc3x one, and
>> if you dare to build VM with another compiler,
>> use interp.o instead.
>>
>
> Thanks for the explanation Igor. I tried now to exlcude gcc3x-inter.c and use interp.c or vice-versa, but in any case I have the error:
>
>
> Build Croquet of project CoreVM with configuration Development
>
> Ld build/Development/Croquet.app/Contents/MacOS/Croquet normal i386
> cd /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM
> setenv MACOSX_DEPLOYMENT_TARGET 10.5
> /Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/Development -F/Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/Development -filelist /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/CoreVM.build/Development/Croquet.build/Objects-normal/i386/Croquet.LinkFileList -mmacosx-version-min=10.5 -framework CoreFoundation -framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Foundation -framework SystemConfiguration -framework AppKit -prebind -o /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM/build/Development/Croquet.app/Contents/MacOS/Croquet
>
> Undefined symbols:
>   "_dumpPrimTraceLog", referenced from:
>       _error in sqMacMain.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
>
oh.. this method is defined in CoInterpreter, but not in StackInterpreter.

So, you can fix that in two ways:
- add empty dumpPrimTraceLog  for StackInterpreter. Like follwoing:
dumpPrimTraceLog
	"The prim trace log is a circular buffer of entries. If there is
	 an entry at primTraceLogIndex \\ PrimTraceLogSize it has entries.
	 If there is something at primTraceLogIndex it has wrapped."
	<api>
	<inline: false>
  "do nothing"

or, in
sqMacMain.c
use #ifdefs and detect if you building coInterpreter or stack
interpreter , in order to avoid using this function, because its not
available  in StackInterpreter.

I think best would be to simply add it to StackInterpreter and don't
mess with C code.


>
> So....I will continue trying to see what the problem is.
>
>>
-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list