I'm trying to compile clang with GCC 4.4.1 (Fedora 11 system compiler), and I get compilation failures.
Some appear to be resolved with the attached patch, but this one I have no idea to fix:
/home/stefan/projects/llvm/include/llvm/Support/GraphWriter.h:92: error: no matching function for call to ‘llvm::DOTGraphTraits<const clang::Stmt*>::DOTGraphTraits(bool&)’
StmtViz.cpp:32: note: candidates are: llvm::DOTGraphTraits<const clang::Stmt*>::DOTGraphTraits(const llvm::DOTGraphTraits<const clang::Stmt*>&)
StmtViz.cpp:32: note: llvm::DOTGraphTraits<const clang::Stmt*>::DOTGraphTraits()
...
/home/stefan/projects/llvm/include/llvm/Support/GraphWriter.h:144: error: no matching function for call to ‘llvm::DOTGraphTraits<const clang::Stmt*>::getNodeLabel(const clang::Stmt*&, const clang::Stmt* const&)’
StmtViz.cpp:33: note: candidates are: static std::string llvm::DOTGraphTraits<const clang::Stmt*>::getNodeLabel(const clang::Stmt*, const clang::Stmt*, bool)
...
/home/stefan/projects/llvm/include/llvm/Support/GraphWriter.h:164: error: no matching function for call to ‘llvm::DOTGraphTraits<const clang::Stmt*>::getNodeLabel(const clang::Stmt*&, const clang::Stmt* const&)’
StmtViz.cpp:33: note: candidates are: static std::string llvm::DOTGraphTraits<const clang::Stmt*>::getNodeLabel(const clang::Stmt*, const clang::Stmt*, bool)
Is trunk in the middle of an API change ?
I'm also seeing compilation failures in llvm proper, which I'm working around with "make -C tools/clang".
I get
llvm[2]: Compiling AsmMatcherEmitter.cpp for Debug build
In file included from AsmMatcherEmitter.cpp:78:
Record.h: In constructor ‘llvm::VarBitInit::VarBitInit(llvm::TypedInit*, unsigned int)’:
Record.h:973: error: ‘dynamic_cast’ not permitted with -fno-rtti
How I can instruct the build system to print out the compiler command line ? And why does it want to compile with -fno-rtti, when the code actually requires it ?
Thanks,
Stefan
patch (2.33 KB)
Can you try building LLVM+clang with a clean tree? This looks like
something is going very wrong in the configuration.
-Eli
How do I do that ? I tried 'make clean', then './configure', then 'make', and I see the same issue with -fno-rtti again.
Skipping to clang, via 'make -C tools/clang', I now see this error:
make[3]: *** No rule to make target `/home/stefan/projects/llvm/tools/clang/include/clang/Basic/Debug/DiagnosticAnalysisKinds.inc.tmp', needed by `DiagnosticAnalysisKinds.inc'. Stop.
Thanks,
Stefan
Really? Can you try with a completely fresh checkout? The make
system is supposed to make sure we pass -frtti for that code.
-Eli
Same error. Here are the steps:
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools && svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ..
./configure
make
Is there a way to make the build system print out what it is doing ? That may help me debug this, by finding out where the -fno-rtti option is generated.
Thanks,
Stefan
I'm trying to compile clang with GCC 4.4.1 (Fedora 11 system compiler), and I get compilation failures.
Some appear to be resolved with the attached patch, but this one I have no idea to fix:
[...]
How I can instruct the build system to print out the compiler command line ? And why does it want to compile with -fno-rtti, when the code actually requires it ?
Ping ?
I'd really like to get started, but right now something is quite broken in my llvm source tree, yet I can't figure out what.
Unfortunately, I didn't even find any build instructions that may help me find my way around. What am I supposed to do ?
As I mentioned, I ran './configure' and 'make', resulting in the reported issue with -fno-rtti.
Attempting to build only the clang sub-component, via `make -C tools/clang`, results in this error:
make[3]: *** No rule to make target `/home/stefan/projects/llvm/tools/clang/include/clang/Basic/Debug/DiagnosticAnalysisKinds.inc.tmp', needed by `DiagnosticAnalysisKinds.inc'. Stop.
So something seems fundamentally wrong. Could someone please help ?
Is the build system described somewhere ? How can I debug it, to figure out where the rogue -fno-rtti option is coming from, and why that .tmp file might be missing ?
Thanks,
Stefan
Can you try building LLVM+clang with a clean tree? This looks like
something is going very wrong in the configuration.
How do I do that ? I tried 'make clean', then './configure', then 'make',
and I see the same issue with -fno-rtti again.
Really? Can you try with a completely fresh checkout? The make
system is supposed to make sure we pass -frtti for that code.
Same error. Here are the steps:
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools && svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ..
./configure
make
Is there a way to make the build system print out what it is doing ?
That may help me debug this, by finding out where the -fno-rtti option
is generated.
You can use 'make VERBOSE=1' to show what make is actually doing.
- Daniel
Thanks, that helps a lot.
I just made the observation that when I invoke "make", I get the -fno-rtti error in utils/TableGen/. However, if I do `make -C utils/TableGen/`, everything works. This suggests that one of the outer Makefiles exports either the CXXFLAGS, or the REQUIRES_RTTI variable, overriding what utils/TableGen/Makefile provides itself.
FWIW, I'm using GNU make 3.8.1.
(I can now work around this issue by disabling the -fno-rtti flag in Makefile.rules.)
Thanks,
Stefan