= Installation Instructions for Kinetic in OS X = This page describes how to install ROS Kinetic on OS X. OS X is not officially supported by ROS and the installation might fail. {{{{#!wiki blue/solid Install guide for Melodic is now available: [[melodic/Installation/macOS/Homebrew/Source]] }}}} {{{#!wiki solid/yellow This is a '''work in progress'''! It really won't work right now... }}} <> == Setup == === Homebrew === First, go to http://brew.sh to install homebrew and install some additional software: . {{{ $ brew update $ brew install cmake }}} Add our ROS dependencies tap and the Homebrew science tap so you can get some non-standard formulae: . {{{ $ brew tap ros/deps $ brew tap osrf/simulation # Gazebo, sdformat, and ogre $ brew tap homebrew/core # VTK5 $ brew tap homebrew/science # others }}} {{{{#!wiki blue/solid '''Note:''' if you are upgrading from previous ROS distro try this before installing: {{{ $ brew untap ros/DISTRO }}} In general it is not recommended to try and install multiple ROS versions at the same time on OS X due to conflicting system dependencies. }}}} === Setup Environment === You will need to tell python about modules installed by homebrew. The recommended way of doing this are the following commands: . {{{ $ mkdir -p ~/Library/Python/2.7/lib/python/site-packages $ echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth }}} === Additional Tools === Finally, we need to install a few ROS python tools using 'pip'. {{{{#!wiki blue/solid If you don't already have pip, install it with: {{{ $ brew install python # brew Python comes with pip and is installed as python2 $ sudo -H python2 -m pip install -U pip # Update pip $ sudo -H python2 -m pip install wxPython # Install python-wxtools }}} }}}} Install the following packages using 'pip': . {{{ $ sudo -H python2 -m pip install -U wstool rosdep rosinstall rosinstall_generator rospkg catkin-pkg sphinx }}} In order to use rosdep, we need to initialize it: . {{{ $ sudo -H rosdep init $ rosdep update }}} <> <> == Troubleshooting == In this section feel free to compile any tips or workarounds found for installing Kinetic on OS X. Troubleshooting from previous releases of ROS are located here: [[os/OSX/Homebrew/troubleshooting]] === 'No definition of [google-mock] for OS [osx]' error during rosdep install === Add `--skip-keys google-mock` to `rosdep install` === Eigen numext issues === Ran into issues with Eigen complaining about numext. Includes appeared to be optional so edited src/opencv3/opencv_contrib/rgbd/src/odometry.cpp to remove them. === PyQt5 module not found === Be sure to install PyQt5 with Python 2.7 support: . {{{ $ brew install pyqt5 --with-python }}} If PyQt5 is already installed: . {{{ $ brew reinstall pyqt5 --with-python }}} === Qt naming issue === Fix some path names when looking for sip stuff during install . {{{ $ ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5 }}} === More Qt naming issues === During the build process, ld complains about {{{-lQtCore}}} ''et al''. In both {{{build_isolated/qt_gui_cpp/sip/qt_gui_cpp_sip/Makefile}}} and {{{devel_isolated/rviz/bin/sip/rviz_sip/Makefile}}}, the {{{LIBS}}} variable needs the {{{-lQtX}}} flags changed to {{{/usr/local/lib/QtX.framework/QtX}}} (were at end of line). === Wrong inclusion of some header files === During the build process, the compiler may include the wrong header file from kernel framework instead of standard library, which may cause "no member named xxx in the global namespace". It's reported that the nodelet_tutorial_math and rqt_gui_cpp packages have such problem. There are 2 workarouds for this issue, for details, you can refer to the links below: https://gist.github.com/bgromov/0db00b3e7edae34c0d289d4649369f44 https://github.com/ros/rosdistro/issues/13333 === DYLD_LIBRARY_PATH Problems === Copying {{{/usr/bin/env}}} to {{{/usr/local/bin}}} effectively removes SIP checks for {{{env}}} acting as the script interpreter allowing {{{DYLD_LIBRARY_PATH}}} to be passed through. Unfortunately {{{bash}}} is also considered protected so need to set the variable in {{{/opt/ros//bin/rosrun}}}: . {{{ export DYLD_LIBRARY_PATH=DYLD_LIBRARY_PATH:$(pwd)/devel/lib:/opt/ros//lib }}} Also, some old errors can be found here: {{{{{#!wiki version groovy [[groovy/Installation/OSX/Homebrew/Source/OldErrors]] }}}}} {{{{{#!wiki version hydro [[hydro/Installation/OSX/Homebrew/Source/OldErrors]] }}}}} === empy fails === Download the package directly from the author: http://www.alcyone.com/software/empy/empy-latest.tar.gz and install manually: {{{ sudo pip uninstall empy tar xzf empy-latest.tar.gz cd empy-3.3 sudo python setup.py install }}} === tf2 fails === TF2 is not necessary to build ROS. The easiest way to fix this is to delete the tf2 folders. . {{{ $ rm -rf src/tf2* }}} === pydot fails to install === See: {{{{{#!wiki version groovy http://answers.ros.org/question/58786/errors-installing-groovy-on-mac-osx-homebrew-pydot/ }}}}} {{{{{#!wiki version hydro [[hydro/Installation/OSX/Homebrew/Source/OldErrors]] http://answers.ros.org/question/58786/errors-installing-hydro-on-mac-osx-homebrew-pydot/ }}}}} === PyQWT fails to install from brew === When running rosdep on your variant if it tries to install pyqwt and fails with: {{{ executing command [brew install pyqwt] ==> Downloading http://sourceforge.net/projects/pyqwt/files/pyqwt5/PyQwt-5.2.0/PyQwt-5.2.0.tar.gz Already downloaded: /Library/Caches/Homebrew/pyqwt-5.2.0.tar.gz ==> Patching patching file configure/configure.py ==> python configure.py --module-install-path=/usr/local/Cellar/pyqwt/5.2.0/lib/python2.7/site-packages/PyQt4/Qwt5 --sip-install-path=/usr/local/Cellar/pyqwt/5.2.0/share/sip/Qwt5 --uic-install-path=/u 'timelines': [], 'trace': '', 'uic_install_path': '/usr/local/Cellar/pyqwt/5.2.0/lib/python2.7/site-packages/PyQt4'} Requires at least PyQt-4.2 and its development tools. READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting ERROR: the following rosdeps failed to install homebrew: command [brew install pyqwt] failed }}} Then you need to make sure your PYTHONPATH has the homebrew path added to it (see [[indigo/Installation/OSX/Homebrew/Source#Setup_Environment_for_Python|here]]. This is part of the instructions above and can be seen as a caveat of pyqt (`brew info pyqt`). === pcl build problems === Resolving the problems with building PCL 1.6 on OS X is on going. When building the desktop variant, PCL is included but not explicitly required. Therefore the easiest method to get around the PCL build problems is to remove it from the workspace: . {{{ $ rm -rf src/pcl_msgs $ rm -rf src/pcl $ rm -rf src/pcl_ros }}} === camera_calibration_parsers build problems === When building camera_calibration_parsers you might get: {{{ ==> Processing catkin package: 'camera_calibration_parsers' ==> Building with env: '/opt/ros/hydro/env_cached.sh' Makefile exists, skipping explicit cmake invocation... ==> make cmake_check_build_system in '/Users/bcharrow/ros_catkin_ws/build_isolated/camera_calibration_parsers' ==> make -j2 in '/Users/bcharrow/ros_catkin_ws/build_isolated/camera_calibration_parsers' [ 25%] Building CXX object CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp: In function ‘void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)’: /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:53: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) const [with Key = char [5]](((const char (&)[5])"rows")) >> rows’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:55: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) const [with Key = char [5]](((const char (&)[5])"cols")) >> cols’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:59: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) const [with Key = int](((const int&)((const int*)(& i)))) >> *(m->camera_calibration_parsers::SimpleMatrix::data + ((double*)(((long unsigned int)i) * 8ul)))’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp: In function ‘bool camera_calibration_parsers::readCalibrationYml(std::istream&, std::string&, sensor_msgs::CameraInfo&)’: /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:119: error: ‘class YAML::Parser’ has no member named ‘GetNextDocument’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:121: error: ‘class YAML::Node’ has no member named ‘FindValue’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:122: error: no match for ‘operator>>’ in ‘* name_node >> camera_name’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:126: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) [with Key = char [12]](((const char (&)[12])(& camera_calibration_parsers::WIDTH_YML_NAME))) >> cam_info->sensor_msgs::CameraInfo_ >::width’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:127: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) [with Key = char [13]](((const char (&)[13])(& camera_calibration_parsers::HEIGHT_YML_NAME))) >> cam_info->sensor_msgs::CameraInfo_ >::height’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:138: error: ‘class YAML::Node’ has no member named ‘FindValue’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:139: error: no match for ‘operator>>’ in ‘* model_node >> cam_info->sensor_msgs::CameraInfo_ >::distortion_model’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:148: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) const [with Key = char [5]](((const char (&)[5])"rows")) >> D_rows’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:149: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) const [with Key = char [5]](((const char (&)[5])"cols")) >> D_cols’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:153: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) const [with Key = int](((const int&)((const int*)(& i)))) >> cam_info->sensor_msgs::CameraInfo_ >::D. std::vector<_Tp, _Alloc>::operator[] [with _Tp = double, _Alloc = std::allocator](((long unsigned int)i))’ /Users/bcharrow/ros_catkin_ws/src/camera_calibration_parsers/src/parse_yml.cpp:50: note: candidates are: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&) make[2]: *** [CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o] Error 1 make[1]: *** [CMakeFiles/camera_calibration_parsers.dir/all] Error 2 make: *** [all] Error 2 <== Failed to process package 'camera_calibration_parsers': Command '/opt/ros/hydro/env_cached.sh make -j2' returned non-zero exit status 2 Command failed, exiting. }}} As of January 1, 2013, homebrew's version of yaml-cpp was upgraded to 0.5.0 which uses a different API than camera_calibration_parsers requires. {{{{#!wiki yellow/solid '''This is the old solution:''' To fix, revert yaml-cpp to 0.3.0: {{{ $ cd /usr/local/Cellar $ brew uninstall yaml-cpp $ brew versions yaml-cpp 0.5.0 git checkout 78b895b /usr/local/Library/Formula/yaml-cpp.rb 0.3.0 git checkout 6e32f8c /usr/local/Library/Formula/yaml-cpp.rb 0.2.5 git checkout ebe6663 /usr/local/Library/Formula/yaml-cpp.rb $ git checkout 6e32f8c /usr/local/Library/Formula/yaml-cpp.rb $ brew install yaml-cpp }}} }}}} {{{{{#!wiki version groovy A more permanent solution is that I added a yaml-cpp-0.3 formula to the homebrew-groovy repository: https://github.com/ros/homebrew-groovy/blob/master/yaml-cpp-0.3.rb }}}}} {{{{{#!wiki version hydro A more permanent solution is that I added a yaml-cpp-0.3 formula to the homebrew-hydro repository: https://github.com/ros/homebrew-hydro/blob/master/yaml-cpp-0.3.rb }}}}} And updated the rosdep entry so that it will install yaml-cpp-0.3 rather than yaml-cpp from the upstream Homebrew repository. The only problem with this approach is that if yaml-cpp 0.5.0 is already installed from brew, 0.3 will fail to link properly, in that event: {{{ $ brew uninstall yaml-cpp yaml-cpp-0.3 $ brew install yaml-cpp-0.3 }}} === cv_bridge fails to link === If you get an error like {{{ Linking CXX shared library /Users/tatsch/ros_catkin_ws/devel_isolated/cv_bridge/lib/libcv_bridge.dylib ld: warning: directory not found for option '-L/Users/tatsch/ros_catkin_ws/install_isolated/share/OpenCV/3rdparty/lib' [ 50%] Built target cv_bridge Linking CXX shared library /Users/tatsch/ros_catkin_ws/devel_isolated/cv_bridge/lib/python2.7/site-packages/cv_bridge/boost/cv_bridge_boost.dylib ld: warning: directory not found for option '-L/Users/tatsch/ros_catkin_ws/install_isolated/share/OpenCV/3rdparty/lib' Undefined symbols for architecture x86_64: "_PyErr_SetString", referenced from: failmsg(char const*, ...) in module.cpp.o "_PyExc_TypeError", referenced from: failmsg(char const*, ...) in module.cpp.o "_PyImport_ImportModule", referenced from: init_module_cv_bridge_boost() in module.cpp.o "_PyInt_FromLong", referenced from: boost::python::to_python_value::operator()(int const&) const in module.cpp.o "_PyInt_Type", referenced from: boost::python::to_python_value::get_pytype() const in module.cpp.o "_PyObject_AsWriteBuffer", referenced from: convert_to_CvMat(_object*, CvMat**, char const*) in module.cpp.o "_PyObject_CallObject", referenced from: FROM_CvMat(CvMat*) in module.cpp.o "_PyObject_GetAttrString", referenced from: FROM_CvMat(CvMat*) in module.cpp.o "_PyString_AsString", referenced from: convert_to_CvMat(_object*, CvMat**, char const*) in module.cpp.o "_Py_BuildValue", referenced from: FROM_CvMat(CvMat*) in module.cpp.o "__Py_NoneStruct", referenced from: boost::python::api::object::object() in module.cpp.o ld: symbol(s) not found for architecture x86_64 }}} Apply this patch {{{ diff --git a/cv_bridge/src/CMakeLists.txt b/cv_bridge/src/CMakeLists.txt index 03a02b8..6c8a69f 100644 --- a/cv_bridge/src/CMakeLists.txt +++ b/cv_bridge/src/CMakeLists.txt @@ -20,6 +20,7 @@ include_directories(SYSTEM ${PYTHON_INCLUDE_PATH} add_library(${PROJECT_NAME}_boost module.cpp) target_link_libraries(${PROJECT_NAME}_boost ${Boost_LIBRARIES} ${catkin_LIBRARIES} + ${PYTHON_LIBRARIES} ${PROJECT_NAME} ) }}} More info in http://answers.ros.org/question/52341/building-cv_bridge-with-catkin-fails/ === No builder module in catkin === If catkin is already installed in homebrew, you may get the following message when trying to run catkin_make_isolated {{{ Traceback (most recent call last): File "./src/catkin/bin/catkin_make_isolated", line 13, in from catkin.builder import build_workspace_isolated ImportError: No module named builder }}} A quick solution is to remove catkin brew installation from the system {{{ brew remove catkin }}} === bondcpp fails === If bondcpp fails with: {{{ ==> Processing catkin package: 'bondcpp' ==> Building with env: '/Users/william/ros_catkin_ws/install_isolated/env.sh' Makefile exists, skipping explicit cmake invocation... ==> make cmake_check_build_system in '/Users/william/ros_catkin_ws/build_isolated/bondcpp' ==> make -j1 in '/Users/william/ros_catkin_ws/build_isolated/bondcpp' Linking CXX shared library /Users/william/ros_catkin_ws/devel_isolated/bondcpp/lib/libbondcpp.dylib ld: library not found for -luuid clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [/Users/william/ros_catkin_ws/devel_isolated/bondcpp/lib/libbondcpp.dylib] Error 1 make[1]: *** [CMakeFiles/bondcpp.dir/all] Error 2 make: *** [all] Error 2 <== Failed to process package 'bondcpp': KeyboardInterrupt Command failed, exiting. }}} Update brew and rosdep: . {{{ $ brew update $ rosdep update }}} Rerun rosdep: {{{{{#!wiki version groovy . {{{ $ rosdep install --from-paths src --ignore-src --rosdistro groovy -y }}} }}}}} {{{{{#!wiki version hydro . {{{ $ rosdep install --from-paths src --ignore-src --rosdistro hydro -y }}} }}}}} Then it should build. === Pyside brew installation fails with segmentation fault === The output presented denotes a segmentation fault when using shiboken package as part of the pyside compilation process. {{{ /bin/sh: line 1: 22299 Segmentation fault: 11 /usr/local/Cellar/shiboken/1.1.2/bin/shiboken --generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero /tmp/pyside-rAxK/pyside-qt4.8+1.1.2/macbuild/PySide/pyside_global.h --include-paths=/tmp/pyside-rAxK/pyside-qt4.8+1.1.2/PySide:/usr/local/Cellar/qt/4.8.5/Frameworks --typesystem-paths=/tmp/pyside-rAxK/pyside-qt4.8+1.1.2/PySide:/tmp/pyside-rAxK/pyside-qt4.8+1.1.2/PySide/QtCore --output-directory=/tmp/pyside-rAxK/pyside-qt4.8+1.1.2/macbuild/PySide/QtCore --license-file=/tmp/pyside-rAxK/pyside-qt4.8+1.1.2/PySide/QtCore/../licensecomment.txt /tmp/pyside-rAxK/pyside-qt4.8+1.1.2/macbuild/PySide/QtCore/typesystem_core.xml --api-version=4.8 --drop-type-entries="" }}} A previous version of qt must be brewed. Uninstall pyside, shiboken and qt {{{ brew uninstall pyside brew uninstall shiboken brew uninstall qt }}} and then follow this steps {{{ cd `brew --prefix` brew uninstall qt git checkout 7fc8cc0 /usr/local/Library/Formula/qt.rb brew uninstall qt # Might not be necessary on your machine brew install pyside }}} More information in https://github.com/mxcl/homebrew/issues/21289. === rviz === Link error: {{{ Linking CXX executable /Users/william/ros_catkin_ws/devel_isolated/rviz/lib/rviz/image_view Undefined symbols for architecture x86_64: "_GetCurrentProcess", referenced from: _main in main.cpp.o "_SetFrontProcess", referenced from: _main in main.cpp.o "_TransformProcessType", referenced from: _main in main.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [/Users/william/ros_catkin_ws/devel_isolated/rviz/lib/rviz/image_view] Error 1 make[1]: *** [src/image_view/CMakeFiles/rviz_image_view.dir/all] Error 2 make: *** [all] Error 2 <== Failed to process package 'rviz': KeyboardInterrupt Command failed, exiting. }}} Install error: {{{ -- Installing: /Users/william/ros_catkin_ws/install_isolated/lib/libdefault_plugin.dylib -- Installing: /Users/william/ros_catkin_ws/install_isolated/lib/python2.7/site-packages/rviz/librviz_shiboken.dylib CMake Error at src/python_bindings/sip/cmake_install.cmake:31 (FILE): file INSTALL cannot find "/Users/william/ros_catkin_ws/devel_isolated/rviz/lib/python2.7/site-packages/rviz/librviz_sip.dylib". Call Stack (most recent call first): src/python_bindings/cmake_install.cmake:33 (INCLUDE) src/cmake_install.cmake:35 (INCLUDE) cmake_install.cmake:155 (INCLUDE) make: *** [install] Error 1 <== Failed to process package 'rviz': KeyboardInterrupt Command failed, exiting. }}} Both of these errors are solved in this pull request: https://github.com/ros-visualization/rviz/pull/563 Runtime error: {{{ ∫ rosrun rviz rviz [ INFO] [1358386092.761466000]: rviz version 1.9.19 [ INFO] [1358386092.761550000]: compiled against OGRE version 1.7.4 (Cthugha) [ WARN] [1358386096.686693000]: OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library /usr/local/Cellar/ogre/1.7.4/lib/RenderSystem_GL. System Error: dlopen(/usr/local/Cellar/ogre/1.7.4/lib/RenderSystem_GL.dylib, 9): image not found in DynLib::load at /tmp/ogre-w5AP/ogre_src_v1-7-4/OgreMain/src/OgreDynLib.cpp (line 91) terminate called throwing an exceptionAbort trap: 6 }}} Pull request: https://github.com/ros-visualization/rviz/pull/564 Runtime error: {{{ [ INFO] [1358387448.148951000]: rviz version 1.9.19 [ INFO] [1358387448.149035000]: compiled against OGRE version 1.7.4 (Cthugha) 2013-01-16 17:50:52.329 rviz[29323:5c03] invalid drawable [ WARN] [1358387452.385106000]: OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : rviz/box.geom Cannot compile GLSL high-level shader : rviz/box.geom ERROR: 0:1: '' : version '150' is not supported ERROR: 0:18: ';' : syntax error Uniform blocks may not have identifiers in GLSL 140 ERROR: 0:23: 'layout' : syntax error syntax error in GLSLProgram::compile at /tmp/ogre-w5AP/ogre_src_v1-7-4/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65) [ WARN] [1358387452.387979000]: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /tmp/ogre-w5AP/ogre_src_v1-7-4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425) [ WARN] [1358387452.390215000]: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /tmp/ogre-w5AP/ogre_src_v1-7-4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425) [ WARN] [1358387452.391235000]: OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : rviz/include/pass_depth.geom Cannot compile GLSL high-level shader : rviz/include/pass_depth.geom ERROR: 0:1: '' : version '150' is not supported in GLSLProgram::compile at /tmp/ogre-w5AP/ogre_src_v1-7-4/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65) terminate called throwing an exceptionAbort trap: 6 }}} https://github.com/ros-visualization/rviz/pull/558 === orocos_kdl fails on rosmake -a === orocos_kdl may fail during rosmake -a outputting long error messages that include the line {{{ ld: symbol(s) not found for architecture i386 }}} Erase "i386," from the following line in the Makefile located in orocos_kdl folder {{{ -DCMAKE_OSX_ARCHITECTURES="i386,x86_64" }}} Deleting build/CMakeCache.txt file may also be necessary for the package to finally compile. === rosdep permission issues === Installing rosdep as sudo may lead to permission issues during installation of dependencies {{{ ERROR: Rosdep experienced an internal error: [Errno 13] Permission denied: '~/.ros/rosdep/sources.cache/index' Please go to the rosdep page [1] and file a bug report with the stack trace below. [1] : http://www.ros.org/wiki/rosdep Traceback (most recent call last): File "/Library/Python/2.7/site-packages/rosdep2/main.py", line 116, in rosdep_main exit_code = _rosdep_main(args) File "/Library/Python/2.7/site-packages/rosdep2/main.py", line 257, in _rosdep_main return _package_args_handler(command, parser, options, args) File "/Library/Python/2.7/site-packages/rosdep2/main.py", line 334, in _package_args_handler lookup = _get_default_RosdepLookup(options) File "/Library/Python/2.7/site-packages/rosdep2/main.py", line 107, in _get_default_RosdepLookup verbose=options.verbose) File "/Library/Python/2.7/site-packages/rosdep2/sources_list.py", line 501, in create_default sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose) File "/Library/Python/2.7/site-packages/rosdep2/sources_list.py", line 419, in load_cached_sources_list with open(cache_index, 'r') as f: IOError: [Errno 13] Permission denied: '~/.ros/rosdep/sources.cache/index' }}} To resolve, recursively change the owner on the ~/.ros directory to the current user: sudo chown -R '''''' /Users/''''''/.ros === tf2_ros fails to build === If you are getting this error while building tf2_ros: {{{ ==> make -j4 -l4 in '/Users/Yeison/ros_catkin_ws/build_isolated/tf2_ros' Linking CXX shared library /Users/Yeison/ros_catkin_ws/devel_isolated/tf2_ros/lib/libtf2_ros.dylib Undefined symbols for architecture x86_64: }}} try to edit src/tf2_ros/CMakeLists.txt according to https://github.com/ros/geometry-experimental/pull/6 === CMAKE_OSX_DEPLOYMENT_TARGET errors === Errors such like these: {{{ CMake Error at /usr/local/Cellar/cmake/2.8.10.2/share/cmake/Modules/Platform/Darwin.cmake:190 (message): CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' but CMAKE_OSX_SYSROOT: "" is not set to a MacOSX SDK with a recognized version. Either set CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to empty. }}} were fixed by commenting one line in ~/ros_catkin_ws/install_isolated/share/ros/core/rosbuild/public.cmake as shown below: {{{ if(APPLE) #SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6" CACHE STRING "Deployment target for OSX" FORCE) endif(APPLE) }}} === "Library not found" errors === A fix to errors like this one {{{ ld: library not found for -l:/usr/local/lib/libboost_signals-mt.dylib }}} consists in the removal of extra ':' in *.pc files. This can be done automatically using the commands {{{ $ cd ~/ros_catkin_ws/install_isolated/lib/pkgconfig $ find *.pc -print0 | xargs -0 sed -i .bak 's/\-l:/\-l/g' }}} Note that usually need to {{{make clean}}} the packages where the error occurs. === nodelet_tutorial_math fails to build === If nodelet_tutorial_math fails to build with errors like {{{ ------------------------------------------------------------------------------- -- Configuring done -- Generating done -- Build files have been written to: /Users/alex/ros_ws/common_tutorials/nodelet_tutorial_math/build cd build && make -j -l8 Scanning dependencies of target rospack_genmsg_libexe [ 0%] Built target rospack_genmsg_libexe Scanning dependencies of target rosbuild_precompile [ 0%] Built target rosbuild_precompile Scanning dependencies of target nodelet_math [100%] Building CXX object CMakeFiles/nodelet_math.dir/src/plus.cpp.o Linking CXX shared library ../lib/libnodelet_math.dylib clang: warning: argument unused during compilation: '-pthread' Undefined symbols for architecture x86_64: "class_loader::class_loader_private::AbstractMetaObjectBase::addOwningClassLoader(class_loader::ClassLoader*)", referenced from: void class_loader::class_loader_private::registerPlugin(std::string const&, std::string const&) in plus.cpp.o "class_loader::class_loader_private::AbstractMetaObjectBase::setAssociatedLibraryPath(std::string)", referenced from: void class_loader::class_loader_private::registerPlugin(std::string const&, std::string const&) in plus.cpp.o "class_loader::class_loader_private::AbstractMetaObjectBase::AbstractMetaObjectBase(std::string const&, std::string const&)", referenced from: class_loader::class_loader_private::AbstractMetaObject::AbstractMetaObject(std::string const&, std::string const&) in plus.cpp.o "class_loader::class_loader_private::AbstractMetaObjectBase::~AbstractMetaObjectBase()", referenced from: class_loader::class_loader_private::AbstractMetaObject::AbstractMetaObject(std::string const&, std::string const&) in plus.cpp.o "class_loader::class_loader_private::getFactoryMapForBaseClass(std::string const&)", referenced from: std::map, std::allocator > >& class_loader::class_loader_private::getFactoryMapForBaseClass() in plus.cpp.o "class_loader::class_loader_private::getCurrentlyActiveClassLoader()", referenced from: void class_loader::class_loader_private::registerPlugin(std::string const&, std::string const&) in plus.cpp.o "class_loader::class_loader_private::getCurrentlyLoadingLibraryName()", referenced from: void class_loader::class_loader_private::registerPlugin(std::string const&, std::string const&) in plus.cpp.o "class_loader::class_loader_private::getPluginBaseToFactoryMapMapMutex()", referenced from: void class_loader::class_loader_private::registerPlugin(std::string const&, std::string const&) in plus.cpp.o "class_loader::class_loader_private::hasANonPurePluginLibraryBeenOpened(bool)", referenced from: void class_loader::class_loader_private::registerPlugin(std::string const&, std::string const&) in plus.cpp.o "console_bridge::log(char const*, int, console_bridge::LogLevel, char const*, ...)", referenced from: void class_loader::class_loader_private::registerPlugin(std::string const&, std::string const&) in plus.cpp.o __GLOBAL__I_a in plus.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [../lib/libnodelet_math.dylib] Error 1 make[2]: *** [CMakeFiles/nodelet_math.dir/all] Error 2 make[1]: *** [all] Error 2 -------------------------------------------------------------------------------} [ rosmake ] Output from build of package nodelet_tutorial_math written to: [ rosmake ] /Users/alex/.ros/rosmake/rosmake_output-20130302-173409/nodelet_tutorial_math/build_output.log [rosmake-5] Finished <<< nodelet_tutorial_math [FAIL] [ 41.04 seconds ] }}} Add a dependency to class_loader in nodelet_tutorial_math/manifest.xml {{{ }}} Fix taken from herehttps://github.com/ros/common_tutorials/issues/3 === If rosmake -a fails with an error related to "BOOST_JOIN" === If rosmake -a fails with an error related to "BOOST_JOIN", e.g. with {{{ usr/local/Cellar/boost/1.53.0/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN" }}} As described [[http://answers.ros.org/question/56056/boost-error-building-catkin-on-os-x/|here]] you need an updated version of ros-tutorials. I had to do the following to make this update work {{{ $ cd ~/ros_catkin_ws $ rm -rf src/ros_tutorials src/roscpp_tutorials src/rospy_tutorials src/turtlesim $ cd src $ git clone https://github.com/ros/ros_tutorials.git $ cd .. $ rm -rf build_isolated $ catkin_make_isolated --install }}} === orocos_kdl Fails to build on OS X 10.9 (Mavericks) === See this issue: https://github.com/orocos/orocos_kinematics_dynamics/pull/4 And check out the more complete write-up: http://answers.ros.org/question/94771/building-octomap-orocos_kdl-and-other-packages-on-osx-109-solution/ === PIL fails to install on OS X 10.9 (Mavericks) === {{{ $ sudo ln -s /usr/local/include/freetype2 /usr/local/include/freetype $ sudo pip install pil --allow-external pil --allow-unverified pil }}} '''Notice''' that there's [[http://apple.stackexchange.com/questions/128448/brew-install-ogre-fails-at-make-install|a report (with work around)]] that `ogre` failed to be installed via `brew`. {{{ [ 12%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreGpuProgramParams.cpp.o cd /tmp/ogre-4JyI/ogre_src_v1-7-4/build/OgreMain && /usr/local/Library/ENV/4.3/clang++ -DBOOST_ALL_NO_LIB -DFREEIMAGE_LIB -DOGRE_NONCLIENT_BUILD -DOgreMain_EXPORTS -D_MT -D_USRDLL -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fPIC -I/tmp/ogre-4JyI/ogre_src_v1-7-4/OgreMain/include -I/tmp/ogre-4JyI/ogre_src_v1-7-4/build/include -I/tmp/ogre-4JyI/ogre_src_v1-7-4/OgreMain/include/OSX -I/usr/local/include -I/opt/X11/include -I/tmp/ogre-4JyI/ogre_src_v1-7-4 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Carbon.framework/Headers -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Cocoa.framework/Headers -I/tmp/ogre-4JyI/ogre_src_v1-7-4/OgreMain/src/nedmalloc -pthread -o CMakeFiles/OgreMain.dir/src/OgreGpuProgramParams.cpp.o -c /tmp/ogre-4JyI/ogre_src_v1-7-4/OgreMain/src/OgreGpuProgramParams.cpp /tmp/ogre-4JyI/ogre_src_v1-7-4/OgreMain/src/OgreFont.cpp:44:10: fatal error: 'freetype.h' file not found #include FT_FREETYPE_H }}} === clang: error: unknown argument: '-mno-fused-madd' === Seen on `OS X 10.9 (Mavericks)` while `rosdep`, particularly with `pil`, `netifaces`. Error output is something similar as follows: {{{ cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -I/usr/local/include/freetype2 -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgraded to a warning) in the future error: command 'cc' failed with exit status 1 }}} This can be worked around by using `-E` option in `sudo` ([[http://stackoverflow.com/a/22322645/577001|ref.]]): {{{ $ export CFLAGS=-Qunused-arguments $ export CPPFLAGS=-Qunused-arguments $ sudo -E pip install PIL }}} === gtk+ fails to install in brew === If an error like the following is displayed: {{{ gtk+: Unsatisfied dependency: XQuartz 2.3.6 }}} XQuartz system must be installed from http://xquartz.macosforge.org/. === rospack fails build with cmake3 - Can't find PythonLibs === [[http://answers.ros.org/question/175612/rospack-failed-to-build-in-hydro-cant-find-pythonlibs/|ref.]] Seen on `OS X 10.9 (Mavericks)` Hydro with brewed cmake versions 3.0.0 & 3.0.2 Error looks like {{{ -- 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:7 (find_package) }}} To fix: In rospack/CMakeLists.txt replace {{{ set(PythonLibs_FIND_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") find_package(PythonLibs REQUIRED) }}} with {{{ find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED) }}} You could also use the commit which fixes this for hydro: {{{ $ cd src/rospack $ curl https://github.com/ros/rospack/commit/246dd14882b6f782de65961fa495b3395c6d4540.diff | patch -p1 $ cd - }}} === Error compiling rosbag_storage on Yosemite === [[http://answers.ros.org/question/207470/error-compiling-rosbag_storage-on-mac-os-x-yosemite/|ref.]] Seen on Yosemite 10.10.3. When compiling rosbag_storage, error looks like: {{{ /usr/local/include/boost/format/format_fwd.hpp:24:69: error: no type named 'allocator' in namespace 'std' class Tr = BOOST_IO_STD char_traits, class Alloc = std::allocator > ~~~~~^ /usr/local/include/boost/format/format_fwd.hpp:24:78: error: expected ',' or '>' in template-parameter-list class Tr = BOOST_IO_STD char_traits, class Alloc = std::allocator > ^ /usr/local/include/boost/format/format_fwd.hpp:24:83: error: expected unqualified-id class Tr = BOOST_IO_STD char_traits, class Alloc = std::allocator > ^ /usr/local/include/boost/format/format_fwd.hpp:27:13: error: unknown type name 'basic_format' typedef basic_format format; ^ /usr/local/include/boost/format/format_fwd.hpp:27:25: error: expected unqualified-id typedef basic_format format; ^ /usr/local/include/boost/format/format_fwd.hpp:30:13: error: unknown type name 'basic_format' typedef basic_format wformat; ^ /usr/local/include/boost/format/format_fwd.hpp:30:25: error: expected unqualified-id typedef basic_format wformat; }}} To fix, apply this patch provided by crazyorc: {{{ --- src/roscpp_core/roscpp_traits/include/ros/message_forward.h.orig 2015-04-22 15:04:29.000000000 -0700 +++ src/roscpp_core/roscpp_traits/include/ros/message_forward.h 2015-04-22 15:46:31.000000000 -0700 @@ -28,6 +28,11 @@ #ifndef ROSLIB_MESSAGE_FORWARD_H #define ROSLIB_MESSAGE_FORWARD_H +// Make sure that either __GLIBCXX__ or _LIBCPP_VERSION is defined. +#include + // C++ standard section 17.4.3.1/1 states that forward declarations of STL types // that aren't specializations involving user defined types results in undefined // behavior. Apparently only libc++ has a problem with this and won't compile it. }}} === homebrew: Failed to detect successful installation of pyqt === This error could happen with other module and is not specific to ROS at all. Here we show the error with `pyqt` as an example. {{{ $ rosdep install --from-paths src --ignore-src --rosdistro indigo -y --as-root pip:no --skip-keys="gazebo" executing command [brew install pyqt] Warning: pyqt-4.11.3 already installed, it's just not linked ERROR: the following rosdeps failed to install homebrew: Failed to detect successful installation of [pyqt] }}} Simply (re)link `pyqt`. {{{ $ brew link pyqt }}}