The "make install" should collect everything into your <install path>. The <install path> will then have bin, lib and include dirs. On 7/9/2012 3:52 PM, NY Knicks Fan wrote:> Hi Ashok, > > The documentation suggests that I put clang inside of llvm/tools and so > I have two separate include directories. I tried both of them and > neither worked: > > $ clang++ -I llvm/include tutorial1.cpp > In file included from tutorial1.cpp:5: > In file included from llvm/include/llvm/Support/raw_ostream.h:17: > In file included from llvm/include/llvm/ADT/StringRef.h:13: > llvm/include/llvm/Support/type_traits.h:20:10: fatal error: > 'llvm/Support/DataTypes.h' file not found > #include "llvm/Support/DataTypes.h" > ^ > 1 error generated. > > $ clang++ -I llvm/tools/clang/include/ tutorial1.cpp > tutorial1.cpp:5:10: fatal error: 'llvm/Support/raw_ostream.h' file not found > #include "llvm/Support/raw_ostream.h" > ^ > 1 error generated. > > Any help you can provide is very much appreciated. > > ------------------------------------------------------------------------ > *From:* Ashok Nalkund <ashoknn at qualcomm.com> > *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com>; "llvmdev at cs.uiuc.edu" > <llvmdev at cs.uiuc.edu> > *Sent:* Monday, July 9, 2012 3:30 PM > *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial > > Use the -I<install path>/include . > > This directory <install path>/include should look something like: > > clang/ clang-c/ llvm/ llvm-c/ > > HTH > ashok > > On 7/9/2012 3:15 PM, NY Knicks Fan wrote: > > I downloaded the 3.1 LLVM and Clang sources. > > > > I followed the directions at: http://clang.llvm.org/get_started.html > > > > I am able to use Clang to compile stuff, but I could already do that > > with GCC. > > > > I'm trying to use Clang for parsing code, but I can't even get started. > > > > Can you tell me how to "include the installed location ofclang/llvm > > headers directories in your include path"? > > > > Thanks! > > > > > > ------------------------------------------------------------------------ > > *From:* Ashok Nalkund <ashoknn at qualcomm.com > <mailto:ashoknn at qualcomm.com>> > > *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com > <mailto:nyknicksfan92009 at yahoo.com>> > > *Cc:* Chad Rosier <mcrosier at apple.com <mailto:mcrosier at apple.com>>; > "llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>" > > <llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>> > > *Sent:* Monday, July 9, 2012 2:39 PM > > *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial > > > > On 7/9/2012 1:42 PM, Chad Rosier wrote: > > > Have you looked here: http://clang.llvm.org/get_started.html > > > > > > Chad > > > > > > > > > On Jul 9, 2012, at 11:33 AM, NY Knicks Fan wrote: > > > > > >> I'm trying to do the tutorials at: > > >> > > >> https://github.com/loarabia/Clang-tu...i/TutorialOrig > > >> <https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig> > > >> > > >> and I can't even do the first tutorial. I installed LLVM 3.1 and > Clang > > >> 3.1 and when I do: > > >> > > >> ~/loarabia-Clang-tutorial-3d79443$ clang++ tutorial1.cpp In file > > >> included from tutorial1.cpp:5: In file included from > > >> ./llvm/Support/raw_ostream.h:17: > > >> ./llvm/Support/llvm/ADT/StringRef.h:13:10: fatal error: > > >> 'llvm/Support/type_traits.h' file not found > > >> > > >> include "llvm/Support/type_traits.h" > > >> ^ > > >> 1 error generated. > > >> > > >> Do you know what I am doing wrong? I'm not sure what is the best way > > >> to handle this header file problem. > > >> > > >> I'm running Ubuntu 12.04. > > >> > > >> Thank you. > > > > Did you build it or "install" it from a package? If you build it, then > > you need do a 'make install' and include the installed location of > > clang/llvm headers directories in your include path. > > > > > > > > > > > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> > http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > >
On Jul 9, 2012, at 4:00 PM, Ashok Nalkund wrote:> The "make install" should collect everything into your <install path>. > The <install path> will then have bin, lib and include dirs.And you should be able to specify the install path with the --prefix option when configuring. I believe the default is /usr/local (see: configure --help to verify). Chad> On 7/9/2012 3:52 PM, NY Knicks Fan wrote: >> Hi Ashok, >> >> The documentation suggests that I put clang inside of llvm/tools and so >> I have two separate include directories. I tried both of them and >> neither worked: >> >> $ clang++ -I llvm/include tutorial1.cpp >> In file included from tutorial1.cpp:5: >> In file included from llvm/include/llvm/Support/raw_ostream.h:17: >> In file included from llvm/include/llvm/ADT/StringRef.h:13: >> llvm/include/llvm/Support/type_traits.h:20:10: fatal error: >> 'llvm/Support/DataTypes.h' file not found >> #include "llvm/Support/DataTypes.h" >> ^ >> 1 error generated. >> >> $ clang++ -I llvm/tools/clang/include/ tutorial1.cpp >> tutorial1.cpp:5:10: fatal error: 'llvm/Support/raw_ostream.h' file not found >> #include "llvm/Support/raw_ostream.h" >> ^ >> 1 error generated. >> >> Any help you can provide is very much appreciated. >> >> ------------------------------------------------------------------------ >> *From:* Ashok Nalkund <ashoknn at qualcomm.com> >> *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com>; "llvmdev at cs.uiuc.edu" >> <llvmdev at cs.uiuc.edu> >> *Sent:* Monday, July 9, 2012 3:30 PM >> *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial >> >> Use the -I<install path>/include . >> >> This directory <install path>/include should look something like: >> >> clang/ clang-c/ llvm/ llvm-c/ >> >> HTH >> ashok >> >> On 7/9/2012 3:15 PM, NY Knicks Fan wrote: >>> I downloaded the 3.1 LLVM and Clang sources. >>> >>> I followed the directions at: http://clang.llvm.org/get_started.html >>> >>> I am able to use Clang to compile stuff, but I could already do that >>> with GCC. >>> >>> I'm trying to use Clang for parsing code, but I can't even get started. >>> >>> Can you tell me how to "include the installed location ofclang/llvm >>> headers directories in your include path"? >>> >>> Thanks! >>> >>> >>> ------------------------------------------------------------------------ >>> *From:* Ashok Nalkund <ashoknn at qualcomm.com >> <mailto:ashoknn at qualcomm.com>> >>> *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com >> <mailto:nyknicksfan92009 at yahoo.com>> >>> *Cc:* Chad Rosier <mcrosier at apple.com <mailto:mcrosier at apple.com>>; >> "llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>" >>> <llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>> >>> *Sent:* Monday, July 9, 2012 2:39 PM >>> *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial >>> >>> On 7/9/2012 1:42 PM, Chad Rosier wrote: >>>> Have you looked here: http://clang.llvm.org/get_started.html >>>> >>>> Chad >>>> >>>> >>>> On Jul 9, 2012, at 11:33 AM, NY Knicks Fan wrote: >>>> >>>>> I'm trying to do the tutorials at: >>>>> >>>>> https://github.com/loarabia/Clang-tu...i/TutorialOrig >>>>> <https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig> >>>>> >>>>> and I can't even do the first tutorial. I installed LLVM 3.1 and >> Clang >>>>> 3.1 and when I do: >>>>> >>>>> ~/loarabia-Clang-tutorial-3d79443$ clang++ tutorial1.cpp In file >>>>> included from tutorial1.cpp:5: In file included from >>>>> ./llvm/Support/raw_ostream.h:17: >>>>> ./llvm/Support/llvm/ADT/StringRef.h:13:10: fatal error: >>>>> 'llvm/Support/type_traits.h' file not found >>>>> >>>>> include "llvm/Support/type_traits.h" >>>>> ^ >>>>> 1 error generated. >>>>> >>>>> Do you know what I am doing wrong? I'm not sure what is the best way >>>>> to handle this header file problem. >>>>> >>>>> I'm running Ubuntu 12.04. >>>>> >>>>> Thank you. >>> >>> Did you build it or "install" it from a package? If you build it, then >>> you need do a 'make install' and include the installed location of >>> clang/llvm headers directories in your include path. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> >> http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/> >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
I followed the directions at http://clang.llvm.org/get_started.html and after make, I did make install. The only thing I didn't do though was make at the clang directory as the directions said clang would automatically get built. When I do make in the clang directory, I get: ~/llvm/tools/clang$ make ../../Makefile.common:61: ../../Makefile.config: No such file or directory ../../Makefile.common:69: /Makefile.rules: No such file or directory make: *** No rule to make target `/Makefile.rules'. Stop. Do you think that the problem is with the distro I chose? I'm using Ubuntu 12.04. ________________________________ From: Ashok Nalkund <ashoknn at qualcomm.com> To: NY Knicks Fan <nyknicksfan92009 at yahoo.com> Cc: "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu> Sent: Monday, July 9, 2012 4:00 PM Subject: Re: [LLVMdev] Unable to do even basic Clang tutorial The "make install" should collect everything into your <install path>. The <install path> will then have bin, lib and include dirs. On 7/9/2012 3:52 PM, NY Knicks Fan wrote:> Hi Ashok, > > The documentation suggests that I put clang inside of llvm/tools and so > I have two separate include directories. I tried both of them and > neither worked: > > $ clang++ -I llvm/include tutorial1.cpp > In file included from tutorial1.cpp:5: > In file included from llvm/include/llvm/Support/raw_ostream.h:17: > In file included from llvm/include/llvm/ADT/StringRef.h:13: > llvm/include/llvm/Support/type_traits.h:20:10: fatal error: > 'llvm/Support/DataTypes.h' file not found > #include "llvm/Support/DataTypes.h" > ^ > 1 error generated. > > $ clang++ -I llvm/tools/clang/include/ tutorial1.cpp > tutorial1.cpp:5:10: fatal error: 'llvm/Support/raw_ostream.h' file not found > #include "llvm/Support/raw_ostream.h" > ^ > 1 error generated. > > Any help you can provide is very much appreciated. > > ------------------------------------------------------------------------ > *From:* Ashok Nalkund <ashoknn at qualcomm.com> > *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com>; "llvmdev at cs.uiuc.edu" > <llvmdev at cs.uiuc.edu> > *Sent:* Monday, July 9, 2012 3:30 PM > *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial > > Use the -I<install path>/include . > > This directory <install path>/include should look something like: > > clang/ clang-c/ llvm/ llvm-c/ > > HTH > ashok > > On 7/9/2012 3:15 PM, NY Knicks Fan wrote: > > I downloaded the 3.1 LLVM and Clang sources. > > > > I followed the directions at: http://clang.llvm.org/get_started.html > > > > I am able to use Clang to compile stuff, but I could already do that > > with GCC. > > > > I'm trying to use Clang for parsing code, but I can't even get started. > > > > Can you tell me how to "include the installed location ofclang/llvm > > headers directories in your include path"? > > > > Thanks! > > > > > > ------------------------------------------------------------------------ > > *From:* Ashok Nalkund <ashoknn at qualcomm.com > <mailto:ashoknn at qualcomm.com>> > > *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com > <mailto:nyknicksfan92009 at yahoo.com>> > > *Cc:* Chad Rosier <mcrosier at apple.com <mailto:mcrosier at apple.com>>; > "llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>" > > <llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>> > > *Sent:* Monday, July 9, 2012 2:39 PM > > *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial > > > > On 7/9/2012 1:42 PM, Chad Rosier wrote: > > > Have you looked here: http://clang.llvm.org/get_started.html > > > > > > Chad > > > > > > > > > On Jul 9, 2012, at 11:33 AM, NY Knicks Fan wrote: > > > > > >> I'm trying to do the tutorials at: > > >> > > >> https://github.com/loarabia/Clang-tu...i/TutorialOrig > > >> <https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig> > > >> > > >> and I can't even do the first tutorial. I installed LLVM 3.1 and > Clang > > >> 3.1 and when I do: > > >> > > >> ~/loarabia-Clang-tutorial-3d79443$ clang++ tutorial1.cpp In file > > >> included from tutorial1.cpp:5: In file included from > > >> ./llvm/Support/raw_ostream.h:17: > > >> ./llvm/Support/llvm/ADT/StringRef.h:13:10: fatal error: > > >> 'llvm/Support/type_traits.h' file not found > > >> > > >> include "llvm/Support/type_traits.h" > > >> ^ > > >> 1 error generated. > > >> > > >> Do you know what I am doing wrong? I'm not sure what is the best way > > >> to handle this header file problem. > > >> > > >> I'm running Ubuntu 12.04. > > >> > > >> Thank you. > > > > Did you build it or "install" it from a package? If you build it, then > > you need do a 'make install' and include the installed location of > > clang/llvm headers directories in your include path. > > > > > > > > > > > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> > http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120709/ea6cc657/attachment.html>
$ ls /usr/local/include/ llvm llvm-c Does this mean Clang wasn't installed properly on my Ubuntu machine? I did a make install in my ~/build directory and I thought this would install Clang. At least there is a /usr/bin/clang. When I do make in my ~/build/tools/clang directory, I get: ~/build/tools/clang$ make make[1]: Entering directory `/home/username/build/tools/clang/utils/TableGen' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/username/build/tools/clang/utils/TableGen' make: *** [all] Error 1 ________________________________ From: Chad Rosier <mcrosier at apple.com> To: NY Knicks Fan <nyknicksfan92009 at yahoo.com> Cc: Ashok Nalkund <ashoknn at qualcomm.com>; llvmdev at cs.uiuc.edu Sent: Monday, July 9, 2012 4:09 PM Subject: Re: [LLVMdev] Unable to do even basic Clang tutorial On Jul 9, 2012, at 4:00 PM, Ashok Nalkund wrote:> The "make install" should collect everything into your <install path>. > The <install path> will then have bin, lib and include dirs.And you should be able to specify the install path with the --prefix option when configuring. I believe the default is /usr/local (see: configure --help to verify). Chad> On 7/9/2012 3:52 PM, NY Knicks Fan wrote: >> Hi Ashok, >> >> The documentation suggests that I put clang inside of llvm/tools and so >> I have two separate include directories. I tried both of them and >> neither worked: >> >> $ clang++ -I llvm/include tutorial1.cpp >> In file included from tutorial1.cpp:5: >> In file included from llvm/include/llvm/Support/raw_ostream.h:17: >> In file included from llvm/include/llvm/ADT/StringRef.h:13: >> llvm/include/llvm/Support/type_traits.h:20:10: fatal error: >> 'llvm/Support/DataTypes.h' file not found >> #include "llvm/Support/DataTypes.h" >> ^ >> 1 error generated. >> >> $ clang++ -I llvm/tools/clang/include/ tutorial1.cpp >> tutorial1.cpp:5:10: fatal error: 'llvm/Support/raw_ostream.h' file not found >> #include "llvm/Support/raw_ostream.h" >> ^ >> 1 error generated. >> >> Any help you can provide is very much appreciated. >> >> ------------------------------------------------------------------------ >> *From:* Ashok Nalkund <ashoknn at qualcomm.com> >> *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com>; "llvmdev at cs.uiuc.edu" >> <llvmdev at cs.uiuc.edu> >> *Sent:* Monday, July 9, 2012 3:30 PM >> *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial >> >> Use the -I<install path>/include . >> >> This directory <install path>/include should look something like: >> >> clang/ clang-c/ llvm/ llvm-c/ >> >> HTH >> ashok >> >> On 7/9/2012 3:15 PM, NY Knicks Fan wrote: >>> I downloaded the 3.1 LLVM and Clang sources. >>> >>> I followed the directions at: http://clang.llvm.org/get_started.html >>> >>> I am able to use Clang to compile stuff, but I could already do that >>> with GCC. >>> >>> I'm trying to use Clang for parsing code, but I can't even get started. >>> >>> Can you tell me how to "include the installed location ofclang/llvm >>> headers directories in your include path"? >>> >>> Thanks! >>> >>> >>> ------------------------------------------------------------------------ >>> *From:* Ashok Nalkund <ashoknn at qualcomm.com >> <mailto:ashoknn at qualcomm.com>> >>> *To:* NY Knicks Fan <nyknicksfan92009 at yahoo.com >> <mailto:nyknicksfan92009 at yahoo.com>> >>> *Cc:* Chad Rosier <mcrosier at apple.com <mailto:mcrosier at apple.com>>; >> "llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>" >>> <llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>> >>> *Sent:* Monday, July 9, 2012 2:39 PM >>> *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial >>> >>> On 7/9/2012 1:42 PM, Chad Rosier wrote: >>>> Have you looked here: http://clang.llvm.org/get_started.html >>>> >>>> Chad >>>> >>>> >>>> On Jul 9, 2012, at 11:33 AM, NY Knicks Fan wrote: >>>> >>>>> I'm trying to do the tutorials at: >>>>> >>>>> https://github.com/loarabia/Clang-tu...i/TutorialOrig >>>>> <https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig> >>>>> >>>>> and I can't even do the first tutorial. I installed LLVM 3.1 and >> Clang >>>>> 3.1 and when I do: >>>>> >>>>> ~/loarabia-Clang-tutorial-3d79443$ clang++ tutorial1.cpp In file >>>>> included from tutorial1.cpp:5: In file included from >>>>> ./llvm/Support/raw_ostream.h:17: >>>>> ./llvm/Support/llvm/ADT/StringRef.h:13:10: fatal error: >>>>> 'llvm/Support/type_traits.h' file not found >>>>> >>>>> include "llvm/Support/type_traits.h" >>>>> ^ >>>>> 1 error generated. >>>>> >>>>> Do you know what I am doing wrong? I'm not sure what is the best way >>>>> to handle this header file problem. >>>>> >>>>> I'm running Ubuntu 12.04. >>>>> >>>>> Thank you. >>> >>> Did you build it or "install" it from a package? If you build it, then >>> you need do a 'make install' and include the installed location of >>> clang/llvm headers directories in your include path. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> >> http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/> >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120709/5f5f6c03/attachment.html>