Just in case another person comes to get stuck on this on Mac OS:<div><br></div><div><a href="http://web.mit.edu/mfloyd/www/computing/mac/gv/">http://web.mit.edu/mfloyd/www/computing/mac/gv/</a></div><div><br></div><div>This link explains the process on getting gv installed since Xaw3d dependency even has a 'error' (actually missing few parameters) on a line that prevents code compilation that needs to be fixed before configuring and make it works.</div>

<div><br></div><div>-- I have gv installed now and my bash console can recognize the 'gv' and 'dot' as specified on llvm manual, from my previous email I believe I compiled on debug mode and my bash does recognize 'clang' bash now but still I get:</div>

<div><br></div><div>clang -cc1 -ast-view smd.c </div><div><br></div><div><b>Stmt::viewAST is only available in debug builds on systems with Graphviz or gv!</b></div><div><br clear="all">What am I missing? :(</div><div><br>

</div><div>Thanks,</div><div><br></div><div>Carlos Andrade<br><div><a href="http://carlosandrade.co" target="_blank">http://carlosandrade.co</a></div><br>
<br><br><div class="gmail_quote">2012/6/9 Carlos Andrade <span dir="ltr"><<a href="mailto:carlosviansi@gmail.com" target="_blank">carlosviansi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Just to add one more thing. I have been trying to install the gv on my mac os but I have not been successful either. The gv build requires xaw3d (<a href="http://directory.fsf.org/wiki/Xaw3d" target="_blank">http://directory.fsf.org/wiki/Xaw3d</a> ) which apparently has not been updated for quite few years and the download is not even available anymore. <div>

<span class="HOEnZb"><font color="#888888">
<br clear="all">Carlos Andrade<br><div><a href="http://carlosandrade.co" target="_blank">http://carlosandrade.co</a></div></font></span><div><div class="h5"><br>
<br><br><div class="gmail_quote">2012/6/9 Carlos Andrade <span dir="ltr"><<a href="mailto:carlosviansi@gmail.com" target="_blank">carlosviansi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi Joey,<div><br></div><div>I think there is still something missing.</div><div><br></div><div>I ignored the -j as you mentioned and saw on the documentation that to compile on debug mode I could do so using:</div><div><br>



</div><div>$./configure --disable-optimized</div><div><br></div><div>As a result by the end I compiled llvm2.9 I got:</div><div><br></div><div><div>llvm[0]: ***** Completed Debug Build</div><div>llvm[0]: ***** Note: Debug build can be 10 times slower than an</div>



<div>llvm[0]: ***** optimized build. Use make ENABLE_OPTIMIZED=1 to</div><div>llvm[0]: ***** make an optimized build. Alternatively you can</div><div>llvm[0]: ***** configure with --enable-optimized.</div><div><br></div>


<div>
<br></div><div>Which lead me to believe I end up getting what you suggested on debug mode. I also put clang 2.9 inside /tools/clang (renamed the clang-2-9) so that the configure could notice it and ran $make test inside the clang folder after it. </div>



<div><br></div><div>Still I executed $ ./clang -cc1 -ast-view smd.c only to get </div><div><div><br></div><div>Stmt::viewAST is only available in debug builds on systems with Graphviz or gv!</div><div><br></div>
</div><div>Mixed up with the output and nothing being show on graphviz. What am I missing? Again, I have graphviz but I don't think I have gv and I am running an OS X Lion 10.7.4 (latest version).</div>
<div><br></div><div>Thanks,</div><div><div><div><br></div>Carlos Andrade<br><div><a href="http://carlosandrade.co" target="_blank">http://carlosandrade.co</a></div><br>
<br><br><div class="gmail_quote">2012/6/9 Joey Gouly <span dir="ltr"><<a href="mailto:joel.gouly@gmail.com" target="_blank">joel.gouly@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Hi,<div><br></div><div>The -j option just says how many processes are started to parallelise the build.</div><div><br></div><div>The default option is to build Debug+Asserts, so unless you add any extra arguments when you run './configure', you should be fine!</div>



<span><font color="#888888">
<div><br></div></font></span><div><span><font color="#888888">Joey</font></span><div><div><br><br><div class="gmail_quote">On 9 June 2012 21:29, Carlos Andrade <span dir="ltr"><<a href="mailto:carlosviansi@gmail.com" target="_blank">carlosviansi@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Joey! <div><br></div><div>Thanks I just replied your message on stack and I was actually looking into this right now. Is this the option? I just wanted to confirm:</div><div><br></div><div><span style="font-family:Times;font-size:medium"><ul>






<li><tt>make [-j]</tt> - The -j specifies the number of jobs (commands) to run simultaneously. This builds both LLVM and Clang for Debug+Asserts mode. The --enabled-optimized configure option is used to specify a Release build.</li>






</ul><div><br></div><div>The -j parameter is the right one? </div><div><br></div><div>Thank you,</div><div><br></div></span>Carlos Andrade<br><div><a href="http://carlosandrade.co" target="_blank">http://carlosandrade.co</a></div>




<div><div>

<br>
<br><br><div class="gmail_quote">2012/6/9 Joey Gouly <span dir="ltr"><<a href="mailto:joel.gouly@gmail.com" target="_blank">joel.gouly@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






Hi Carlos,<div><br></div><div>You can just download the source code from <a href="http://llvm.org/releases/download.html#2.9" target="_blank">http://llvm.org/releases/download.html#2.9</a> and then read <a href="http://llvm.org/docs/GettingStarted.html" target="_blank">http://llvm.org/docs/GettingStarted.html</a> which should tell you how to compile it.</div>






<span><font color="#888888">
<div><br></div><div>Joey</div></font></span><div><div><div><br><div class="gmail_quote">On 9 June 2012 21:10, Carlos Andrade <span dir="ltr"><<a href="mailto:carlosviansi@gmail.com" target="_blank">carlosviansi@gmail.com</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alex,<div><br></div><div>Would you recommend any specific link in respect on how to compile in debug mode? I downloaded the Mac OS version on the website so I did not compile anything. I am sort of a rookie on bash but I should be able to figure my way around this. </div>









<div><br></div><div>Also, is there any particular reason why this functionality is only available on debug mode?</div><div><br></div><div>Thank you so much for the fast reply, was driving me nuts! </div><div><br></div><div>









Best,</div><div><br clear="all">Carlos Andrade<br><div><a href="http://carlosandrade.co" target="_blank">http://carlosandrade.co</a></div><div><div><br>
<br><br><div class="gmail_quote">2012/6/9 Alex Rønne Petersen <span dir="ltr"><<a href="mailto:xtzgzorex@gmail.com" target="_blank">xtzgzorex@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">









Hi Carlos,<br>
<div><br>
> I am new to this list, and hope this question is pertinent to this mailing<br>
> list.<br>
<br>
</div>Welcome!<br>
<div><br>
> Stmt::viewAST is only available in debug builds on systems with Graphviz or<br>
> gv!<br>
<br>
</div>You need to actually build Clang in debug mode for this particular<br>
method to be available, which is very likely why you're seeing this<br>
error. I don't think that Clang builds shipped with Xcode (for<br>
example) are built in debug mode.<br>
<br>
Regards,<br>
Alex<br>
<div><div><br>
On Sat, Jun 9, 2012 at 8:54 PM, Carlos Andrade <<a href="mailto:carlosviansi@gmail.com" target="_blank">carlosviansi@gmail.com</a>> wrote:<br>
> Dears,<br>
><br>
> I am new to this list, and hope this question is pertinent to this mailing<br>
> list.<br>
><br>
> I have been trying to use Clang to extract an AST from my source code, but<br>
> without success when attempting to do so with Graphviz.<br>
><br>
> I created a thread on Stackoverflow recently in hope any could help me [1],<br>
> but the question is actually pretty simple. I keep getting<br>
><br>
><br>
> Stmt::viewAST is only available in debug builds on systems with Graphviz or<br>
> gv!<br>
><br>
> alongside the code that is output despite having graphviz added to the path<br>
> and having it installed on my machine. dot works fine from my console, but I<br>
> have no 'gv' like it is suggested on the documentation (you can find how I<br>
> attempted that and the versions on the stack link better formatted than on<br>
> this email).<br>
><br>
> The command I am running on my console is:<br>
><br>
> ./clang -cc1 -ast-view smd.c<br>
><br>
> My graphviz version is 2.28 and my clang version is 2.9 (for a couple of<br>
> reasons I need to make it work for this version).<br>
><br>
> <a href="http://stackoverflow.com/questions/10962845/stmtviewast-is-only-available-in-debug-builds-on-systems-with-graphviz-or-gv" target="_blank">http://stackoverflow.com/questions/10962845/stmtviewast-is-only-available-in-debug-builds-on-systems-with-graphviz-or-gv</a><br>










><br>
> I also heard xml output was discontinued, but I still see the option from<br>
> cc1 to output in such format without any warning message on 2.9 (although no<br>
> apparent output is given in that case), why is that?<br>
><br>
> Thank you,<br>
><br>
> Carlos Andrade<br>
> <a href="http://carlosandrade.co" target="_blank">http://carlosandrade.co</a><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>