ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It seems that the c compiler cannot be found.

What lead you to that conclusion?

and the installed version of the compiler is: cmake version 2.8.12.2

CMake is not a compiler, it is a build tool.

There are some errors in the pieces of the logs you posted, but what is stranger is that there are no lines about the C/C++ compiler anywhere in the catkin_make output you posted.

Can you provide some more info on how you installed ROS (from source / debians), what OS this is (and which version), and what you workspace setup is? Please use the edit link/button for that.

A normal installation of ROS should've installed the C/C++ compilers (if they weren't already on your system). Can you also add the output of which gcc?

It seems that the c compiler cannot be found.

What lead you to that conclusion?

and the installed version of the compiler is: cmake version 2.8.12.2

CMake is not a compiler, it is a build tool.

There are some errors in the pieces of the logs you posted, but what is stranger is that there are no lines about the C/C++ compiler anywhere in the catkin_make output you posted.

Can you provide some more info on how you installed ROS (from source / debians), what OS this is (and which version), and what you workspace setup is? Please use the edit link/button for that.

A normal installation of ROS should've installed the C/C++ compilers (if they weren't already on your system). Can you also add the output of which gcc?


Edit:

What do you mean (from source / debians)?

You can install ROS either by compiling everything yourself, or by installing pre-built binary pkgs. On Debian & Ubuntu, those packages are called debians. But you already linked to the tutorial you followed, so you must have installed using apt-get, and thus, using debians.

As to your problem: what is the output of a catkin_make invocation if you do the following (in a new terminal, with just source /opt/ros/indigo/setup.bash):

mkdir -p /tmp/catkin_test/src
cd /tmp/catkin_test
catkin_make

Please update your question with the output you get.

Also: run cmake --system-information and update your question with the first few (say 25) lines (everything down to and including CMAKE_COMPILER_IS_GNUCXX).

It seems that the c compiler cannot be found.

What lead you to that conclusion?

and the installed version of the compiler is: cmake version 2.8.12.2

CMake is not a compiler, it is a build tool.

There are some errors in the pieces of the logs you posted, but what is stranger is that there are no lines about the C/C++ compiler anywhere in the catkin_make output you posted.

Can you provide some more info on how you installed ROS (from source / debians), what OS this is (and which version), and what you workspace setup is? Please use the edit link/button for that.

A normal installation of ROS should've installed the C/C++ compilers (if they weren't already on your system). Can you also add the output of which gcc?


Edit:

What do you mean (from source / debians)?

You can install ROS either by compiling everything yourself, or by installing pre-built binary pkgs. On Debian & Ubuntu, those packages are called debians. But you already linked to the tutorial you followed, so you must have installed using apt-get, and thus, using debians.

As to your problem: what is the output of a catkin_make invocation if you do the following (in a new terminal, with just source /opt/ros/indigo/setup.bash):

mkdir -p /tmp/catkin_test/src
cd /tmp/catkin_test
catkin_make

Please update your question with the output you get.

Also: run cmake --system-information and update your question with the first few (say 25) lines (everything down to and including CMAKE_COMPILER_IS_GNUCXX).


Edit:

Based on this:

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
[..]
-- Check for working C compiler: /usr/bin/cc -- works
[..]
-- Check for working CXX compiler: /usr/bin/c++ -- works

and this:

CMAKE_CXX_COMPILER == "/usr/bin/c++"
CMAKE_C_COMPILER == "/usr/bin/cc"

I'd say there is nothing really wrong with your system. It's more likely a workspace related issue (so setup and / or packages in it).

Can you tell us exactly (ie: copy/paste the commands you used in your question) how you created and set up your workspace? Please edit your question with that information.

Also: in a normal terminal (so one which may source your problematic workspace) run env | grep -i ros and append the output of that to your question.

It seems that the c compiler cannot be found.

What lead you to that conclusion?

and the installed version of the compiler is: cmake version 2.8.12.2

CMake is not a compiler, it is a build tool.

There are some errors in the pieces of the logs you posted, but what is stranger is that there are no lines about the C/C++ compiler anywhere in the catkin_make output you posted.

Can you provide some more info on how you installed ROS (from source / debians), what OS this is (and which version), and what you workspace setup is? Please use the edit link/button for that.

A normal installation of ROS should've installed the C/C++ compilers (if they weren't already on your system). Can you also add the output of which gcc?


Edit:

What do you mean (from source / debians)?

You can install ROS either by compiling everything yourself, or by installing pre-built binary pkgs. On Debian & Ubuntu, those packages are called debians. But you already linked to the tutorial you followed, so you must have installed using apt-get, and thus, using debians.

