Bug 354540 - Clazy didn't work, always crashed. What i am doing wrong?
Summary: Clazy didn't work, always crashed. What i am doing wrong?
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-29 08:47 UTC by krab
Modified: 2015-11-01 14:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krab 2015-10-29 08:47:51 UTC
I tested on Ubuntu 15.10 and openSUSE Leap. 

Building on openSUSE fine. On ubuntu with official packages `"unknown symbol _ZNK5clang15DeclarationName11getAsStringEv".` 

**Tested on ubuntu with prebuild clang from llvm.org:**

    export CC=/opt/clang37/bin/clang
    export CXX=/opt/clang37/bin/clang++
    cmake .. -DCMAKE_INSTALL_PREFIX=/opt/clang37 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/clang37/
    make
    sudo make install
    
    export CLAZY_CHECKS="all_checks"
    qmake ../vacuum.pro -r INSTALL_PREFIX=/opt/dev_qt5 CONFIG-=release CONFIG+=debug -spec linux-clang QMAKE_CXXFLAGS+="-std=c++11 -Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy" QMAKE_CC=/opt/clang37/bin/clang QMAKE_CXX=/opt/clang37/bin/clang++
    make
    
    /opt/clang37/bin/clang++ -c -pipe -std=c++11 -Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy -O2 -fPIC -w -D_REENTRANT -DPLUGINS_DIR=\"../lib/vacuum/plugins\" -DRESOURCES_DIR=\"../share/vacuum/resources\" -DTRANSLATIONS_DIR=\"../share/vacuum/translations\" -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../src/thirdparty/qtlockedfile -I/home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I/home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qtlockedfile.o ../../../../src/thirdparty/qtlockedfile/qtlockedfile.cpp
    terminate called after throwing an instance of 'std::bad_alloc'
      what():  std::bad_alloc
    0  clang-3.7       0x00000000013e06b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
    1  clang-3.7       0x00000000013e1a1b
    2  libpthread.so.0 0x00007f09304e9d10
    3  libc.so.6       0x00007f092f8a3267 gsignal + 55
    4  libc.so.6       0x00007f092f8a4eca abort + 362
    5  libstdc++.so.6  0x00007f092fedeb7d __gnu_cxx::__verbose_terminate_handler() + 365
    6  libstdc++.so.6  0x00007f092fedc9c6
    7  libstdc++.so.6  0x00007f092fedca11
    8  libstdc++.so.6  0x00007f092fedcc29
    9  libstdc++.so.6  0x00007f092fedd1cc
    10 ClangLazy.so    0x00007f092f626043 clang::LangOptions::LangOptions(clang::LangOptions const&) + 163
    11 ClangLazy.so    0x00007f092f62273b OldStyleConnect::OldStyleConnect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 107
    12 ClangLazy.so    0x00007f092f625d23
    13 ClangLazy.so    0x00007f092f613edf CheckManager::createCheck(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 319
    14 ClangLazy.so    0x00007f092f614e74 CheckManager::createChecks(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >) + 516
    15 ClangLazy.so    0x00007f092f64c611
    16 clang-3.7       0x000000000173b4ea clang::FrontendAction::CreateWrappedASTConsumer(clang::CompilerInstance&, llvm::StringRef) + 330
    17 clang-3.7       0x000000000173c092 clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) + 2578
    18 clang-3.7       0x000000000170d4c7 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 695
    19 clang-3.7       0x00000000017a9de3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3123
    20 clang-3.7       0x00000000006f6634 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1156
    21 clang-3.7       0x00000000006f586f main + 11983
    22 libc.so.6       0x00007f092f88ea40 __libc_start_main + 240
    23 clang-3.7       0x00000000006f2893
    Stack dump:
    0.	Program arguments: /opt/clang37/bin/clang-3.7 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-file-name qtlockedfile.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -coverage-file /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile/qtlockedfile.o -resource-dir /opt/clang37/bin/../lib/clang/3.7.0 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -D _REENTRANT -D PLUGINS_DIR="../lib/vacuum/plugins" -D RESOURCES_DIR="../share/vacuum/resources" -D TRANSLATIONS_DIR="../share/vacuum/translations" -D QT_NO_DEBUG -D QT_GUI_LIB -D QT_CORE_LIB -I ../../../../src/thirdparty/qtlockedfile -I /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -I /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -I /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/c++/5.2.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/x86_64-linux-gnu/c++/5.2.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/x86_64-linux-gnu/c++/5.2.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.2.1/../../../../include/c++/5.2.1/backward -internal-isystem /usr/local/include -internal-isystem /opt/clang37/bin/../lib/clang/3.7.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -w -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -ferror-limit 19 -fmessage-length 253 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -load ClangLazy.so -add-plugin clang-lazy -o qtlockedfile.o -x c++ ../../../../src/thirdparty/qtlockedfile/qtlockedfile.cpp 
    clang-3.7: error: unable to execute command: Aborted (core dumped)
    clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation)

