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
- Debian/Ubuntu/... Linux: apt-get install cmake
- SUSE Linux: add the GURU YAST repository and use YAST for installing CMake or download directly the rpm from GURU website access
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:
- From the command line : type "cmake ."
- Interactively: type "ccmake ."
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, ...
- There's another example you can try here: http://www.cmake.org/HTML/Examples.html
- For more examples, and details, see: http://www.linuxjournal.com/article/6700
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.
- Read about ACE here: http://www.cs.wustl.edu/~schmidt/ACE.html
The general approach to installing ACE
- For Ubuntu and other deb-based systems, we suggest you install the "libace-dev" package (on rpm-based systems, try libace-devel).
- For Windows and other systems we suggest the latest stable release (ACE-N.N.zip/ACE-N.N.tar.gz). Download ACE here: http://download.dre.vanderbilt.edu/
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.
- Windows/DevStudio instructions are here: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#msvc
- UNIX/gcc instructions are here: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix_traditional
- OSX/gcc users, follow the UNIX instructions.
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:
- Let's suppose you have placed ACE-5.5.tar.gz in the directory $HOME/work/. Then, in this directory, type:
tar xzvf - < ACE-5.5.tar.gz
- You should now have a subdirectory called "ACE_wrappers". Type one (or if you're not sure which, type both) of:
export ACE_ROOT=$PWD/ACE_wrappers setenv ACE_ROOT $PWD/ACE_wrappers
- One of these lines will succeed and the other will fail, depending on what shell you use. That's fine. as long as when you type: "echo $ACE_ROOT" you get the ACE_wrappers directory.
- You now need to configure ACE to your platform, by creating one build file and one include file. If you are on Linux, type:
cd $ACE_ROOT/include/makeinclude/ ln -s platform_linux.GNU platform_macros.GNU cd $ACE_ROOT/ace ln -s config-linux.h config.h
- If you are not on Linux, or even if you are, you should take a look at the platform_*.GNU and config-*.h files and pick the one that matches you.
- Now, to compile, type:
cd $ACE_ROOT/ace; make
- If all goes well, at the end you will have some files in ACE_wrappers/ace, for example (the .so may be .dylib or other variants):
$ ls $ACE_ROOT/lib/ libACE.so libACE.so.5.4.7
- One thing remains to be done; programs need to be able to find the ACE library at run time. You can set this up by runing one of the following:
export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH
- (On OSX, the variable you need to set is DYLD_LIBRARY_PATH).
- An alternative is to copy the files in $ACE_ROOT/lib to a standard library directory, for example, /usr/lib.
- We've given a simple procedure that works for most people. But if you run into a lot of trouble, we suggest you delete the ACE_wrappers directory, recreate it with tar again as above, and follow carefully all the detailed instructions in: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix_traditional
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.
- Get ACE-5.5.zip as described above.
- Unpack its contents to a directory. Find the directory "ACE_wrappers" in the unpacked material.
- In the "ACE_wrappers\ace" directory, create a file called "config.h" and edit it to be just this:
#include "ace/config-win32.h"
- Open Visual Studio. Go to open a project/workspace/solution, and browse to the directory "ACE_wrappers\ace".
- Find the project/workspace/solution that works for you: probably called "ACE.dsw" or "ace_vc8.sln".
- Compile! We suggest you compile both debug and release versions of the library.
- On Visual Studio Express, you may need to add the in project properties -> linker -> input -> additional dependencies: kernel32.lib user32.lib advapi32.lib. See http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
- In the end, you should have some files in the directory ACE_wrappers/lib, including ACE.dll, ACE.lib, ACEd.dll, ACEd.lib (if you compiled both release and debug versions).
- You must make sure you include the path to "ACE_wrappers\lib" in your PATH environment variable whenever you run programs that uses ACE. See generic instructions for setting environment variables:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/environment_variables.mspx
- It is also a good idea to set an environment variable ACE_ROOT to hold the path to ACE_wrappers. This will make it easier to find the libraries and header files.
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.
Generated on Wed Jul 21 18:44:30 2010 for YARP by
1.6.1