[omniORB] Cross compiling omniORB

Robert Wilterdink r.j.w.wilterdink at utwente.nl
Mon Aug 15 10:22:29 BST 2011


Dear omniORB-users,

I am trying to cross compile omniORB 4.1.5 for an embedded system (i586) 
on my development machine (x86_64).

However when I follow the instructions on 
http://www.omniorb-support.com/omniwiki/CrossCompiling I get an error, 
see below.

For cross compiling I use an openWRT (clone) generated toolchain with 
gcc 4.2.4 and glibc 2.7. The configure used is as follows:
./configure CC=i486-openwrt-linux-gnu-gcc CXX=i486-openwrt-linux-gnu-g++ 
CFLAGS=-I/home/robert/PC104_xenomai/staging_dir/toolchain-i386_gcc-4.2.4_glibc-2.7/usr/include 
-march=i586 
CXXFLAGS=-I/home/robert/PC104_xenomai/staging_dir/toolchain-i386_gcc-4.2.4_glibc-2.7/usr/include 
-march=i586 
LDFLAGS=-L/home/robert/PC104_xenomai/staging_dir/toolchain-i386_gcc-4.2.4_glibc-2.7/usr/lib 
--host=i486-openwrt-linux-gnu --build=x86_64-pc-linux-gnu 
--prefix=/home/robert/PC104_xenomai/staging_dir/target-i386_glibc-2.7/usr

The configure script does not complain about this and seems to work fine.

Step 2 in the build process (make CC=gcc-3.4 -C 
src/tool/omniidl/cxx/cccp) does not complain either, although the 
includes in the following line appear strange to me:
i486-openwrt-linux-gnu-gcc -c 
-I/home/robert/Embryo/PC104_xenomai/staging_dir/toolchain-i386_gcc-4.2.4_glibc-2.7/usr/include 
-march=i586  -DHAVE_CONFIG_H -I. -I. -I. -I../../../../../include 
-I../../../../../include -D__OSVERSION__=2 -D__linux__ -D__x86__ -o 
cexp.o cexp.c
I would have expected it to be pointing to the CFLAGS include directory, 
shouldn't it?

Step 3 then gives the following error:
--------------------------------------------------------------------------
/usr/include/bits/wordsize.h:7:1: warning: this is the location of the 
previous definition
i486-openwrt-linux-gnu-g++ -c 
-I/home/robert/PC104_xenomai/staging_dir/toolchain-i386_gcc-4.2.4_glibc-2.7/usr/include 
-march=i586 -Wall -Wno-unused -fexceptions  
-DIDLMODULE_VERSION="\"0x2630\"" -I/usr/include 
-DPYTHON_INCLUDE="<python2.6/Python.h>" -fPIC -I. -I. 
-I../../../../include -I../../../../include -D__OSVERSION__=2 
-D__linux__ -D__x86__ -o idlexpr.o idlexpr.cc
In file included from /usr/include/bits/mathdef.h:26,
                  from /usr/include/math.h:47,
                  from ./idlmath.h:54,
                  from idlexpr.cc:67:
/usr/include/bits/wordsize.h:4:1: warning: "__WORDSIZE" redefined
In file included from /usr/include/gnu/stubs.h:4,
                  from /usr/include/features.h:387,
                  from /usr/include/assert.h:37,
                  from ./idlutil.h:57,
                  from ./idlexpr.h:56,
                  from idlexpr.cc:65:
/usr/include/bits/wordsize.h:7:1: warning: this is the location of the 
previous definition
idlexpr.cc:176: error: integer constant is too large for 'long' type
idlexpr.cc:878: error: integer constant is too large for 'long' type
idlexpr.cc:884: error: integer constant is too large for 'long' type
idlexpr.cc:1106: error: integer constant is too large for 'long' type
idlexpr.cc:1195: error: integer constant is too large for 'long' type
idlexpr.cc: In member function 'IDL_LongLong IdlExpr::evalAsLongLong()':
idlexpr.cc:176: warning: comparison is always false due to limited range 
of data type
idlexpr.cc: In member function 'virtual IdlLongVal 
ConstExpr::evalAsLongV()':
idlexpr.cc:329: warning: comparison between signed and unsigned integer 
expressions
idlexpr.cc:329: warning: comparison between signed and unsigned integer 
expressions
idlexpr.cc: In member function 'virtual IdlLongLongVal 
SubExpr::evalAsLongLongV()':
idlexpr.cc:878: warning: comparison is always false due to limited range 
of data type
idlexpr.cc:884: warning: comparison is always false due to limited range 
of data type
idlexpr.cc: In member function 'virtual IdlLongLongVal 
DivExpr::evalAsLongLongV()':
idlexpr.cc:1106: warning: comparison is always false due to limited 
range of data type
idlexpr.cc: In member function 'virtual IdlLongLongVal 
MinusExpr::evalAsLongLongV()':
idlexpr.cc:1195: warning: comparison is always false due to limited 
range of data type
make: *** [idlexpr.o] Error 1
make: Leaving directory 
`/home/robert/DEV/omniORB_cross/omniORB-4.1.5/src/tool/omniidl/cxx'
--------------------------------------------------------------------------

Again, the includes seem a bit strange to me, but I might be wrong. Can 
anybody perhaps point me in the right direction?

Any help is greatly appreciated.

Kind regards,
Robert




More information about the omniORB-list mailing list