Dear Cling developers,
I am having a hard time trying to compile llvm/clang/cling.
Here’s what I did:
svn co -r 179269 http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co -r 179269 http://llvm.org/svn/llvm-project/cfe/trunk clang
svn co http://root.cern.ch/svn/root/trunk/interpreter/cling cling
cd ..
cat tools/cling/patches/*.diff | patch -p0
mkdir build && cd build
../configure --prefix=/home/xxx/repository/libraries/llvm --enable-optimized --enable-targets=host
make
Please note that without cling and applying the patches everything compiles just fine.
Trying to manually add the necessary includes yields in consecutive compile errors.
uname -a
Linux mint 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Do you have advice for me?
Thanks in advance.
Completely forgot the compiler error:
llvm[4]: Compiling ParseCXXInlineMethods.cpp for Release+Asserts build
/home/xxx/repository/libraries/.build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp: In member function ‘clang::NamedDecl* clang::Parser::ParseCXXInlineMethodDef(clang::AccessSpecifier, clang::AttributeList*, clang::ParsingDeclarator&, const clang::Parser::ParsedTemplateInfo&, const clang::VirtSpecifiers&, clang::FunctionDefinitionKind, clang::Parser::ExprResult&)’:
/home/xxx/repository/libraries/.build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:39:3: error: invalid use of incomplete type ‘struct clang::ParsingDeclarator’
/home/xxx/repository/libraries/.build/llvm/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h:41:9: error: forward declaration of ‘struct clang::ParsingDeclarator’
Best regards
I’ve managed to build Cling.
One of the patches deleted all content of “tools/clang/lib/Parse/RAIIObjectsForParser.h” but the file itself remained at its old location. Obviously the preprocessor took this file.
Deleting file “tools/clang/lib/Parse/RAIIObjectsForParser.h” worked for me.
Thanks a lot for this great tool and best regards