Menu

Compile cppcheck on AIX AIX 2 7

2019-11-25
2019-11-25
  • Ivelin Vasilev

    Ivelin Vasilev - 2019-11-25

    I would like to ask you for instructions to compile from source cppcheck as user under AIX server. I don't have root rights.

     
  • Daniel Marjamäki

    which compiler do you have? Can you just run "make"?

     
  • Ivelin Vasilev

    Ivelin Vasilev - 2019-11-25

    There is gmake

    ${GNU_PATH}/bin/gmake -v
    GNU Make 3.82
    Built for rs6000-ibm-aix

    The compiler
    gcc and g++ -v
    Thread model: aix
    gcc version 4.8.5 (GCC)

     
  • Daniel Marjamäki

    so do you get some problems when compiling?

    Download https://github.com/danmar/cppcheck/archive/1.89.tar.gz
    tar xzvf 1.89.tar.gz
    cd cppcheck-1.89
    make

     
  • Ivelin Vasilev

    Ivelin Vasilev - 2019-11-25

    When I use make it throws

    "Makefile", line 4: make: Dependency line needs colon or double colon operator.
    "Makefile", line 6: make: Dependency line needs colon or double colon operator.
    "Makefile", line 9: make: Dependency line needs colon or double colon operator.
    "Makefile", line 10: make: Shell command needs a leading tab.
    "Makefile", line 12: make: Dependency line needs colon or double colon operator.
    "Makefile", line 13: make: Dependency line needs colon or double colon operator.

    When I use gmake it throws

    g++ -Ilib -isystem externals -isystem externals/simplecpp -isystem externals/tinyxml -std=c++0x -O2 -DNDEBUG -Wall -Wno-sign-compare -std=c++0x -c -o lib/analyzerinfo.o lib/analyzerinfo.cpp
    In file included from /opt/gnubox/4.8.5/lib/gcc/powerpc-ibm-aix7.2.0.0/4.8.5/include-fixed/wchar.h:44:0,
    from /opt/gnubox/4.8.5/include/c++/4.8.5/cwchar:44,
    from /opt/gnubox/4.8.5/include/c++/4.8.5/bits/postypes.h:40,
    from /opt/gnubox/4.8.5/include/c++/4.8.5/bits/char_traits.h:40,
    from /opt/gnubox/4.8.5/include/c++/4.8.5/string:40,
    from lib/config.h:29,
    from lib/analyzerinfo.h:24,
    from lib/analyzerinfo.cpp:19:
    lib/standards.h: In member function 'bool Standards::setC(const string&)':
    lib/standards.h:45:17: error: no match for 'operator==' (operand types are 'const string {aka const std::basic_string<char>}' and 'const char [4]')
    if (str == "c89" || str == "C89") {
    ^
    lib/standards.h:45:17: note: candidates are:
    In file included from /opt/gnubox/4.8.5/include/c++/4.8.5/bits/stl_algobase.h:67:0,
    from /opt/gnubox/4.8.5/include/c++/4.8.5/bits/char_traits.h:39,
    from /opt/gnubox/4.8.5/include/c++/4.8.5/string:40,
    from lib/config.h:29,
    from lib/analyzerinfo.h:24,
    from lib/analyzerinfo.cpp:19:
    /opt/gnubox/4.8.5/include/c++/4.8.5/bits/stl_iterator.h:1037:5: note: template<class _iterator=""> bool std::operator==(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
    operator==(const move_iterator<_Iterator>& __x,
    ^</class></char>

     

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.