Error while compiling Boost Statechart Viewer
Hi, I am interested about using your viewer for visualizing my boost statecharts but from some reason I can not get it succesfully compiled. I'm using Ubuntu 13.10 as OS and I have installed llvm + clang (version 3.2-20). While compiling visualizer.cpp I get following errors: make[1]: Entering directory `/home/karjsim/boost-statechart-viewer-8c02883/src' g++ -g -fno-rtti -shared -Wall -lclangParse -lclangFrontend -lclangSerialization -lclangDriver -lclangCodeGen -lclangSema -lclangAnalysis -lclangAST -lclangLex -lclangBasic -lclangEdit -I/usr/local/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual -L/usr/local/lib -lpthread -ldl -lm -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -o visualizer.so visualizer.cpp visualizer.cpp: In member function ‘void Visitor::checkAllReactMethods(const clang::CXXRecordDecl*)’: visualizer.cpp:339:16: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) { ^ visualizer.cpp:339:34: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘second’ ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) { ^ visualizer.cpp:339:53: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) { ^ visualizer.cpp:341:60: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first); ^ visualizer.cpp: In member function ‘bool Visitor::HandleCustomReaction(const clang::CXXRecordDecl*, const clang::Type*)’: visualizer.cpp:354:16: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ ReactRes.first != ReactRes.second; ++ReactRes.first) { ^ visualizer.cpp:354:34: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘second’ ReactRes.first != ReactRes.second; ++ReactRes.first) { ^ visualizer.cpp:354:53: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ ReactRes.first != ReactRes.second; ++ReactRes.first) { ^ visualizer.cpp:355:67: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ if (CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first)) { ^ visualizer.cpp:371:19: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ Diag((*ReactRes.first)->getSourceRange().getBegin(), diag_warning) ^ visualizer.cpp:372:21: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’ << (*ReactRes.first)->getDeclKindName() << "is not supported as react method"; ^ visualizer.cpp: In member function ‘void Visitor::handleSimpleState(clang::CXXRecordDecl*, const clang::CXXBaseSpecifier*)’: visualizer.cpp:516:17: error: ‘clang::DeclContext::lookup_result’ has no member named ‘first’ Reactions.first != Reactions.second; ++Reactions.first, typedef_num++) ^ visualizer.cpp:516:36: error: ‘clang::DeclContext::lookup_result’ has no member named ‘second’ Reactions.first != Reactions.second; ++Reactions.first, typedef_num++) ^ visualizer.cpp:516:56: error: ‘clang::DeclContext::lookup_result’ has no member named ‘first’ Reactions.first != Reactions.second; ++Reactions.first, typedef_num++) ^ visualizer.cpp:517:32: error: ‘clang::DeclContext::lookup_result’ has no member named ‘first’ HandleReaction(*Reactions.first, RecordDecl); ^ In file included from /usr/local/include/llvm/ADT/IntrusiveRefCntPtr.h:24:0, from /usr/local/include/llvm/Support/FileSystem.h:30, from /usr/local/include/llvm/Support/raw_ostream.h:20, from visualizer.cpp:28: /usr/local/include/llvm/Support/Casting.h: In instantiation of ‘static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = clang::ElaboratedTypeLoc; From = clang::TypeLoc; Enabler = void]’: /usr/local/include/llvm/Support/Casting.h:98:41: required from ‘static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::ElaboratedTypeLoc; From = clang::TypeLoc]’ /usr/local/include/llvm/Support/Casting.h:124:44: required from ‘static bool llvm::isa_impl_wrap<To, FromTy, FromTy>::doit(const FromTy&) [with To = clang::ElaboratedTypeLoc; FromTy = const clang::TypeLoc*]’ /usr/local/include/llvm/Support/Casting.h:116:77: required from ‘static bool llvm::isa_impl_wrap<To, From, SimpleFrom>::doit(const From&) [with To = clang::ElaboratedTypeLoc; From = const clang::TypeLoc* const; SimpleFrom = const clang::TypeLoc*]’ /usr/local/include/llvm/Support/Casting.h:136:78: required from ‘bool llvm::isa(const Y&) [with X = clang::ElaboratedTypeLoc; Y = const clang::TypeLoc*]’ /usr/local/include/llvm/Support/Casting.h:277:20: required from ‘typename llvm::cast_retty<X, Y*>::ret_type llvm::dyn_cast(Y*) [with X = clang::ElaboratedTypeLoc; Y = const clang::TypeLoc; typename llvm::cast_retty<X, Y*>::ret_type = const clang::ElaboratedTypeLoc*]’ visualizer.cpp:438:66: required from here /usr/local/include/llvm/Support/Casting.h:55:28: error: ‘classof’ is not a member of ‘clang::ElaboratedTypeLoc’ return To::classof(&Val); ^ /usr/local/include/llvm/Support/Casting.h: In instantiation of ‘static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = clang::TemplateSpecializationTypeLoc; From = clang::TypeLoc; Enabler = void]’: /usr/local/include/llvm/Support/Casting.h:98:41: required from ‘static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::TemplateSpecializationTypeLoc; From = clang::TypeLoc]’ /usr/local/include/llvm/Support/Casting.h:124:44: required from ‘static bool llvm::isa_impl_wrap<To, FromTy, FromTy>::doit(const FromTy&) [with To = clang::TemplateSpecializationTypeLoc; FromTy = const clang::TypeLoc*]’ /usr/local/include/llvm/Support/Casting.h:116:77: required from ‘static bool llvm::isa_impl_wrap<To, From, SimpleFrom>::doit(const From&) [with To = clang::TemplateSpecializationTypeLoc; From = const clang::TypeLoc* const; SimpleFrom = const clang::TypeLoc*]’ /usr/local/include/llvm/Support/Casting.h:136:78: required from ‘bool llvm::isa(const Y&) [with X = clang::TemplateSpecializationTypeLoc; Y = const clang::TypeLoc*]’ /usr/local/include/llvm/Support/Casting.h:277:20: required from ‘typename llvm::cast_retty<X, Y*>::ret_type llvm::dyn_cast(Y*) [with X = clang::TemplateSpecializationTypeLoc; Y = const clang::TypeLoc; typename llvm::cast_retty<X, Y*>::ret_type = const clang::TemplateSpecializationTypeLoc*]’ visualizer.cpp:440:96: required from here /usr/local/include/llvm/Support/Casting.h:55:28: error: ‘classof’ is not a member of ‘clang::TemplateSpecializationTypeLoc’ make[1]: *** [visualizer.so] Error 1 Could you please help me to get viewer compiled ? -Simo
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Simo, I believe I had the same, you need to use clang 3.1 (from branches/release_31) Regards, Slava On 28.11.2013 10:13, Simo Karjalainen wrote:
Hi,
I am interested about using your viewer for visualizing my boost statecharts but from some reason I can not get it succesfully compiled. I'm using Ubuntu 13.10 as OS and I have installed llvm + clang (version 3.2-20).
While compiling visualizer.cpp I get following errors:
make[1]: Entering directory `/home/karjsim/boost-statechart-viewer-8c02883/src' g++ -g -fno-rtti -shared -Wall -lclangParse -lclangFrontend -lclangSerialization -lclangDriver -lclangCodeGen -lclangSema -lclangAnalysis -lclangAST -lclangLex -lclangBasic -lclangEdit -I/usr/local/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual -L/usr/local/lib -lpthread -ldl -lm -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -o visualizer.so visualizer.cpp visualizer.cpp: In member function ?void Visitor::checkAllReactMethods(const clang::CXXRecordDecl*)?: visualizer.cpp:339:16: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) { ^ visualizer.cpp:339:34: error: ?clang::DeclContext::lookup_const_result? has no member named ?second? ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) { ^ visualizer.cpp:339:53: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) { ^ visualizer.cpp:341:60: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first); ^ visualizer.cpp: In member function ?bool Visitor::HandleCustomReaction(const clang::CXXRecordDecl*, const clang::Type*)?: visualizer.cpp:354:16: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? ReactRes.first != ReactRes.second; ++ReactRes.first) { ^ visualizer.cpp:354:34: error: ?clang::DeclContext::lookup_const_result? has no member named ?second? ReactRes.first != ReactRes.second; ++ReactRes.first) { ^ visualizer.cpp:354:53: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? ReactRes.first != ReactRes.second; ++ReactRes.first) { ^ visualizer.cpp:355:67: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? if (CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first)) { ^ visualizer.cpp:371:19: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? Diag((*ReactRes.first)->getSourceRange().getBegin(), diag_warning) ^ visualizer.cpp:372:21: error: ?clang::DeclContext::lookup_const_result? has no member named ?first? << (*ReactRes.first)->getDeclKindName() << "is not supported as react method"; ^ visualizer.cpp: In member function ?void Visitor::handleSimpleState(clang::CXXRecordDecl*, const clang::CXXBaseSpecifier*)?: visualizer.cpp:516:17: error: ?clang::DeclContext::lookup_result? has no member named ?first? Reactions.first != Reactions.second; ++Reactions.first, typedef_num++) ^ visualizer.cpp:516:36: error: ?clang::DeclContext::lookup_result? has no member named ?second? Reactions.first != Reactions.second; ++Reactions.first, typedef_num++) ^ visualizer.cpp:516:56: error: ?clang::DeclContext::lookup_result? has no member named ?first? Reactions.first != Reactions.second; ++Reactions.first, typedef_num++) ^ visualizer.cpp:517:32: error: ?clang::DeclContext::lookup_result? has no member named ?first? HandleReaction(*Reactions.first, RecordDecl); ^ In file included from /usr/local/include/llvm/ADT/IntrusiveRefCntPtr.h:24:0, from /usr/local/include/llvm/Support/FileSystem.h:30, from /usr/local/include/llvm/Support/raw_ostream.h:20, from visualizer.cpp:28: /usr/local/include/llvm/Support/Casting.h: In instantiation of ?static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = clang::ElaboratedTypeLoc; From = clang::TypeLoc; Enabler = void]?: /usr/local/include/llvm/Support/Casting.h:98:41: required from ?static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::ElaboratedTypeLoc; From = clang::TypeLoc]? /usr/local/include/llvm/Support/Casting.h:124:44: required from ?static bool llvm::isa_impl_wrap<To, FromTy, FromTy>::doit(const FromTy&) [with To = clang::ElaboratedTypeLoc; FromTy = const clang::TypeLoc*]? /usr/local/include/llvm/Support/Casting.h:116:77: required from ?static bool llvm::isa_impl_wrap<To, From, SimpleFrom>::doit(const From&) [with To = clang::ElaboratedTypeLoc; From = const clang::TypeLoc* const; SimpleFrom = const clang::TypeLoc*]? /usr/local/include/llvm/Support/Casting.h:136:78: required from ?bool llvm::isa(const Y&) [with X = clang::ElaboratedTypeLoc; Y = const clang::TypeLoc*]? /usr/local/include/llvm/Support/Casting.h:277:20: required from ?typename llvm::cast_retty<X, Y*>::ret_type llvm::dyn_cast(Y*) [with X = clang::ElaboratedTypeLoc; Y = const clang::TypeLoc; typename llvm::cast_retty<X, Y*>::ret_type = const clang::ElaboratedTypeLoc*]? visualizer.cpp:438:66: required from here /usr/local/include/llvm/Support/Casting.h:55:28: error: ?classof? is not a member of ?clang::ElaboratedTypeLoc? return To::classof(&Val); ^ /usr/local/include/llvm/Support/Casting.h: In instantiation of ?static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = clang::TemplateSpecializationTypeLoc; From = clang::TypeLoc; Enabler = void]?: /usr/local/include/llvm/Support/Casting.h:98:41: required from ?static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::TemplateSpecializationTypeLoc; From = clang::TypeLoc]? /usr/local/include/llvm/Support/Casting.h:124:44: required from ?static bool llvm::isa_impl_wrap<To, FromTy, FromTy>::doit(const FromTy&) [with To = clang::TemplateSpecializationTypeLoc; FromTy = const clang::TypeLoc*]? /usr/local/include/llvm/Support/Casting.h:116:77: required from ?static bool llvm::isa_impl_wrap<To, From, SimpleFrom>::doit(const From&) [with To = clang::TemplateSpecializationTypeLoc; From = const clang::TypeLoc* const; SimpleFrom = const clang::TypeLoc*]? /usr/local/include/llvm/Support/Casting.h:136:78: required from ?bool llvm::isa(const Y&) [with X = clang::TemplateSpecializationTypeLoc; Y = const clang::TypeLoc*]? /usr/local/include/llvm/Support/Casting.h:277:20: required from ?typename llvm::cast_retty<X, Y*>::ret_type llvm::dyn_cast(Y*) [with X = clang::TemplateSpecializationTypeLoc; Y = const clang::TypeLoc; typename llvm::cast_retty<X, Y*>::ret_type = const clang::TemplateSpecializationTypeLoc*]? visualizer.cpp:440:96: required from here /usr/local/include/llvm/Support/Casting.h:55:28: error: ?classof? is not a member of ?clang::TemplateSpecializationTypeLoc? make[1]: *** [visualizer.so] Error 1
Could you please help me to get viewer compiled ?
-Simo
_______________________________________________ Boost-statechart-viewer mailing list Boost-statechart-viewer@rtime.felk.cvut.cz http://rtime.felk.cvut.cz/mailman/listinfo/boost-statechart-viewer
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSl0hQAAoJEMqmnBSIOo9Rk00QAOB/u59ojHK3KjN0kbAy9Lgr bCgs7ccw4RFBXuVlqwKoLpD7xVPFZaPiXsVlUPmTr17qsGFCu2ZNz0Gf+I2l4o4c s/2Y5ZdF3qLszm5MZvcxYQbzzRX6bAymDHf/KsmAkoiOFf47mG5ErzZ1EqIQVev8 heOGiu3BTo+n49w/3yZNYUb+qVrHpJSuj1JD1190yZCBLOteMykIn4i43fwvA04J 262Fumfc9+DBj05dI/TJGEPplIU8AMXV5XdCL+1WAnK4eL8NimKHgabyhX0D9rPQ IH4e8sfnveIkqTGZ/VPzB5L+Q1YyG2GV5tfzcHllx90u5T2joQdTFneChKthoxzY WvTU9aHYTRLeOlRLXYObHavDAPzBbFQg9xsYlLtDRID3LffUfE69FiIAcfbVxyAB GEI5QIgLxWcGGea3dHxOxLfhEYkXytunSqR1L6iutj1kL4xOFgPySP5NKBop4JrB pwkqV8CDf59fW8nf4rqn1OphP94CQtQwAMWUIw7ZXmyPqBFoNH1kucH5ssRVqFFM zUuukBd6JD9vJMzHsEMH8uy4hE72MK/fsKW9K0AhVOFAapCcVDTcr/nAYcxRCbwU YLpkT2rA6jO3rObLxhuDHreVSFIcnqPGQRoAo+H2qeIOydDDw8Iy76y1uAzRuEh4 fijzxHzQN+2mvZnx/fj9 =90RF -----END PGP SIGNATURE-----
participants (2)
-
Simo Karjalainen
-
Viatcheslav.Sysoltsev