Installing the OROCOS Toolchain (2.8) from source on Mac OSX.
Table of Contents
Tested environments
- OSX Mountain Lion (10.8) (Completely clean environment in virtual machine)
- OSX Yosemite (10.10)
Dependency installation using Macports
Extracted from the instructions on http://www.ros.org/wiki/groovy/Installation/OSX/MacPorts/Repository
Setup
- Install Apple's Developer Tools (Xcode 5 or 6).
- 10.8: After starting Xcode select "Preferences" (?,) >> "Downloads". In "Components" you will find Command Line Tools.
- 10.9 and 10.10: Command Line Tools are automatically installed
- Install MacPorts
- Add the MacPorts binary path to PATH:
echo 'export PATH=/opt/local/bin:/opt/local/sbin:$PATH' >> ~/.bash_profile
- Add the MacPorts library path to LIBRARY_PATH:
echo 'export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH' >> ~/.bash_profile
- Clone ROS-MacPorts Repository Locally and Update MacPorts Configuration
- First checkout an initial copy of the repository:
cd ~ git clone https://github.com/smits/ros-macports.git
- Now we need to tell MacPorts where the local repository clone is. Do this by adding a file:///path/to/clone/location line to /opt/local/etc/macports/sources.conf:
sudo sh -c 'echo file:///Users/user/ros-macports >> /opt/local/etc/macports/sources.conf'
- Sync the port index
sudo port sync
Resolve dependencies
- Install and select the following ports:
sudo port install python27 sudo port select --set python python27 sudo port install boost libxslt lua51 ncurses pkgconfig readline netcdf netcdf-cxx omniORB p5-xml-xpath ros-hydro-catkin py27-sip ros-hydro-cmake_modules eigen3 dyncall ruby20 sudo port select --set nosetests nosetests27 sudo port select --set ruby ruby20
- Open a new terminal and verify your ruby version (should be 2.0.0) :
ruby --version
- Verify if we use the right gem binary (should be /opt/local/bin/gem):
which gem sudo gem install facets nokogiri
- Check the lua version should be 5.1 not 5.2
lua -v
- If 5.2 uninstall lua port (which is lua 5.2)
sudo port uninstall lua
- Install gccxml from source:
git clone https://github.com/gccxml/gccxml cd gccxml mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=/opt/local make sudo make install
Build and installation of the Orocos Toolchain from source
Create a catkin workspace and get the sources
- Create a new ros workspace for building the orocos_toolchain chained with our installed ROS Groovy workspace (which in case if the MacPorts installation is /opt/local):
mkdir -p ~/orocos_ws/src cd ~/orocos_ws/src sudo port install py27-wstool wstool init . curl https://gist.githubusercontent.com/smits/9950798/raw | wstool merge - wstool update cd orocos_toolchain git submodule foreach git checkout toolchain-2.8
Build & install the toolchain
- Build the new workspace (the RUBY_CONFIG_INCLUDE_DIR ends with darwin12 on OSX 10.8 or darwin14 on OSX 10.10)
cd ~/orocos_ws source /opt/local/setup.bash sudo /opt/local/env.sh catkin_make_isolated --install-space /opt/orocos --install --cmake-args -DENABLE_CORBA=TRUE -DCORBA_IMPLEMENTATION=OMNIORB - DRUBY_INCLUDE_DIR=/opt/local/include/ruby-2.0.0 -DRUBY_CONFIG_INCLUDE_DIR=/opt/local/include/ruby-2.0.0/x86_64-darwin13 -DRUBY_LIBRARY=/opt/local/lib/libruby2.0.dylib -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/opt/local"
Use the toolchain
- Source the setup.bash script from the orocos install space:
source /opt/orocos/setup.bash
- To make sure that typegen uses the right compiler for gccxml add the following export to your ~/.bash_profile:
echo ‘export GCCXML_COMPILER=g++-mp-4.3’ >> ~/.bash_profile
- You should be able to run all the tools like the deployer, typegen, rttlua and oro-createpkg
»
- Printer-friendly version
- Login or register to post comments