Menu

Issues Compiling 1.67

ReKa
2014-12-02
2015-02-28
  • ReKa

    ReKa - 2014-12-02

    I have issues compiling cppcheck 1.67 (gcc 4.6.3, Ubuntu 12.04).

    g++ -Ilib -Iexternals/tinyxml -DCFGDIR=\"cfg\" -include lib/cxx11emu.h -pedantic -Wall -Wextra -Wabi -Wcast-qual -Wconversion -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wshadow -Wsign-promo -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -D_GLIBCXX_DEBUG -g -DHAVE_RULES -DTIXML_USE_STL -std=c++0x -c -o build/executionpath.o build/executionpath.cpp
    In file included from /usr/include/c++/4.6/memory:85:0,
    from build/executionpath.cpp:299:
    /usr/include/c++/4.6/bits/unique_ptr.h: In constructor 'constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr()':
    /usr/include/c++/4.6/bits/unique_ptr.h:117:59: error: constexpr constructor does not have empty body

    Rest of the messages are similar. It's certainly no issue with the (system) include files, but I don't find exactly the part of the code causing this issue.

    It could potentially be a conflict with the enforced stdc++11 (at the time of this gcc release still in development). Could it be possible to compile this cppcheck version without stdc++11 ? Or am I forced to go back to an older version ?

    Note that I can neither switch to a newer Ubuntu or a newer gcc. This is a predefined development setting.

     

    Last edit: ReKa 2014-12-02
    • ReKa

      ReKa - 2014-12-04

      The easiest solution to my issue is to use gcc-4.8 that can be fetched from
      https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

      It might break parts of your system however, but for a single build of cppcheck and afterwards removal of gcc (only the compilers! check with ldd the required gcc libs of cppcheck). I luckily can leave the new gcc on my system.

       
  • Daniel Marjamäki

    good that you fixed your problems.

    as far as I know it should be possible to compile with gcc-4.6 but some tweak might be needed.

    I've compiled the democlient with gcc 4.4.7. I needed these tweaks:
    sed -i 's/template<typename T="">//' lib/token.h
    sed -i 's/T&&/const std::string/' lib/token.h

     
  • Alexander Mai

    Alexander Mai - 2015-02-28

    See http://trac.cppcheck.net/ticket/5929 for a related ticket.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.