**And on openSUSE Leap with clang from official repo!**

    clang++ -c -pipe -std=c++11 -Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy -g -fPIC -w -D_REENTRANT -DDEBUG_MODE -DPLUGINS_DIR=\"./plugins\" -DRESOURCES_DIR=\"/home/vm/dev/dev_qt5/src/make/../../resources\" -DTRANSLATIONS_DIR=\"./src/translations\" -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../src/thirdparty/qtlockedfile -I/home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I/home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -I/usr/lib64/qt5/mkspecs/linux-clang -o qtlockedfile.o ../../../../src/thirdparty/qtlockedfile/qtlockedfile.cpp
    terminate called after throwing an instance of 'std::regex_error'
      what():  regex_error
    #0 0x7f9d84d6c638 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/bin/../lib64/libLLVMSupport.so.3.7+0xb8638)
    #1 0x7f9d84d6d86b (/usr/bin/../lib64/libLLVMSupport.so.3.7+0xb986b)
    #2 0x7f9d83072200 __restore_rt (/lib64/libc.so.6+0x35200)
    #3 0x7f9d83072187 __GI_raise (/lib64/libc.so.6+0x35187)
    #4 0x7f9d83073538 __GI_abort (/lib64/libc.so.6+0x36538)
    #5 0x7f9d8347ab8d __gnu_cxx::__verbose_terminate_handler() (/usr/bin/../lib64/libstdc++.so.6+0x96b8d)
    #6 0x7f9d83478bf6 (/usr/bin/../lib64/libstdc++.so.6+0x94bf6)
    #7 0x7f9d83478c41 (/usr/bin/../lib64/libstdc++.so.6+0x94c41)
    #8 0x7f9d83478e58 (/usr/bin/../lib64/libstdc++.so.6+0x94e58)
    #9 0x7f9d834a0c35 std::__throw_regex_error(std::regex_constants::error_type) (/usr/bin/../lib64/libstdc++.so.6+0xbcc35)
    #10 0x7f9d7be86e11 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_atom() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2de11)
    #11 0x7f9d7be86ad0 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2dad0)
    #12 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #13 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #14 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #15 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #16 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #17 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #18 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #19 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #20 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #21 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #22 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #23 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #24 0x7f9d7be86b18 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2db18)
    #25 0x7f9d7be85154 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_disjunction() (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2c154)
    #26 0x7f9d7be84d75 std::__detail::_Compiler<char const*, std::regex_traits<char> >::_Compiler(char const* const&, char const* const&, std::regex_traits<char>&, unsigned int) (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2bd75)
    #27 0x7f9d7be849c3 std::shared_ptr<std::__detail::_Automaton> std::__detail::__compile<char const*, std::regex_traits<char> >(char const* const&, char const* const&, std::regex_traits<char>&, unsigned int) (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2b9c3)
    #28 0x7f9d7be842c8 PreprocessorCallbacks::MacroExpands(clang::Token const&, clang::MacroDefinition const&, clang::SourceRange, clang::MacroArgs const*) (/usr/bin/../lib64/../lib64/ClangLazy.so+0x2b2c8)
    #29 0x7f9d7efd0765 clang::Preprocessor::HandleMacroExpandedIdentifier(clang::Token&, clang::MacroDefinition const&) (/usr/bin/../lib64/../lib64/libclangLex.so.3.7+0x6b765)
    #30 0x7f9d7efea642 clang::Preprocessor::HandleIdentifier(clang::Token&) (/usr/bin/../lib64/../lib64/libclangLex.so.3.7+0x85642)
    #31 0x7f9d7ef8f81a clang::Lexer::LexIdentifier(clang::Token&, char const*) (/usr/bin/../lib64/../lib64/libclangLex.so.3.7+0x2a81a)
    #32 0x7f9d7ef96656 clang::Lexer::LexTokenInternal(clang::Token&, bool) (/usr/bin/../lib64/../lib64/libclangLex.so.3.7+0x31656)
    #33 0x7f9d7efead04 clang::Preprocessor::Lex(clang::Token&) (/usr/bin/../lib64/../lib64/libclangLex.so.3.7+0x85d04)
    #34 0x7f9d7e251d66 (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0x2ed66)
    #35 0x7f9d7e2cb5d5 clang::Parser::ExpectAndConsume(clang::tok::TokenKind, unsigned int, llvm::StringRef) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0xa85d5)
    #36 0x7f9d7e24ee4b clang::Parser::ParseCXXInlineMethodDef(clang::AccessSpecifier, clang::AttributeList*, clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::VirtSpecifiers const&, clang::SourceLocation) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0x2be4b)
    #37 0x7f9d7e27b8ca clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject*) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0x588ca)
    #38 0x7f9d7e277268 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int, clang::Decl*) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0x54268)
    #39 0x7f9d7e27549e clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::Parser::ParsedAttributesWithRange&) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0x5249e)
    #40 0x7f9d7e25b313 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0x38313)
    #41 0x7f9d7e2cf0b0 clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0xac0b0)
    #42 0x7f9d7e2cedd2 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0xabdd2)
    #43 0x7f9d7e2cdc9d clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0xaac9d)
    #44 0x7f9d7e2cd4da clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0xaa4da)
    #45 0x7f9d7e24e356 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib64/../lib64/libclangParse.so.3.7+0x2b356)
    #46 0x7f9d83a07e79 clang::FrontendAction::Execute() (/usr/bin/../lib64/libclangFrontend.so.3.7+0x9ce79)
    #47 0x7f9d839d3da3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib64/libclangFrontend.so.3.7+0x68da3)
    #48 0x7f9d83769073 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib64/libclangFrontendTool.so.3.7+0x3073)
    #49 0x40f9fe cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-3.7+0x40f9fe)
    #50 0x40eab6 main (/usr/bin/clang-3.7+0x40eab6)
    #51 0x7f9d8305eb05 __libc_start_main (/lib64/libc.so.6+0x21b05)
    #52 0x40bf6a _start (/usr/bin/clang-3.7+0x40bf6a)
    Stack dump:
    0.	Program arguments: /usr/bin/clang-3.7 -cc1 -triple x86_64-suse-linux -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name qtlockedfile.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -g -dwarf-column-info -coverage-file /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile/qtlockedfile.o -resource-dir /usr/bin/../lib64/clang/3.7.0 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -D _REENTRANT -D DEBUG_MODE -D PLUGINS_DIR="./plugins" -D RESOURCES_DIR="/home/vm/dev/dev_qt5/src/make/../../resources" -D TRANSLATIONS_DIR="./src/translations" -D QT_GUI_LIB -D QT_CORE_LIB -I ../../../../src/thirdparty/qtlockedfile -I /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -I /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -I /usr/lib64/qt5/mkspecs/linux-clang -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/clang/3.7.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -w -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/vm/dev/dev_qt5/build/src/thirdparty/qtlockedfile -ferror-limit 19 -fmessage-length 225 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -load ClangLazy.so -add-plugin clang-lazy -o qtlockedfile.o -x c++ ../../../../src/thirdparty/qtlockedfile/qtlockedfile.cpp 
    1.	/usr/include/qt5/QtCore/qobject.h:462:5: current parser token 'Q_PRIVATE_SLOT'
    2.	/usr/include/qt5/QtCore/qobject.h:106:1: parsing struct/union/class body 'QObject'
    clang-3.7: error: unable to execute command: Aborted
    clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation)




