CMake build issues

87 Views Asked by At

I had the build environment running but as I switched projects I had to install few more stuff that cause my previous project toolchain to break. When I try to build I hit the below error

CMake Error at /snap/cmake/1336/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:60 (message):
  The C++ compiler

    "/usr/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/Projects/abc/server/build/host_protobuf/CMakeFiles/CMakeScratch/TryCompile-cJGM8x'

    Run Build Command(s): /usr/bin/ninja -v cmTC_a210d
    [1/2] /usr/bin/clang++    -MD -MT CMakeFiles/cmTC_a210d.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_a210d.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_a210d.dir/testCXXCompiler.cxx.o -c /home/richard/Projects/opmix/server/build/host_protobuf/CMakeFiles/CMakeScratch/TryCompile-cJGM8x/testCXXCompiler.cxx
    [2/2] : && /usr/bin/clang++   CMakeFiles/cmTC_a210d.dir/testCXXCompiler.cxx.o -o cmTC_a210d   && :
    FAILED: cmTC_a210d
    : && /usr/bin/clang++   CMakeFiles/cmTC_a210d.dir/testCXXCompiler.cxx.o -o cmTC_a210d   && :
    /usr/bin/ld: cannot find -lstdc++: No such file or directory
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

I have reinstalled the complete toolchain and also installed libstdc++-dev. But this did not resolve the issue. Can someone out point where I should look further to resolve this issue. Thanks!

Reinstalled the complete toolchain cmake ninja-build build-essential autoconf libtool pkg-config libssl-dev clang lld git-lfs ccache

Tried installed all versions of libstdc++-dev

0

There are 0 best solutions below