Cross Install TAO (CORBA)

ACE+TAO Cross Build for ARM/Linux Target on Debian amd64 host

Prerequisites

  1. ACE+TAO native build should be completed in advance.  

The version installed on host and the target should be identical, otherwise idl compiler generated code may get an error.

Environment summary

  • Host OS: Linux jessie 3.16-2-amd64 #1 SMP Debian 3.16.3-2 (2014-09-20) x86_64 GNU/Linux
  • Perl v5.20.1  built for x86_64-linux-gnu-thread-multi
  • Host native compiler: gcc (Debian 4.9.1-15) 4.9.1
  • cross tool chain: arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) 4.8.3 20140303 (prerelease), Raspberry Pi Tools
  • cross tool cain: arm-linux-gnueabihf-gcc from Debian MultiArch
  • ACE+TAO Version: 6.3.0

Get a source

svn co svn://svn.dre.vanderbilt.edu/DOC/Middleware/sets-anon/ACE+TAO .

 

cd ACE_wrappers
mkdir -p build/linux-armhf
./bin/create_ace_build build/linux-armhf
cd build/linux-armhf

 

Create ace/config.h;

cat <<EOT > ace/config.h
#define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1
#include "config-linux.h"
EOT

 

Create include/makeinclude/platform_macros.GNU as;

cross_compile=1
shared_libs=1
static_libs=1
inline=0
ssl=0
zlib=1
optimize=1
no_hidden_visibility=1
TAO_IDL := /usr/local/ace+tao/6.3.0/bin/tao_idl
TAO_IDLFLAGS += -g /usr/local/ace+tao/6.3.0/bin/gperf
CROSS_COMPILE=arm-linux-gnueabihf-
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
 

And also for Raspberry Pi (Debian Wheezy gcc-4.8 target), INSTALL PREFIX as following;

INSTALL_PREFIX=/opt/raspi/arm-linux-gnueabihf/usr/local/ace+tao/6.3.0

Set environment variables as below (on build/linux-armhf directory)

export ACE_ROOT=`pwd`
export TAO_ROOT=$ACE_ROOT/TAO
export LD_LIBRARY_PATH=$ACE_ROOT/lib

Generate makefiles and build 

cd $TAO_ROOT
../bin/mwc.pl TAO_ACE.mwc -type gnuace 
make -j4
make install

 

Destination directory (/nfs/local/pi/ace+tao/6.2.8) contains binaries for ARM processor not only libraries but also IDL compiler and related tools.  I'm not sure the effect for use host IDL compiler to generate proxy code and compile it by cross compiler, will see.

 

Reference

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

http://mscheminfocom.ipage.com/tiki/tiki-index.php?page=Cross+install+ACE+TAO+on+ARM+Linux

English

User login