Installing YARP

YARP is available from http://yarp0.sourceforge.net

A quick summary of installation for Ubuntu users:

  sudo apt-get install cmake libace-dev subversion
  svn co https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2 yarp2
  cd yarp2; mkdir build; cd build; cmake ..
  make
  sudo make install  # Optional. 
  # Alternative: set environment variable YARP_DIR to .../yarp2/build
  #              and add .../yarp2/build/bin to PATH
  yarp check

Here are the more general steps needed to install YARP:

We suggest that, if you are a first-time user of YARP, you install it on one or two machines first, before trying to set it up for a cluster.

Installing CMake

YARP is for programmers. We'd like every YARP user all to use the development environment you are used to, and not force you to switch to something else -- no Linux/g++/emacs vs Windows/DevStudio vs Mac/... fights please!

To achieve this without complete chaos, we ask you to install "CMake". CMake lets us describe our programs and libraries in a cross-platform way. CMake takes care of building the makefiles or workspaces needed by whatever development environment you like to work in.

Read about and install CMake from here: http://www.cmake.org/

Tips for CMake Installation

Install CMake from here: http://www.cmake.org/HTML/Download.html

CMake in Windows

On Windows, the easiest way to use CMake is via its GUI. After installing, you should have an icon for CMake in your START menu. Click that, then fill in the path to your code, and the path you want CMake to build in (that can be the same if you want). Click "configure". Depending on the project, configuration may involve several steps -- you may have to answer new questions and click "configure" again. When the "OK" button becomes clickable, then CMake has enough information to set up your project. Click "OK" and you're done. Project files of the type you specified should exist in the build path you gave.

If you want to start over from the beginning with CMake, it is important to press the "delete cache" button to make it forget everything you've told it.

CMake in UNIX

On UNIX CMake can be used conveniently in two ways:

If you are running CMake while in a directory different to where your code is, replace "." with the path to your code.

"ccmake" is very much like the Windows GUI, and you may need to iterate "configure" a few times before the option to "generate" appears.

"cmake" doesn't ask questions, and just uses defaults. You can pass it values on the command line:

  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .

The generated file "CMakeCache.txt" contains all settings stored by CMake. It can be useful to delete this if you want to start over completely.

CMake Example

Create a new directory, something like "$HOME/cmake/example" or "C:\cmake\example".

Inside that directory, create a file called "CMakeLists.txt". In it place the following:

 PROJECT(example)
 ADD_EXECUTABLE(example main.cpp)

In the same directory, create a file called "main.cpp". In it place the following:

 #include <stdio.h>
 int main() {
   printf("CMake the world a better place!\n");
   return 0;
 }

In UNIX, type "cmake ." in that directory, and then "make", and then "./example". Easy!

On Windows, run the CMake GUI, fill in the path to the example, click "configure", say what compiler you use, click "configure" again if needed, then click "ok". Then run your compiler, and finally the program. Easy!

Notice that the abstract description of our project above can be shared by developers on Windows, Linux, OSX, ...

The ACE library

CMake liberates your project from the particular development environment you are using. But the code itself may still have operating-system dependencies that will make life difficult. ACE is a free and open source library that provides an excellent portable interface to a vast array of operating systems, dealing with the details so you don't have to.

The general approach to installing ACE

Compile ACE using our summary instructions, below, or through the official method given here:

http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html

Don't panic! The instructions cover a lot of operating systems and compilers. Just look carefully for your combination.

ACE will take a while to compile, but if you can do it you'll be able to deal with anything we throw at you. If you run into trouble building ACE, it is also possible to compile the parts of it needed by YARP with CMake, as follows:

  sudo apt-get install cmake subversion
  svn co https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2 yarp2
  cd yarp2; mkdir build; cd build
  ../scripts/fetch-ace.sh
  cmake ..
  make

This will compile YARP and ACE together. This will work on Windows too, you'll just need to translate the commands.

Compiling ACE on UNIX

If you are on a system with a binary ACE package (Debian, Redhat, ... -- it is usually called libace-dev or libace-devel), then you can just install that and you are done. Otherwise you need to download ACE-5.5.tar.gz as described above and follow these steps:

 tar xzvf - < ACE-5.5.tar.gz
 export ACE_ROOT=$PWD/ACE_wrappers
 setenv ACE_ROOT $PWD/ACE_wrappers
 cd $ACE_ROOT/include/makeinclude/ 
 ln -s platform_linux.GNU platform_macros.GNU
 cd $ACE_ROOT/ace
 ln -s config-linux.h config.h
 cd $ACE_ROOT/ace; make
 $ ls $ACE_ROOT/lib/
 libACE.so  libACE.so.5.4.7
 export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
 setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH

Compiling ACE on Windows

For Borland C++Builder, MinGW, Cygwin instructions see:

http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#win32

For Visual Studio, here's a brief summary of the steps.

 #include "ace/config-win32.h"
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/environment_variables.mspx

On Windows you can unzip the ACE distribution and simply open the workspace file contained within it from within Visual Studio and then start the compilation. We recommend you compile twice, once in debug mode and release mode, so you have both versions of the library available later.

Getting and compiling YARP

YARP can be downloaded from:

or installed from SVN by following the instructions at:

with modulename "yarp2" to get the code. You can compile it with CMake. Documentation is built periodically on the website.

See yarp2/README for compilation tips.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Generated on Wed Jul 21 18:44:30 2010 for YARP by doxygen 1.6.1