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

rospack failed to build in Hydro, can't find PythonLibs

asked 2014-06-28 19:27:14 -0600

Kevin gravatar image

updated 2014-06-28 19:39:12 -0600

I followed the instructions to install Hydro from source for OSX and rospack fails to build because it cake can't seem to find PythonLibs. The full out put is shown below:

[nina@Dalek ros_catkin_ws]$ ./src/catkin/bin/catkin_make_isolated
--install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/hydro Base path: /Users/nina/tmp/ros/ros_catkin_ws Source space: /Users/nina/tmp/ros/ros_catkin_ws/src Build space: /Users/nina/tmp/ros/ros_catkin_ws/build_isolated Devel space: /Users/nina/tmp/ros/ros_catkin_ws/devel_isolated Install space: /opt/ros/hydro Additional CMake Arguments:
-DCMAKE_BUILD_TYPE=Release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~  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 ~~  - roslisp ~~  - 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 ~~  - rosout ~~  - message_filters ~~ 
- rosnode ~~  - rostopic ~~  - roswtf ~~  - topic_tools ~~  - rosbag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

==> Processing catkin package: 'catkin' Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/Users/nina/tmp/ros/ros_catkin_ws/build_isolated/catkin'
==> make -j4 -l4 in '/Users/nina/tmp/ros/ros_catkin_ws/build_isolated/catkin'
==> make install in '/Users/nina/tmp/ros/ros_catkin_ws/build_isolated/catkin' Install the project...
-- Install configuration: "Release"
-- Installing: /opt/ros/hydro/.catkin
-- Installing: /opt/ros/hydro/_setup_util.py
-- Installing: /opt/ros/hydro/env.sh
-- Installing: /opt/ros/hydro/setup.bash
-- Installing: /opt/ros/hydro/setup.sh
-- Installing: /opt/ros/hydro/setup.zsh

... other output ...

==> Processing catkin package: 'rospack'
==> Building with env: '/opt/ros/hydro/env.sh'
==> cmake /Users/nina/tmp/ros/ros_catkin_ws/src/rospack
-DCATKIN_DEVEL_PREFIX=/Users/nina/tmp/ros/ros_catkin_ws/devel_isolated/rospack
-DCMAKE_INSTALL_PREFIX=/opt/ros/hydro -DCMAKE_BUILD_TYPE=Release in '/Users/nina/tmp/ros/ros_catkin_ws/build_isolated/rospack'
-- Using CATKIN_DEVEL_PREFIX: /Users/nina/tmp/ros/ros_catkin_ws/devel_isolated/rospack
-- Using CMAKE_PREFIX_PATH: /opt/ros/hydro
-- This workspace overlays: /opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using default Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /Users/nina/tmp/ros/ros_catkin_ws/build_isolated/rospack/test_results
-- Found gtest: gtests will be built CMake Warning (dev) at /opt/ros/hydro/share/catkin/cmake/tools/doxygen.cmake:40 (GET_TARGET_PROPERTY):   Policy CMP0045 is not set: Error on non-existent target in   get_target_property.  Run "cmake
--help-policy CMP0045" for policy details.   Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target "doxygen". Call Stack (most recent call first):   /opt/ros/hydro/share/catkin/cmake/all.cmake:139 (include)   /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:20 (include)   CMakeLists.txt:4 (find_package) This warning is for project developers.  Use -Wno-dev to suppress it.

-- catkin 0.5.88
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   system CMake Error at /usr/local/Cellar/cmake/3.0.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message):   Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)   (Required is at least version "2.7") Call Stack (most recent call first):   /usr/local/Cellar/cmake/3.0.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)   /usr/local/Cellar/cmake/3.0.0/share/cmake/Modules/FindPythonLibs.cmake:197 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)   CMakeLists.txt ...
(more)
edit retag flag offensive close merge delete

Comments

Gosh, cmake 3.0.0, that is terrifying. I'm not convinced that is the problem, but are you using the System python or one installed from Homebrew?

William gravatar image William  ( 2014-06-28 19:51:37 -0600 )edit

When I updated brew, it installed cake 3.0.0. Yes, I am using python 2.7.5 that comes with Mavericks.

Kevin gravatar image Kevin  ( 2014-06-28 20:52:26 -0600 )edit
1

2 Answers

Sort by ยป oldest newest most voted
5

answered 2014-06-28 22:05:37 -0600

Kevin gravatar image

Yes, it appears to due to cmake 3.0. In rospack/CMakeLists.txt, remove/comment out:

set(PythonLibs_FIND_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
find_package(PythonLibs REQUIRED)

and add/replace with:

find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED)

That seems to do the trick. Thanks Dirk!

edit flag offensive delete link more

Comments

demmeln gravatar image demmeln  ( 2014-06-30 06:57:51 -0600 )edit

wow after about 4 hours of trying to find a solution, i find this and it instantly works. Thanks!!!

l0g1x gravatar image l0g1x  ( 2014-09-18 19:08:59 -0600 )edit

It did work for rospack, but not for qt_gui_core, which had the same missing PYTHON symbols error, but not an easy-to-see-fix in CMakeLists.txt (I had to remove qt_gui_core to get the rest of the build unblocked)

rebcabin gravatar image rebcabin  ( 2014-11-25 11:14:14 -0600 )edit
0

answered 2014-12-13 15:57:50 -0600

v.mayoral gravatar image

For the record, I was getting the same error in Debian Wheezy. I fixed it installing the

python-dev

package.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-06-28 19:27:14 -0600

Seen: 2,142 times

Last updated: Dec 13 '14