Homebrew Mavericks

From Wiki for iCub and Friends
Revision as of 15:17, 18 July 2014 by Vtikha (talk | contribs)
Jump to: navigation, search

This installation has been confirmed to work on OSX Mavericks with Homebrew. Latest update and testing: 18/07/2014 - using OS X 10.9.4 with or without Xcode 5.1.1

Installing Xcode

To compile anything on OS X (including YARP), you'll need to have Xcode (http://developer.apple.com/xcode/) installed. This can be done through the App Store. Once installed, you need to install 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 installation steps

Installing X11

In OS X 10.8 Mountain Lion and later, X11 is not provided anymore. You need to install XQuartz, from http://xquartz.macosforge.org/landing/. In earlier version of OS X, this is not stricly necessary, but recommended as XQuartz is more robust and updated that the system-provided X11.

Installing Homebrew

Before proceeding with the installation we recommend installing wget using curl (can also be done in Homebrew)

 cd ~/Downloads
 curl -O http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz
 tar -zxvf wget-1.15.tar.gz
 cd wget-1.15/

if you get a error configuring: error: --with-ssl was given, but GNUTLS is not available, use the following command.

 ./configure --with-ssl=openssl
 sudo make install

Installing homebrew (http://mxcl.github.com/homebrew/) is very simple, just follow the official installation steps.

After the installation, you can run the following command to check if your setup is good :

  brew doctor

If you had Homebrew already installed on your system, update and upgrade :

  brew update
  brew upgrade

Installing Yarp

Here we provide information for installing the YARP dependencies via Homebrew and getting and compiling YARP from the repository. Install YARP dependencies

 brew install `brew deps --1 yarp | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g'`

and the following for yarpbuilder

 brew install goocanvas

Now you would need to configure pkg-config Add this to the .bash_profile in order to correctly do this:

 cd ~
 open -a TextEdit .bash_profile

and copy the following line:

 export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig/:$PKG_CONFIG_PATH

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

 export GDK_PIXBUF_MODULEDIR="/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"

In the directory where you would like to store your code, e.g. /Users/your_user_name/Dev/ run the following

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

Compile YARP :

 cd yarp
 mkdir build
 cd build
 ccmake ..

configure it correctly and


In order to generate and Xcode project do the following

 cd yarp
 mkdir build
 cd build
 ccmake .. -G Xcode

This will generate a YARP.xcodeproj file which can be opened with Xcode.

Build it by clicking Product -> Build or cmd+B shortcut

Then create the Release binaries by clicking Product -> Archive

Now you need to set the environmental variables:

 cd ~
 open -a TextEdit .bash_profile

and copy the following lines:

 export code=/Users/your_user_name/Dev
 export YARP_ROOT=/Users/your_user_name/Dev/yarp
 export YARP_DIR=/Users/your_user_name/Dev/yarp/build
 export PATH=$YARP_DIR/bin/Release:$PATH

Notice that if you used the terminal version without Xcode the last line becomes:

 export PATH=$YARP_DIR/bin:$PATH

Now setup YARP_DATA_DIRS by adding this to the .bash_profile

 export YARP_DATA_DIRS=/Users/your_user_name/Dev/yarp/build/share/yarp:/Users/your_user_name/Dev/icub-main/build/share/iCub:$ICUBcontrib_DIR/share/ICUBcontrib/