<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>Hi Ashok,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>I created a new Ubuntu 12.04 virtual machine and followed directions except that I know use your cmake command instead of configure, and I got the error below.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>Any help is very much appreciated.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;
"><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div><span><div>$ /home/ubuntu/bin/bin/clang++ -I /home/ubuntu/bin/include/ tutorial1.cpp</div><div>In file included from tutorial1.cpp:5:</div><div>In file included from /home/ubuntu/bin/include/llvm/Support/raw_ostream.h:17:</div><div>In file included from /home/ubuntu/bin/include/llvm/ADT/StringRef.h:13:</div><div>In file included from /home/ubuntu/bin/include/llvm/Support/type_traits.h:20:</div><div>/home/ubuntu/bin/include/llvm/Support/DataTypes.h:48:3: error: "Must #define __STDC_LIMIT_MACROS before #including</div><div> Support/DataTypes.h"</div><div># error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"</div><div> ^</div><div>/home/ubuntu/bin/include/llvm/Support/DataTypes.h:52:3: error: "Must #define __STDC_CONSTANT_MACROS before "</div><div>
"#including Support/DataTypes.h"</div><div># error "Must #define __STDC_CONSTANT_MACROS before " \</div><div> ^</div><div>In file included from tutorial1.cpp:6:</div><div>In file included from /home/ubuntu/bin/include/llvm/Support/Host.h:17:</div><div>In file included from /home/ubuntu/bin/include/llvm/ADT/StringMap.h:18:</div><div>In file included from /home/ubuntu/bin/include/llvm/Support/Allocator.h:18:</div><div>/home/ubuntu/bin/include/llvm/Support/MathExtras.h:38:24: error: use of undeclared identifier 'INT64_C'</div><div> return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));</div><div> ^</div><div>/home/ubuntu/bin/include/llvm/Support/MathExtras.h:38:56: error: use of undeclared identifier 'INT64_C'</div><div> return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x <
(INT64_C(1)<<(N-1)));</div><div> ^</div><div>/home/ubuntu/bin/include/llvm/Support/MathExtras.h:64:26: error: use of undeclared identifier 'UINT64_C'</div><div> return N >= 64 || x < (UINT64_C(1)<<N);</div><div> ^</div><div>/home/ubuntu/bin/include/llvm/Support/MathExtras.h:96:24: error: use of undeclared identifier 'INT64_C'</div><div> return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));</div><div> ^</div><div>/home/ubuntu/bin/include/llvm/Support/MathExtras.h:96:56: error: use of undeclared identifier
'INT64_C'</div><div> return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));</div><div> ^</div><div>7 errors generated.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Ashok Nalkund <ashoknn@qualcomm.com><br> <b><span style="font-weight:
bold;">To:</span></b> NY Knicks Fan <nyknicksfan92009@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "llvmdev@cs.uiuc.edu" <llvmdev@cs.uiuc.edu> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, July 10, 2012 12:44 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [LLVMdev] Unable to do even basic Clang tutorial<br> </font> </div> <br>
Looks like your make/install is incomplete wrt clang. I follow the <br>instuctions for checking out the sources but build using cmake instead <br>of configure:<br><br>> cmake -G ""Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="../bin" ../llvm<br>> make install<br><br>This builds and installs llvm+clang in the bin directory one level above <br>llvm. I tried using configure earlier but had some problems.<br><br>ashok<br><br><br>On 7/9/2012 5:32 PM, NY Knicks Fan wrote:<br>> Hi Ashok,<br>><br>> As I mentioned in my earlier e-mail, my /usr/local/include does not have<br>> clang/ or clang-c/.<br>><br>> I'm unable to do a make or make install in the Clang build directory.<br>> How do I fix this?<br>><br>> Thanks!<br>><br>> ------------------------------------------------------------------------<br>> *From:* Ashok Nalkund <<a
ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a>><br>> *To:* NY Knicks Fan <<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a>>; "<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>"<br>> <<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>> *Sent:* Monday, July 9, 2012 3:30 PM<br>> *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial<br>><br>> Use the -I<install path>/include .<br>><br>> This directory <install path>/include should look something like:<br>><br>> clang/ clang-c/ llvm/ llvm-c/<br>><br>> HTH<br>> ashok<br>><br>> On 7/9/2012 3:15 PM, NY Knicks Fan wrote:<br>> > I downloaded the 3.1 LLVM and Clang sources.<br>>
><br>> > I followed the directions at: http://clang.llvm.org/get_started.html<br>> ><br>> > I am able to use Clang to compile stuff, but I could already do that<br>> > with GCC.<br>> ><br>> > I'm trying to use Clang for parsing code, but I can't even get started.<br>> ><br>> > Can you tell me how to "include the installed location ofclang/llvm<br>> > headers directories in your include path"?<br>> ><br>> > Thanks!<br>> ><br>> ><br>> > ------------------------------------------------------------------------<br>> > *From:* Ashok Nalkund <<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a><br>> <mailto:<a ymailto="mailto:ashoknn@qualcomm.com"
href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a>>><br>> > *To:* NY Knicks Fan <<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a><br>> <mailto:<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a>>><br>> > *Cc:* Chad Rosier <<a ymailto="mailto:mcrosier@apple.com" href="mailto:mcrosier@apple.com">mcrosier@apple.com</a> <mailto:<a ymailto="mailto:mcrosier@apple.com" href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>>>;<br>> "<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>>"<br>> > <<a ymailto="mailto:llvmdev@cs.uiuc.edu"
href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>>><br>> > *Sent:* Monday, July 9, 2012 2:39 PM<br>> > *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial<br>> ><br>> > On 7/9/2012 1:42 PM, Chad Rosier wrote:<br>> > > Have you looked here: <a href="http://clang.llvm.org/get_started.html" target="_blank">http://clang.llvm.org/get_started.html</a><br>> > ><br>> > > Chad<br>> > ><br>> > ><br>> > > On Jul 9, 2012, at 11:33 AM, NY Knicks Fan wrote:<br>> > ><br>> > >> I'm trying to do the tutorials at:<br>> > >><br>> > >> <a
href="https://github.com/loarabia/Clang-tu...i/TutorialOrig" target="_blank">https://github.com/loarabia/Clang-tu...i/TutorialOrig</a><br>> > >> <<a href="https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig" target="_blank">https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig</a>><br>> > >><br>> > >> and I can't even do the first tutorial. I installed LLVM 3.1 and<br>> Clang<br>> > >> 3.1 and when I do:<br>> > >><br>> > >> ~/loarabia-Clang-tutorial-3d79443$ clang++ tutorial1.cpp In file<br>> > >> included from tutorial1.cpp:5: In file included from<br>> > >> ./llvm/Support/raw_ostream.h:17:<br>> > >> ./llvm/Support/llvm/ADT/StringRef.h:13:10: fatal error:<br>> > >> 'llvm/Support/type_traits.h' file
not found<br>> > >><br>> > >> include "llvm/Support/type_traits.h"<br>> > >> ^<br>> > >> 1 error generated.<br>> > >><br>> > >> Do you know what I am doing wrong? I'm not sure what is the best way<br>> > >> to handle this header file problem.<br>> > >><br>> > >> I'm running Ubuntu 12.04.<br>> > >><br>> > >> Thank you.<br>> ><br>> > Did you build it or "install" it from a package? If you build it, then<br>> > you need do a 'make install' and include the installed location of<br>> > clang/llvm headers directories in your include path.<br>> ><br>> ><br>> ><br>> ><br>> ><br>>
><br>> > _______________________________________________<br>> > LLVM Developers mailing list<br>> > <a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>><br>> http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/><br>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<br>> ><br>><br>><br>><br><br><br><br> </div> </div> </div></body></html>