robot_state_publisher: Error building on Mac OS 10.10 (Yosemite)
While building (based on http://wiki.ros.org/indigo/Installation/OSX/Homebrew/Source), using Mac OS X.10 and home-brew, after running:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
I get this error:
Scanning dependencies of target state_publisher
Scanning dependencies of target robot_state_publisher
[ 75%] [100%] Building CXX object CMakeFiles/state_publisher.dir/src/joint_state_listener.cpp.o
Building CXX object CMakeFiles/robot_state_publisher.dir/src/joint_state_listener.cpp.o
Linking CXX executable /Users/michael/ROS/ros_catkin_ws/devel_isolated/robot_state_publisher/lib/robot_state_publisher/state_publisher
Linking CXX executable /Users/michael/ROS/ros_catkin_ws/devel_isolated/robot_state_publisher/lib/robot_state_publisher/robot_state_publisher
ld: library not found for -llog4cxx
ld: library not found for -llog4cxx
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: make[2]: *** [/Users/michael/ROS/ros_catkin_ws/devel_isolated/robot_state_publisher/lib/robot_state_publisher/robot_state_publisher] Error 1*** [/Users/michael/ROS/ros_catkin_ws/devel_isolated/robot_state_publisher/lib/robot_state_publisher/state_publisher] Error 1
make[1]: *** [CMakeFiles/robot_state_publisher.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/state_publisher.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'robot_state_publisher':
Command '/Users/michael/ROS/ros_catkin_ws/install_isolated/env.sh make -j8 -l8' returned non-zero exit status 2
Reproduce this error by running:
==> cd /Users/michael/ROS/ros_catkin_ws/build_isolated/robot_state_publisher && /Users/michael/ROS/ros_catkin_ws/install_isolated/env.sh make -j8 -l8
Command failed, exiting.
Note that log4cxx is installed:
ros_catkin_ws| brew install log4cxx
Warning: log4cxx-0.10.0 already installed
Not sure, but might be related to this: https://github.com/ros-perception/image_common/issues/28
Thanks!
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Comments: 18 (8 by maintainers)
Please open a question on answers.ros.org or on rviz if you now have an rviz problem, but I think that the
link_directoriesworkaround is not a fix.Also you cannot
pip install ogre, it isn’t a python package. You’ll have to usebrew install ogre.The error you are getting with rviz is because your
DYLD_LIBRARY_PATHis still set in your env to include/usr/local/lib. The problem is that most things in OS X and homebrew use the systemlibjpegwhich has that symbol, but when you put/usr/local/libin theDYLD_LIBRARY_PATHthen it loads thelibjpegfrom homebrew which does not have that symbol (__cg_jpeg_resync_to_restart). I think that if you run this command,brew unlink libjpeg libtiff libpng, then rviz will build. However, this is again a workaround and cannot be used as a permanent solution.