Compiling ACE

From Wiki for iCub and Friends
Jump to: navigation, search

Linux

A brief summary:

  • Download ACE (see Which ACE version from: http://download.dre.vanderbilt.edu/, and unpack it. Important: get packets like ACE-x.y.z.zip rather than ACE-src-x.y.z.zip.
  • set the environment variable ACE_ROOT to point to the directory where ace is unpacked, update your .bashrc accordingly e.g.:
 export ACE_ROOT="/home/user/ACE_wrappers"
  • Build a symlink to config.h as (config.h is in ACE_wrappers/ace):
cd $ACE_ROOT/ace
ln -s config-linux.h config.h

and (which can be found in ACE_wrappers/include/makeinclude):

cd $ACE_ROOT/include/makeinclude
ln -s platform_linux.GNU platform_macros.GNU
  • Compile ace:
cd $ACE_ROOT/ace
make

When you are done you should see the .so libraries in $ACE_ROOT/lib.

Don't forget to set up the environment veriable ACE_ROOT to point to where ACE was unpacked (e.g. ACE_wrappers). This will be used later on by (CMake) to find the ACE library.

A note about LD_LIBRARY_PATH: instructions on the ACE website recommend you update your .bashrc to modify the variable LD_LIBRARY_PATH, i.e:

 export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH

Some people strongly discourage the use of the LD_LIBRARY_PATH, and indeed this is required only if you install the iCub software and you do *not* install the ACE library. For these cases we provide the possibility to add rpath to the binaries. More details are available here: Avoid LD_LIBRARY_PATH.

Original instructions

The above instructions are a summary of: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html, section "Building and Installing ACE on UNIX" --> "Using the Traditional ACE/GNU Configuration".

Important: if you follow the instructions on the ACE website choose "Using the Traditional ACE/GNU Configuration" method. The other methods will compile successful, but the library you get might not work properly with YARP.

Windows

Precompiled binaries

For Visual Studio 8 and 9 we provide precompiled versions:

 http://wiki.icub.org/iCub/downloads/packages/windows/

Get the archive that matches your compiler (e.g. ACE-5.8.0-bin-msvc9.zip for Visual Studio 9) and unzip it. Set environment variables:

  • set the environment variable ACE_ROOT to point to the directory where ace is unpacked, e.g:
 ACE_ROOT=C:/dev/ACE_wrappers
  • add %ACE_ROOT%/lib to your system path, this is important to allow windows to locate ace.dll at runtime

Compiling ACE on Windows

If you want to download and compile ACE on your system follow instructions at: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html, section "Building and Installing ACE on Windows" --> "Building and Installing ACE on Windows with Microsoft Visual Studio".

A brief summary:

 ACE_ROOT=C:/dev/ACE_wrappers
  • add %ACE_ROOT%/lib to your system path, this is important to allow windows to locate ace.dll at runtime
  • You will find the Visual Studio project files there in the ACE_wrappers directory. We suggest to use the ones within the ACE_wrappers/ace directory which compiles only the subset of the library you need (save a lot of compilation time). Pick the file that matches your compiler (e.g. ACE_vc8.sln)
  • Before compiling, ACE requires the ACE_wrappers/ace/config.h file. This can be made equal (copy) to the ace/config-win32.h which has provisions for the supported WIN32 compilers. Then simply compile the libraries (from Visual Studio). Get a coffee, it takes a while.


Don't forget to set up the environment veriable ACE_ROOT to point to where ACE was unpacked (e.g. ACE_wrappers). This will be used later on by CMake to find the ACE library.

Don't forget to update your system path so that windows can locate ace.dll/aced.dll at runtime: append %ACE_ROOT%/lib to your system path.