Compilation failing when performing codecheck

Create issue
Issue #62 new
João André created an issue

I’m trying to compile ‘ignition-cmake’ and compilation failing with

[ 15%] Performing codecheck step for 'core_no_deps_Debug'
Scanning dependencies of target codecheck
make[6]: *** [CMakeFiles/codecheck.dir/build.make:59: CMakeFiles/codecheck] Error 1
make[5]: *** [CMakeFiles/Makefile2:142: CMakeFiles/codecheck.dir/all] Error 2
make[4]: *** [CMakeFiles/Makefile2:149: CMakeFiles/codecheck.dir/rule] Error 2
make[3]: *** [Makefile:201: codecheck] Error 2
make[2]: *** [examples/CMakeFiles/core_no_deps_Debug.dir/build.make:124: examples/core_no_deps_Debug-prefix/src/core_no_deps_Debug-stamp/core_no_deps_Debug-codecheck] Error 2
make[1]: *** [CMakeFiles/Makefile2:1232: examples/CMakeFiles/core_no_deps_Debug.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

The output does not give me any information as to what exactly is failing?

I’m building this on Archlinux though the AUR’s PKGBUILD file (archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ignition-cmake).

Comments (9)

  1. Steve Peters

    if I look at the file at the following path relative to the cmake build folder: examples/core_child_Debug-prefix/src/core_child_Debug-build/CMakeFiles/codecheck.dir/build.make, I see on line 59 an invocation of python. Do you have python on your system?

  2. João André reporter

    In fact, running that specific line on a command promt does not output any error (or anything at all), but that can really tell anything.

  3. mjbogusz

    I’ve hit this problem too.

    I haven't found anything obvious in neither the cmake scripts nor the cpplint.py, but do you - by any chance - assume a specific version of Python, especially 2.x?

    On Arch (and some others) the default python is really python3. IMO you should call python2 or python3 explicitly (cross-distro compatibility + future-proofing + PEP20#2), especially considering the 2’s imminent EOL.

  4. João André reporter

    No, I do not. I’m using the default version, and the error persists if I force python2 or python3 anyways.

  5. mjbogusz

    The question was aimed at the maintainers (specifically Steven), but thanks for addressing my concerns - it seems this is not a typical python version issue.

  6. Michael Grey

    You can probably pass -DBUILD_TESTING=OFF to your initial call to cmake so that the tests are skipped entirely.

  7. acxz

    I recently came across this issue. If it helps the development process the following are my steps to reproduce and relevant output.

    hg clone https://bitbucket.org/ignitionrobotics/ign-cmake
    cd ign-cmake
    mkdir build
    cd build
    cmake .. &> cmake.txt
    make &> make.txt
    

    My cmake and make output is here.

    Previously I did not have cppcheck installed which is why I did not hit this error.

    I am the maintainer for the Arch package and have applied @Michael Grey 's solution to the package build process, so that users on Arch can successfully install this package.

    System Information:

    OS: ArchLinux

    cmake: v3.15.4

    gcc: v9.2.0

    cppcheck: v1.89

  8. Log in to comment