Reproducible: Always
Comment 1 Sergio Martins 2015-10-30 11:55:09 UTC
Hi,

Can you try and compile with clang, not clazy ?
Lets figure out if plain clang works first.
Comment 2 krab 2015-10-31 02:05:33 UTC
Yes clang works, "calendar example" from qt sources:

vm@linux:~/dev/calendar> qmake-qt5 calendar.pro -spec linux-clang
vm@linux:~/dev/calendar> make
clang++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-clang -o main.o main.cpp
clang++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-clang -o mainwindow.o mainwindow.cpp
/usr/lib64/qt5/bin/moc -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-clang -I/home/vm/dev/calendar -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/4.8 -I/usr/include/c++/4.8/x86_64-suse-linux -I/usr/include/c++/4.8/backward -I/usr/lib64/gcc/x86_64-suse-linux/4.8/include -I/usr/local/include -I/usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed -I/usr/x86_64-suse-linux/include -I/usr/include mainwindow.h -o moc_mainwindow.cpp
clang++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-clang -o moc_mainwindow.o moc_mainwindow.cpp
clang++ -ccc-gcc-name g++ -o calendar main.o mainwindow.o moc_mainwindow.o   -lQt5Widgets -L/usr/lib64 -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/ld: warning: type and size of dynamic symbol `qt_version_tag@@Qt_5.5' are not defined
vm@linux:~/dev/calendar> ls
calendar  calendar.pro  main.cpp  main.o  mainwindow.cpp  mainwindow.h  mainwindow.o  Makefile  moc_mainwindow.cpp  moc_mainwindow.o
Comment 3 krab 2015-10-31 02:08:20 UTC
Again calendar example with clazy:

vm@linux:~/dev/calendar> qmake-qt5 -spec linux-clang QMAKE_CXXFLAGS+="-Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy"

vm@linux:~/dev/calendar> make
clang++ -c -pipe -Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-clang -o main.o main.cpp
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
#0 0x7f690c8ee638 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/bin/../lib64/libLLVMSupport.so.3.7+0xb8638)
Comment 4 Sergio Martins 2015-10-31 13:32:41 UTC
Git commit 542fc447bae476c21a5d055bb439933134ad3ec1 by Sergio Martins.
Committed on 31/10/2015 at 13:31.
Pushed by smartins into branch 'master'.

Test if libstdc++ has std::regex

With some old ones there's the header but implementation doesn't work.
Disable old-style-connect if we detect such old library.

M  +48   -33   CMakeLists.txt
A  +7    -0    cmake_has_regex_test.cpp     [License: UNKNOWN]  *

The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


http://commits.kde.org/clazy/542fc447bae476c21a5d055bb439933134ad3ec1
Comment 5 Sergio Martins 2015-11-01 00:50:43 UTC
Your opensuse crash is now fixed.
Your ubuntu problem is because you're mixing the old ABI with the new ABI.
Read about the ABI breakage here: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
Comment 6 krab 2015-11-01 02:17:06 UTC
Will check opensuse later. How about `"unknown symbol _ZNK5clang15DeclarationName11getAsStringEv".`  with ubuntu's official repository clang packages?
Comment 7 krab 2015-11-01 03:06:38 UTC
opensuse works. Thanks. Also what linux distro you using (looking for distro to avoid all this "bugs").
Comment 8 Sergio Martins 2015-11-01 14:00:50 UTC
I'm using archlinux