<br><br><div class="gmail_quote">On Sun, Dec 12, 2010 at 2:18 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
On 12 December 2010 13:27, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; 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:<br>
&gt;<br>
&gt;<br>
&gt; Build Croquet of project CoreVM with configuration Development<br>
&gt;<br>
&gt; Ld build/Development/Croquet.app/Contents/MacOS/Croquet normal i386<br>
&gt; cd /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM<br>
&gt; setenv MACOSX_DEPLOYMENT_TARGET 10.5<br>
&gt; /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<br>

&gt;<br>
&gt; 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<br>

&gt; collect2: ld returned 1 exit status<br>
&gt; Command /Developer/usr/bin/gcc-4.2 failed with exit code 1<br>
&gt;<br>
<br>
</div>it looks like there are some error in configuration, because linker<br>
tries to link interp.o and gcc3x-interp.o<br>
which are the same interpreter code, except that gcc3x-interp is<br>
modified a little through &#39;gnuification&#39; step.<br>
Normally, for building VM with GCC you should use only gcc3x one, and<br>
if you dare to build VM with another compiler,<br>
use interp.o instead.<br>
<div class="im"><br></div></blockquote><div><br>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:<br><br><br>Build Croquet of project CoreVM with configuration Development<br>
<br>Ld build/Development/Croquet.app/Contents/MacOS/Croquet normal i386<br>cd /Users/mariano/PhD/Marea/usedBit/CogVM/Cog/macbuildStackVM<br>setenv MACOSX_DEPLOYMENT_TARGET 10.5<br>/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<br>
<br>Undefined symbols:<br>  &quot;_dumpPrimTraceLog&quot;, referenced from:<br>      _error in sqMacMain.o<br>ld: symbol(s) not found<br>collect2: ld returned 1 exit status<br><br><br><br>So....I will continue trying to see what the problem is. <br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
&gt;<br>
&gt; I don&#39;t understand if the error is the &quot;duplicate symbol _warning &quot; or if there is really another error (I am a C newbie).<br>
&gt;<br>
<br>
</div>a duplicate symbol means that same symbol (function or variable name)<br>
are defined (do not mix with declared) in two or more object files at<br>
global scope.<br>
So, when linker tries to link them together into a single binary file,<br>
it has a collision.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br><br>excelent. Thanks for the explanations :)<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5">
<br>
&gt; thanks in advance for any help<br>
&gt;<br>
&gt; Mariano<br>
&gt;<br>
&gt; On Fri, Dec 10, 2010 at 7:11 PM, Esteban Lorenzano &lt;<a href="mailto:estebanlm@gmail.com">estebanlm@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt; Yep, the iOS StackVM is on the trunk, but still not compiling out of the box (at least for me...). I&#39;m working on that now :)<br>
&gt;&gt; Cheers,<br>
&gt;&gt; Esteban<br>
&gt;&gt;<br>
&gt;&gt; El 10/12/2010, a las 2:49p.m., Eliot Miranda escribió:<br>
&gt;&gt;<br>
&gt;&gt; Hi Mariano,<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Dec 10, 2010 at 6:57 AM, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi eliot. I am using CoreVM.xcodeproj  to compile a CogVM. I have integrated several of my own changes that I used to have in standard vm into cog...As expected, I have several errors/crash and so I thought that a first step would be to make it work with StackVM and then in Cog...<br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt; So, I want to compile and debug the StackVM using XCode. I tried using the CoreVM.xcodeproj but it seems it is prepared for CogVM. For example, it expects de files cogit.c and cogit.h  althought they are not generated when creating a StackVM.<br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt; My question is, is there somewhere a .xcodeproj for the stackVM? or some option inside the CoreVM.xcodeproj   to say that I want to compile a StackVM ?<br>
&gt;&gt;<br>
&gt;&gt; Take a copy of the macbuild directory, call it e.g. macstackbuild, and point the new CoreVM xcode project at ../stacksrc instead of ../src, and to compile gcc3x-interp.c instead of cogit.c and gcc3x-cointerp.c and you should be able to build a stack vm.  You can do this either by editing the CoreVM.xcodeproj/project.pbxproj file by hand (it has UUIDs for files so it can be tedious) or using Xcode itself (it has an arcane way of specifying include paths and #defines, so it can be tedious).<br>

&gt;&gt; John McIntosh has already built a stackvm and is using it routinely on the iPhone.  I&#39;m not sure if the build directory or xcode project is in svn, but knowing john it probably is.<br>
&gt;&gt; HTH<br>
&gt;&gt; Eliot<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks in advance,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Mariano<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
</font></blockquote></div><br>