Alright I figured it out. I understand why debug+asserts doesnt seem to exist for me, this is only on the newest versions or at least the repositories. For the repositories one that worked. Still for the 2.9 that did not work. I am still hoping to use the 2.9 in case anyone could tell me. <div>

<br></div><div>Also, I am still wondering why the gv is always being used although graphviz is mentioned. Is there any way to make it output to graphviz which seems much more new and up to date than gv that was last updated on 2003? </div>

<div><br></div><div>Thank you very much for your help, I added all the process I went thru and a pointer to the archive of this email on my original question at stack overflow as an answer in case anyone get stuck on this like I did. </div>

<div><br></div><div><a href="http://stackoverflow.com/questions/10962845/stmtviewast-is-only-available-in-debug-builds-on-systems-with-graphviz-or-gv/10965591#10965591">http://stackoverflow.com/questions/10962845/stmtviewast-is-only-available-in-debug-builds-on-systems-with-graphviz-or-gv/10965591#10965591</a></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><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>Still the same message.</div><div><br></div><div>I am running it from llvm-2.9/Debug/bin/clang -cc1 -ast-view ~/smd.c </div><div><br></div><div>Is this where you were referring to? </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 class="h5"><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">


You need to run the clang from the build directory. Something like ./Debug+Asserts/bin/clang<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 22:52, 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">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/" target="_blank">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><div><br></div><div><b>Stmt::viewAST is only available in debug builds on systems with Graphviz or gv!</b></div></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><div><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><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><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></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>