[Rtai] cross compiling rtai for x86 on an x86_64 host

Graeme Foot GraemeF at touchcut.com
Thu Sep 1 06:59:42 CEST 2011


Hi,

 

I'm trying to cross compile an x86 rtai system on an x86_64 host under
buildroot.  The rtai build seems to be failing due to looking for
headers in the hosts default paths rather than the cross compile
directories.  eg: using the following commands:

 

make -j2 -C
/home/graemef/workspace/svn/linuxBuild/rootfs/plato/build/rtai-3.8.1
oldconfig ARCH=x86
CROSS_COMPILE=/home/graemef/workspace/bin/i686-kinetic-linux-gnu/bin/i68
6-kinetic-linux-gnu-

make

 

 

I get:

 

  CC [M]
/home/graemef/workspace/svn/linuxBuild/rootfs/plato/build/rtai-3.8.1/bas
e/math/e_acos.o

In file included from /usr/include/features.h:378,

                 from /usr/include/math.h:28,

                 from
/home/graemef/workspace/svn/linuxBuild/rootfs/plato/build/rtai-3.8.1/bas
e/math/e_acos.c:41:

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or
directory

 

 

I would like to set the sysroot to:

/home/graemef/workspace/bin/i686-kinetic-linux-gnu/i686-kinetic-linux-gn
u/sys-root/

 

but I can't see any support in the rtai make files to set the sysroot.

 

I tried overriding the CC variable to:

CC="gcc
--sysroot=/home/graemef/workspace/bin/i686-kinetic-linux-gnu/i686-kineti
c-linux-gnu/sys-root/"

 

but this fails with:

 

/home/graemef/workspace/svn/linuxBuild/rootfs/plato/../../../../bin/i686
-kinetic-linux-gnu/bin/i686-kinetic-linux-gnu-ranlib .libs/liblxrt.a

creating liblxrt.la

(cd .libs && rm -f liblxrt.la && ln -s ../liblxrt.la liblxrt.la)

 

make: unrecognized option
'--sysroot=/home/graemef/workspace/bin/i686-kinetic-linux-gnu/i686-kinet
ic-linux-gnu/sys-root/'

 

 

Does anyone have any pointers as to how I can set the sysroot correctly
or other things I can try?

 

 

Thanks,

GraemeF.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.rtai.org/pipermail/rtai/attachments/20110901/29a8e340/attachment.html>


More information about the Rtai mailing list