Yet Another Robot Platform
Installing YARP on macOS

Prerequisites installation

This installation has been confirmed to work on macOS from 10.9 on with Homebrew.

Installing Xcode

To compile anything on macOS (including YARP), you'll need to have Xcode installed. This can be done through the App Store.

Once installed, you need to install the Command Line Tools. To do this, open Xcode, go to Xcode->Preferences->Downloads and install Command Line Tools.

If you do not see the option install Command Line Tools, run the following on a terminal

xcode-select --install

Once this is done, you can now continue with the next installation steps.

Installing Homebrew

Please install Homebrew using the following commands or visit and follow the official installation steps

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After the installation, you can run the following command to check if your setup has been successful:

brew doctor

Installing YARP

Once you have installed the prerequisites, you can now proceed to install YARP from source. First install the dependencies, download the code from the repository and then proceed with the installation.

Installing YARP Dependencies

Here we provide information for installing the YARP dependencies via Homebrew. In order to install the YARP dependencies enter the following command in a terminal:

brew install ace boost cmake eigen jpeg libedit opencv pkg-config portaudio sqlite tinyxml

For compiling the required bindings (LUA, JAVA, PYTHON etc) you need swig

brew install swig

For compiling the Qt5 GUIS:

brew install qt@5

Now, add the environmental variable for Qt5

cd ~
open -a TextEdit .bash_profile

and copy the following line

export Qt5_DIR=/usr/local/opt/qt5/lib/cmake

[Optional]: Installing GDK PIXBUF Dependencies

Programs that require this GDK PIXBUF need to set the environment variable correctly. Just to be on the safe side add this to the .bash_profile

cd ~
open -a TextEdit .bash_profile
export GDK_PIXBUF_MODULEDIR="/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"

To refresh and load these environment settings type:

source ~/.bash_profile

Download and install

In the directory where you would like to store your code, e.g. /Users/your_user_name/Dev/ run the following git command to clone YARP on your system

git clone https://github.com/robotology/yarp.git

Now move into the source folder and create the build directory

cd yarp
mkdir build
cd build
int mkdir(const char *p)
Portable wrapper for the mkdir() function.
Definition: Os.cpp:37
The main, catch-all namespace for YARP.
Definition: dirs.h:16

You can now compile and install YARP with (at least) two different methods: GNU Makefile and Xcode. The former is simpler, while the latter creates an Xcode project which can come in handy if you wish to contribute to the YARP development.

If not stated differently (e.g. we are compiling YARP on a robot environment which can have different policies), we strongly suggest to install YARP after the compilation. Note that, by default, YARP is installed in /usr/local. We strongly suggest to change this folder to a non-system one.

Compile YARP using GNU Makefiles

In this case, you simply have to issue the cmake command

ccmake ..

configure it correctly by enabling the following flags (simple solution):


and, if you want to install YARP, by changing the path pointed by the CMake variable


configure (press 'c' until all the * disappears) & generate ('g'), then:


If you want to install issue also a

make install

(Note: if the install directory is a system directory you may need administrator privileges, e.g. you have to use sudo).

After the installation, you will need to set your Environment variables configuration.

Compile YARP using Xcode

In order to generate and Xcode project do the following:

ccmake .. -G Xcode

As before, configure the project and the install directory:


This will generate a YARP.xcodeproj file which can be opened with Xcode. Build it by clicking Product -> Build or cmd+B shortcut. One can also compile the Release binaries by clicking Product -> Archive.

Alternatively, it is possible to directly compile the project on the command line by

xcodebuild [-configuration Debug|Release|Other Configs] [-target ALL_BUILD|install|Other Targets]

If no options are specified the ALL_BUILD target is compiled in Debug configuration. In general the following command will build and install YARP in release mode:

xcodebuild -configuration Release -target install

After the installation, you will need to set your Environment variables configuration.

Environment variables configuration

In order to follow the KISS principle we are using the native mac editor Textedit. Please feel free to use whichever tool/editor you prefer.

Add the YARP environment variable in

cd ~
open -a TextEdit .bash_profile

If the following command result in an error: The file .... does not exist, do the following first:

cd ~
touch .bash_profile

If you installed from Homebrew:

export YARP_DATA_DIRS=/usr/local/share/yarp

To refresh and load these environment settings type:

source ~/.bash_profile

Now you can check if YARP has been properly installed by running a Quick YARP run test.

If you installed from source:

In the following we assume that YARP has been installed. In case you are using the build version, instead, the YARP_DIR path should point to the build directory.

# YARP_ROOT points to the repository
export YARP_ROOT=/Users/your_user_name/Dev/yarp
export YARP_DIR=/path/to/install/dir
export PATH=$PATH:$YARP_DIR/bin

Notice that if you did not install AND you used the Xcode version the last line becomes

export PATH=$PATH:$YARP_DIR/bin/Release

Now setup YARP_DATA_DIRS by adding this to the .bash_profile:

export YARP_DATA_DIRS=${YARP_DIR}/share/yarp

To refresh and load these environment settings type:

source ~/.bash_profile

Check if YARP has been properly installed by running a Quick YARP run test.

Quick YARP run test

Now to quickly test the system run this in a terminal:

and you should get something like:

This is the YARP network companion.
Call with the argument "help" to see a list of ways to use this program.

If this test run properly, you can proceed with the following link: Check your installation.