Installing via Macports on Mac OS X

These are instructions to install the latest version of each of RTT, KDL, BFL and OCL, on Mac OS X using Macports.

Macports does not have official ports for these Orocos projects, however, the approach below is the recommended way to load unofficial ports in to Macports. [1]


These instructions use /opt/myports to hold the Orocos port files. You can substitute any other directory for MYPORTDIR (ie /opt/myports). Instructions are for bash shell - change appropriately for your own shell.

1. Download the Portfile files from this page's Attachments (at bottom of page).

2. Execute the following commands (substituting /opt/myports for the location you wish to store the Orocos port files, and ~/Downloads for the directory you downloaded the portfiles to)

export MYPORTDIR=/opt/myports
export DOWNLOADDIR=~/Downloads
mkdir devel
cd devel
mkdir orocos-rtt orocos-kdl orocos-bfl orocos-ocl
cp \$DOWNLOADDIR/orocos-rtt-Portfile.txt orocos-rtt/Portfile
cp \$DOWNLOADDIR/orocos-kdl-Portfile.txt orocos-kdl/Portfile
cp \$DOWNLOADDIR/orocos-bfl-Portfile.txt orocos-bfl/Portfile
cp \$DOWNLOADDIR/orocos-ocl-Portfile.txt orocos-ocl/Portfile
And for the RTT patch file
cd \$MYPORTDIR/devel
mkdir orocos-rtt/files
cp \$DOWNLOADDIR/rtt-patch-config-check_depend.cmake.diff orocos-rtt/files/patch-config-check_depend.cmake.diff

You should now have a tree that looks like

tree /opt/myports/
`-- devel
    |-- orocos-bfl
    |   `-- Portfile
    |-- orocos-kdl
    |   `-- Portfile
    |-- orocos-ocl
    |   `-- Portfile
    `-- orocos-rtt
       |-- Portfile
       `-- files
           `-- patch-config-check_depend.cmake.diff

3. Edit /opt/local/etc/macports/sources.conf with superuser privileges (ie via sudo), and add the follwing line before the rsync:///' line.

# (substitute your ''MYPORTDIR'' value from above) 

4. Execute these commands to tell Macports about your new ports.

sudo portindex

5. Now install each port with the following commands (the following commands add the optional CORBA support, via omniORB in Macports, as well as the helloworld and other useful parts of OCL)

sudo port install orocos-rtt +corba
sudo port install orocos-kdl +corba
sudo port install orocos-bfl
sudo port install orocos-ocl +corba+deployment+motion_control+reporting+taskbrowser+helloworld

6. Verify installation by downloading test-macports.xml from this page's Attachments, and then using these commands

deployer-macosx -s /path/to/test-macports.xml
This should succesfully load and start the OCL HelloWorld component within the taskbrowser. You may need to specify the paths to the dynamic libraries, for this to work
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib
Yes, it is DYLD_FALLBACK_LIBRARY_PATH and not DYLD_LIBRARY_PATH. Search the forum if you want to know why ...

Building your application

To build against MacPorts-installed Orocos, add the following to your environment before CMake'ing your project

export CMAKE_PREFIX_PATH=/opt/local
If you already have CMAKE_PREFIX_PATH set, then append "/opt/local" to your existing entry.

If you use Makefiles or autoconf to build your project, you'll need to tell those build systems to find Orocos headers, libraries and binaries under /opt/local. Instructions are not provided here for that.

To run using MacPorts-installed OROCOS, add the following to your environment

export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:/opt/local/lib/rtt/macosx/plugins
If you already have DYLD_FALLBACK_LIBRARY_PATH set, then append the above to your existing entry.

Updating an existing installation

(Not yet tested)

  1. Download the new portfiles.
  2. Uninstall each of the old ports

sudo port uninstall orocos-rtt
  1. Copy the new portfiles on top of the old ones
  2. Regenerate the port index
  3. Reinstall

Limitations and issues

Current limitations

  • CORBA support assumes omniorb
  • KDL supports the Python plugin for Python 2.5, but not Python 2.6.
  • BFL defaults to boost
  • OCL could use more variants to provide finer control


  • If when running an Orocos executable, or your own executable linked with Orocos, you get the following error

dyld: Symbol not found: __cg_jpeg_resync_to_restart 
  Referenced from: 
  Expected in: /opt/local/lib/libJPEG.dylib 
then ensure you have the DYLD_FALLBACK_LIBRARY_PATH set and not DYLD_LIBRARY_PATH. See [2] for further details.


[1] Macports guide with detailed information on the port system.


Original bug report for this and accompanying forum entry

orocos-rtt-Portfile.txt1.82 KB
orocos-kdl-Portfile.txt2.13 KB
orocos-bfl-Portfile.txt1.36 KB
orocos-ocl-Portfile.txt2.67 KB
rtt-patch-config-check_depend.cmake_.diff607 bytes
test-macports.xml472 bytes