catkin is compiling c++ with python
Hi everyone,
I'm a newbie in ROS, and after making the tutorials I'm trying to rosificate a C++ project that already is running in my BeagleBone Black.
My problem is that, when I compile the code using catkin_make_isolated
, my main.cpp is not being properly built up:in the compilation process, python
is being used, instead of gcc
compiler. This means that I cannot execute the node using rosrun <package> main
even if I have done source devel/setup.bash
witihin catkin_ws
.
This is the print out of the command line in the compilation process:
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
And this is how the CMakeLists.txt looks like:
cmake_minimum_required(VERSION 2.8.3)
project(ros_erle_ubled)
find_package(catkin REQUIRED COMPONENTS
roscpp
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ros_erle_ubled
CATKIN_DEPENDS roscpp
)
include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_executable(main src/GPIO_BBB.cpp src/DycoLEDDriver.cpp src/DycoLED_Linux.cpp src/main.cpp)
target_link_libraries(main ${catkin_LIBRARIES})
add_dependencies(main ros_erle_ubled_main_cpp)
I have also tried to force to use gcc compiler
executing the next command (with little success):
catkin_make_isolated -DCMAKE_CXX_COMPILER=/usr/bin/gcc --pkg ros_ubled
Any idea how can I proceed??
Thanks in advance!
Edit: console output of running catkin_make_isolated
:
root@beaglebone:~/ros_catkin_ws# catkin_make_isolated -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=/usr/bin/gcc-4.7 --pkg ros_ubled
Base path: /root/ros_catkin_ws
Source space: /root/ros_catkin_ws/src
Build space: /root/ros_catkin_ws/build_isolated
Devel space: /root/ros_catkin_ws/devel_isolated
Install space: /root/ros_catkin_ws/install_isolated
Additional CMake Arguments: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=/usr/bin/gcc-4.7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~ traversing 48 packages in topological order:
~~ - catkin
~~ - genmsg
~~ - gencpp
~~ - genlisp
~~ - genpy
~~ - console_bridge (plain cmake)
~~ - cpp_common
~~ - message_generation
~~ - message_runtime
~~ - mk
~~ - ros
~~ - ros_comm
~~ - rosbash
~~ - rosboost_cfg
~~ - rosbuild
~~ - rosclean
~~ - roscpp_traits
~~ - roscreate
~~ - rosgraph
~~ - roslang
~~ - rosmake
~~ - rosmaster
~~ - rosmsg
~~ - rospack
~~ - roslib
~~ - rosparam
~~ - rospy
~~ - rosservice
~~ - rostime
~~ - roscpp_serialization
~~ - rosbag_storage
~~ - roslaunch
~~ - rosunit
~~ - rosconsole
~~ - rostest
~~ - std_msgs
~~ - rosgraph_msgs
~~ - std_srvs
~~ - xmlrpcpp
~~ - roscpp
~~ - ros_ubled
~~ - rosout
~~ - message_filters
~~ - rosnode
~~ - rostopic
~~ - roswtf
~~ - topic_tools
~~ - rosbag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Skipping package: 'catkin'
Skipping package: 'genmsg'
Skipping package: 'gencpp'
Skipping package: 'genlisp'
Skipping package: 'genpy'
Skipping package: 'console_bridge'
Skipping package: 'cpp_common'
Skipping package: 'message_generation'
Skipping package: 'message_runtime'
Skipping package: 'mk'
Skipping package: 'ros'
Skipping package: 'ros_comm'
Skipping package: 'rosbash'
Skipping package: 'rosboost_cfg'
Skipping package: 'rosbuild'
Skipping package: 'rosclean'
Skipping package: 'roscpp_traits'
Skipping package: 'roscreate'
Skipping package: 'rosgraph'
Skipping package: 'roslang'
Skipping package: 'rosmake'
Skipping package: 'rosmaster'
Skipping package: 'rosmsg'
Skipping package: 'rospack'
Skipping package: 'roslib'
Skipping package: 'rosparam'
Skipping package: 'rospy'
Skipping package: 'rosservice'
Skipping package: 'rostime'
Skipping package: 'roscpp_serialization'
Skipping package: 'rosbag_storage'
Skipping package: 'roslaunch'
Skipping package: 'rosunit'
Skipping package: 'rosconsole'
Skipping package: 'rostest'
Skipping package: 'std_msgs'
Skipping package: 'rosgraph_msgs'
Skipping package: 'std_srvs'
Skipping package: 'xmlrpcpp'
Skipping package: 'roscpp'
==> Processing catkin package: 'ros_ubled'
==> Building with env: '/root/ros_catkin_ws/devel_isolated/roscpp/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/root/ros_catkin_ws/build_isolated/ros_ubled'
-- Using CATKIN_DEVEL_PREFIX: /root/ros_catkin_ws/build_isolated/ros_ubled/devel
-- Using CMAKE_PREFIX_PATH: /root/ros_catkin_ws/devel_isolated/roscpp;/root/ros_catkin_ws/devel_isolated/xmlrpcpp;/root/ros_catkin_ws/devel_isolated/std_srvs;/root/ros_catkin_ws/devel_isolated/rosgraph_msgs;/root/ros_catkin_ws/devel_isolated/std_msgs;/root/ros_catkin_ws/devel_isolated/rostest;/root/ros_catkin_ws/devel_isolated/rosconsole;/root/ros_catkin_ws/devel_isolated/rosunit;/root/ros_catkin_ws/devel_isolated ...
I'm pretty sure it is not using python as a c++ compiler. The message just means that this is the python executable path being used for python. Please post the full catkin_make output.
I was just going to post the same @dornhege: that message just tells you which version of Python
catkin
has found. It does not mean that your c++ is being 'compiled' by python.@imuguraza: could you tell us what this line is for?
Here the commandline output: http://pastebin.com/VpggzZjT
According to that everything worked fine.