catkin_make error melodic
I got this error after ran the catkin_make
command line:
$ catkin_make
Base path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
Devel space: /home/user/catkin_ws/devel
Install space: /home/user/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/user/catkin_ws/build"
####
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
/usr/bin/c++
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:530: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
I am using ubuntu 17.10 and installed version: ros melodic. Could someone help me to fit it.
Edit: Here my setup output as suggested from you:
$ ls -al /usr/bin/c++
lrwxrwxrwx 1 root root 21 Dec 25 22:30 /usr/bin/c++ -> /etc/alternatives/c++
and:
$ echo $CXX
/usr/bin/g++
Currently, I try to reinstall and do the same thing and make it different error output, like:
catkin_make Base path: /home/user/catkin_ws Source space: /home/user/catkin_ws/src Build space: /home/user/catkin_ws/build Devel space: /home/user/catkin_ws/devel Install space: /home/user/catkin_ws/install
####
#### Running command: "cmake /home/user/catkin_ws/src
-DCATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel
-DCMAKE_INSTALL_PREFIX=/home/user/catkin_ws/install
-G Unix Makefiles" in "/home/user/catkin_ws/build"
####
-- The CXX compiler identification is unknown CMake Error in CMakeLists.txt: No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/user/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
Edit2:
I am currently using catkin to install and it cannot detect the CMAKE_CXX_COMPILER. I tried to put all related files here for you to understanding my installation.
$ catkin_make
Base path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
Devel space: /home/user/catkin_ws/devel
Install space: /home/user/catkin_ws/install
####
#### Running command: "cmake /home/user/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/user/catkin_ws/install -G Unix Makefiles" in "/home/user/catkin_ws/build"
####
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/user/catkin_ws ...
I trying to put all related files here for people find the error my setup in this question.