As to your problem: what is the output of a catkin_make invocation if you do the following (in a new terminal, with just source /opt/ros/indigo/setup.bash):

mkdir -p /tmp/catkin_test/src
cd /tmp/catkin_test
catkin_make

Please update your question with the output you get.

Also: run cmake --system-information and update your question with the first few (say 25) lines (everything down to and including CMAKE_COMPILER_IS_GNUCXX).


Edit:Edit 2:

Based on this:

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
[..]
-- Check for working C compiler: /usr/bin/cc -- works
[..]
-- Check for working CXX compiler: /usr/bin/c++ -- works

and this:

CMAKE_CXX_COMPILER == "/usr/bin/c++"
CMAKE_C_COMPILER == "/usr/bin/cc"

I'd say there is nothing really wrong with your system. It's more likely a workspace related issue (so setup and / or packages in it).

Can you tell us exactly (ie: copy/paste the commands you used in your question) how you created and set up your workspace? Please edit your question with that information.

Also: in a normal terminal (so one which may source your problematic workspace) run env | grep -i ros and append the output of that to your question.


Edit 3:

source /opt/ros/indigo/setup.bash

was this in a 'clean' terminal? So without the source /opt/.. lines in your .bashrc?

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace

You don't need this last command

cd ~/catkin_ws/
catkin_make

So at this point there were no packages in ~/catkin_ws/src?

source devel/setup.bash

Again, was this in a clean terminal / bash session? If not, please remove the lines from your .bashrc and try again.

Also:

I have edited the .bashrc file as follows:

source /opt/ros/indigo/setup.bash
source ~/catkin_ws/devel/setup.bash

You don't need to source the distribution setup.bash and the workspace file. Just source the workspace file, it sets up everything else for you.

It seems that the c compiler cannot be found.

What lead you to that conclusion?

and the installed version of the compiler is: cmake version 2.8.12.2

CMake is not a compiler, it is a build tool.

There are some errors in the pieces of the logs you posted, but what is stranger is that there are no lines about the C/C++ compiler anywhere in the catkin_make output you posted.

Can you provide some more info on how you installed ROS (from source / debians), what OS this is (and which version), and what you workspace setup is? Please use the edit link/button for that.

A normal installation of ROS should've installed the C/C++ compilers (if they weren't already on your system). Can you also add the output of which gcc?


Edit:

What do you mean (from source / debians)?

You can install ROS either by compiling everything yourself, or by installing pre-built binary pkgs. On Debian & Ubuntu, those packages are called debians. But you already linked to the tutorial you followed, so you must have installed using apt-get, and thus, using debians.

As to your problem: what is the output of a catkin_make invocation if you do the following (in a new terminal, with just source /opt/ros/indigo/setup.bash):

mkdir -p /tmp/catkin_test/src
cd /tmp/catkin_test
catkin_make

Please update your question with the output you get.

Also: run cmake --system-information and update your question with the first few (say 25) lines (everything down to and including CMAKE_COMPILER_IS_GNUCXX).


Edit 2:

Based on this:

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
[..]
-- Check for working C compiler: /usr/bin/cc -- works
[..]
-- Check for working CXX compiler: /usr/bin/c++ -- works

and this:

CMAKE_CXX_COMPILER == "/usr/bin/c++"
CMAKE_C_COMPILER == "/usr/bin/cc"

I'd say there is nothing really wrong with your system. It's more likely a workspace related issue (so setup and / or packages in it).

Can you tell us exactly (ie: copy/paste the commands you used in your question) how you created and set up your workspace? Please edit your question with that information.

Also: in a normal terminal (so one which may source your problematic workspace) run env | grep -i ros and append the output of that to your question.


Edit 3:

source /opt/ros/indigo/setup.bash

was this in a 'clean' terminal? So without the source /opt/.. lines in your .bashrc?

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace

You don't need this last command

cd ~/catkin_ws/
catkin_make

So at this point there were no packages in ~/catkin_ws/src?

source devel/setup.bash

Again, was this in a clean terminal / bash session? If not, please remove the lines from your .bashrc and try again.

Also:

I have edited the .bashrc file as follows:

source /opt/ros/indigo/setup.bash
source ~/catkin_ws/devel/setup.bash

You don't need to source the distribution setup.bash and the workspace file. Just source the workspace file, it sets up everything else for you.

Finally: it could be that one or more of your pkgs are doing something strange that is messing up CMake / catkin. Please try starting with a clean terminal, an empty - new - workspace, and add pkgs one by one to see when things stop working.