[Rtai] RE: cross compiling rtai for x86 on an x86_64 host
GraemeF at touchcut.com
Fri Sep 2 09:48:56 CEST 2011
I also asked a colleague to look into the problem for me. What he found is a couple of problems.
1) the base/math/Makefile.kbuild file has an EXTRA_FLAGS parameter which has an entry "-I/usr/include". We have changed this to "-I=/usr/include". With this change the cross compilation works.
2) the base/math/ source files #include "math.h" rather than #include <math.h>, which is probably why the include above was added. We have not changed these as the first change was enough for us at the moment.
From: rtai-bounces at rtai.org on behalf of Graeme Foot
Sent: Thu 1/09/2011 4:59 p.m.
To: rtai at rtai.org
Subject: [Rtai] cross compiling rtai for x86 on an x86_64 host
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/i686-kinetic-linux-gnu-
CC [M] /home/graemef/workspace/svn/linuxBuild/rootfs/plato/build/rtai-3.8.1/base/math/e_acos.o
In file included from /usr/include/features.h:378,
/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:
but I can't see any support in the rtai make files to set the sysroot.
I tried overriding the CC variable to:
but this fails with:
(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-kinetic-linux-gnu/sys-root/'
Does anyone have any pointers as to how I can set the sysroot correctly or other things I can try?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rtai