[LLVMdev] First Pass at building dragon egg-3.3 for clang 3.3 - using gcc-4.7
Lou Picciano
loupicciano at comcast.net
Thu Jul 25 06:47:18 PDT 2013
Duncan,
Many thanks for your comments.
The core issue we're running into is this:
$ GCC=/usr/bin/gcc LLVM_CONFIG=/usr/bin/llvm-config make
Compiling utils/TargetInfo.cpp
Linking TargetInfo
ld: fatal: library -lLLVMSupport: not found
ld: fatal: file processing errors. No output written to TargetInfo
collect2: error: ld returned 1 exit statusAll other gyrations are attempts to shoehorn LLVMSupport into the compile. I've been sourcing the Makefile and README for hints.
To your point on declaring the location of gcc: Oddly, though gcc (4.7) is available to the environment, the Makefile does not find it without explicit direction:
dragonegg-3.3.src$ make
make: cc: Command not foundThanks in advance, Lou Picciano
(and apologies for the top posting; crappy email client)
On 25/07/13 04:38, Lou Picciano wrote:
> LLVM Friends,
>
> First time attempting a build of dragonegg, using our shiny new install of
> clang-3.3. I'm clearly off to a terrifying start!
>
>
> dragonegg-3.3.src$ CXX=/usr/bin/gcc
This says to compile using gcc
GCC=/usr/bin/gcc
This says that the plugin will be used with /usr/bin/gcc when built.
ENABLE_LLVM_PLUGINS=1
> LLVM_CONFIG=/usr/bin/llvm-config
CFLAGS=-I/usr/clang/3.3/lib/clang/3.3/include
> CXXFLAGS="-I/usr/clang/3.3/lib/clang/3.3/include"
These say to use clang headers. Not sure why you want to use clang headers when
compiling using gcc.
make
>
> Compiling utils/TargetInfo.cpp
> In file included from /usr/clang/3.3/include/llvm/Support/DataTypes.h:67:0,
> from /usr/clang/3.3/include/llvm/Support/type_traits.h:20,
> from /usr/clang/3.3/include/llvm/ADT/StringRef.h:13,
> from /usr/clang/3.3/include/llvm/ADT/Twine.h:13,
> from /usr/clang/3.3/include/llvm/ADT/Triple.h:13,
> from
> /home/drlou/Downloads/dragonegg-3.3.src/utils/TargetInfo.cpp:23:
> /usr/clang/3.3/lib/clang/3.3/include/stdint.h:32:54: error: missing binary
> operator before token "("
This seems to be saying that gcc doesn't like the clang headers. I suggest you
don't use them.
Anyway, not sure why you are trying to do this so complicated, doesn't this
work:
make
?
Other comments:
CXX is for providing a C++ compiler, so should be g++ not gcc
Since /usr/bin/gcc is in your path, probably you don't need CXX to force this
compiler (or did you put clang in front of it in your path?; if so it still
shouldn't be needed since clang can also compile dragonegg)
GCC=/usr/bin/gcc is probably not needed, since it is the default
Ciao, Duncan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130725/0d6f4509/attachment.html>
More information about the llvm-dev
mailing list