Hendrik Boom
2008-Jun-02 17:10 UTC
[LLVMdev] The first two lines of llvm tutorial don't compile.
On Mon, 02 Jun 2008 09:52:16 -0700, Thomas Hudson wrote:> You need to use the script 'llvm-config' to pass correct arguments to g > ++: > > g++ -o broken.o `llvm-config --cxxflags` broken.cpp > >Interesting. When I type the command as you provided it (using cut-and-paste) I get: hendrik at lovesong:~/dv/lang/hlvm$ g++ -o broken.o `llvm-config --cxxflags` broken.cpp g++: (Debian: No such file or directory g++: 2.2-7): No such file or directory hendrik at lovesong:~/dv/lang/hlvm$ So I execute the script by itself, and get hendrik at lovesong:~/dv/lang/hlvm$ llvm-config --cxxflags -I/usr/include/llvm -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2 -fomit-frame-pointer -DLLVM_DEBIAN_INFO= (Debian 2.2-7) -Woverloaded-virtual hendrik at lovesong:~/dv/lang/hlvm$ Putting that output into the command, and removing the -DLLVM_DEBIAN_INFO= (Debian 2.2-7) from it, things work as well as one might expect for a program without main(): hendrik at lovesong:~/dv/lang/hlvm$ g++ -o broken.o -I/usr/include/llvm -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2 -fomit-frame-pointer -Woverloaded-virtual broken.cpp/usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status hendrik at lovesong:~/dv/lang/hlvm$ Do you suppose a bug should be logged against the Debian package? -- hendrik
Owen Anderson
2008-Jun-02 17:47 UTC
[LLVMdev] The first two lines of llvm tutorial don't compile.
On Jun 2, 2008, at 10:10 AM, Hendrik Boom wrote:> On Mon, 02 Jun 2008 09:52:16 -0700, Thomas Hudson wrote: > > So I execute the script by itself, and get > > > hendrik at lovesong:~/dv/lang/hlvm$ llvm-config --cxxflags > -I/usr/include/llvm -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS - > O2 -fomit-frame-pointer -DLLVM_DEBIAN_INFO= (Debian 2.2-7) - > Woverloaded-virtual > hendrik at lovesong:~/dv/lang/hlvm$ > > > Putting that output into the command, and removing the > -DLLVM_DEBIAN_INFO= (Debian 2.2-7) from it, things work > as well as one might expect for a program without main(): >I've seen this (or something similar) happen before on Darwin. The issue is that something, either inside llvm-config or in the script that generates llvm-config should be putting quotes around the parameters in quotes. --Owen
Thomas Hudson
2008-Jun-02 17:55 UTC
[LLVMdev] The first two lines of llvm tutorial don't compile.
On Mon, 2008-06-02 at 17:10 +0000, Hendrik Boom wrote:> Do you suppose a bug should be logged against the Debian package? >Looks that way. I build LLVM from subversion on my Ubuntu desktop and I don't see that flag: thudson at thudson:~$ llvm-config --cxxflags -I/usr/local/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -Woverloaded-virtual
Hendrik Boom
2008-Jun-02 18:34 UTC
[LLVMdev] The first two lines of llvm tutorial don't compile.
On Mon, 02 Jun 2008 10:55:57 -0700, Thomas Hudson wrote:> On Mon, 2008-06-02 at 17:10 +0000, Hendrik Boom wrote: >> Do you suppose a bug should be logged against the Debian package? >> > Looks that way. I build LLVM from subversion on my Ubuntu desktop and I > don't see that flag: > > thudson at thudson:~$ llvm-config --cxxflags -I/usr/local/include -D_DEBUG > -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer > -Woverloaded-virtualOK. Done. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484153 -- hendrik
Anton Korobeynikov
2008-Jun-03 15:34 UTC
[LLVMdev] The first two lines of llvm tutorial don't compile.
> The Debian package llvm-dev also appears to be lacking the IRBuilder.h > include file!Right, because Debian includes llvm 2.2 and file was renamed after 2.2 release. Tutorial reflects LLVM TOT. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
Hendrik Boom
2008-Jun-03 16:24 UTC
[LLVMdev] The first two lines of llvm tutorial don't compile.
On Tue, 03 Jun 2008 19:34:33 +0400, Anton Korobeynikov wrote:> Debian includes llvm 2.2 and file was renamed after 2.2 release. > Tutorial reflects LLVM TOT.And I was using the online documentation instead of the Debian llvm-doc package, which has a link to /usr/share/doc/llvm-doc/html/tutorial/, but the file does not exist. -- hendrik
Maybe Matching Threads
- [LLVMdev] The first two lines of llvm tutorial don't compile.
- [LLVMdev] The first two lines of llvm tutorial don't compile.
- [LLVMdev] Problems with iterator.h
- [LLVMdev] The first two lines of llvm tutorial don't compile.
- [LLVMdev] ExecutionEngine::create returns 0