<html><body bgcolor="#FFFFFF"><div>Hmm. I didn't have any trouble compiling Cog on 10.6. Which Xcode version are you using?<br><br>On Jul 30, 2010, at 11:57 AM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div><br><br><div class="gmail_quote">On Fri, Jul 30, 2010 at 6:29 AM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com"><a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a></a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
&nbsp;<br>sorry....quick send...try again:<br>Hi Eliot. I am trying to compie CogVM from XCode. If I choose "Mac OS X 10.5 (Base SDK)" CogVM compiles without problem.<br><br>But if I choose "Mac OS X 10.6" I have a compile error in ucontext.h line 42:<br>

<br>#error ucontext routines are deprecated, and require _XOPEN_SOURCE to be define<br><br>It comes from sqUnixVMProfile.x where you have:<br><br>#include &lt;ucontext.h&gt; <br>
<br><br>any ideas how can I fix this?<br></blockquote><div><br></div><div>I guess three ways. &nbsp;One is simply to define&nbsp;_XOPEN_SOURCE. &nbsp;But better is to figure out how to get the&nbsp;program counter&nbsp;pointer value from a signal handler in 10.6. &nbsp;i.e. what the profiler does is periodically sample the VM thread's program counter. &nbsp;It does this using a thread that sends SIGPROF to the VM thread and have the SIGPROF handler (pcbufferSIGPROFhandler) get the interrupted pc from the ucontext structure passed into the signal handler. &nbsp;Presumably there's a new way of doing this in 10.6. &nbsp;Find out what that is.</div>
<div><br></div><div>The third way is simply to define NO_VM_PROFILE and then the file will provide only stubs and you'll have no functional VM profiler.</div><div><br></div><div>HTH</div><div>Eliot</div><div><br></div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>Thanks!<br><br>Mariano<br>
<br></blockquote></div><br>
</div></blockquote></body></html>