[OLSR-users] Cross compiling issue with ARM cross compiler
Roar Bjørgum Rotvik
(spam-protected)
Fri Jun 11 15:35:34 CEST 2004
Claudio Lavecchia wrote:
> Hello everybody,
>
> I am still having the cross-compilation problem I exposed in my previous
> mail.
>
> I am trying to cross-compile the OLSR package for my iPaq. I updated my
> toolchain to use the one in
> ftp://ftp.arm.linux.org.uk/pub/linux/arm/toolchain
> <ftp://ftp.arm.linux.org.uk/pub/linux/arm/toolchain>
> <ftp://ftp.arm.linux.org.uk/pub/linux/arm/toolchain> as suggested by
> Andreas.
I have crosscompiled Unik-OLSRD 0.4.4 for ARM using uClibc
(www.uclibc.org) as toolchain without any problems.
> I am compiling on Redhat Linux 7.3, linux kernel version 2.14.18-3
>
> The errors seem to be due to something in toolchain header files
> conflicting with something else, but I cannot understand how to fix the
> problem.
>
> At the end of the mail you'll find the compilation log.
>
> I found other people reporting the same kind of problems in other
> mailing lists, but no solutions.
>
> I would be really glad if someone could point me to the solution of give
> me a hint of what's happening, as this problem is actually slowing down
> the development of my project.
I'm not familiar with your toolchain or code, but I have some comments
below:
> [(spam-protected) unik-olsrd-0.4.3]# make
> CC=/usr/local/arm/arm-linux/bin/gcc
> /usr/local/arm/arm-linux/bin/gcc -Wall -DDEBUG -c -o src/interface.o
> src/interface.c
> In file included from
> /usr/local/arm/arm-linux/lib/gcc-lib/../../arm-linux/sys-include/net/route.h:28,
> from src/defs.h:28,
> from src/interface.c:23:
> /usr/local/arm/arm-linux/lib/gcc-lib/../../arm-linux/sys-include/net/dst.h:30:
> parse error before "atomic_t"
You have a file called src/defs.h that includes net/route.h.
Your output is showing that the include files is referenced/included
from the following places:
/usr/local/arm/arm-linux/arm-linux/sys-include
/usr/local/arm/include/sys/
Is /usr/local/arm/arm-linux/lib/gcc-lib/../../arm-linux/sys-include
pointing to the kernel include directory (as in linux-2.4.xx/include)?
Seems to be a conflict between headerfiles from these two places.
[ text deleted ]
> In file included from src/defs.h:28,
> from src/interface.c:23:
> /usr/local/arm/arm-linux/lib/gcc-lib/../../arm-linux/sys-include/net/route.h:37:2:
> warning: #warning This file is not supposed to be used outside of kernel.
This indicates that you have included headerfiles from a Linux kernel. A
userspace application (I'm assuming yor application are a userspace app
and not kernel code) should not include kernel header files, but instead
the include files from the libc versjon you are using.
You should verify whitch one of the include paths I showed above is
correct (related to your libc) and use only that path.
> In file included from src/process_routes.h:23,
> from src/defs.h:42,
> from src/interface.c:23:
> src/routing_table.h:57: field `v6' has incomplete type
> src/interface.c: In function `ifinit':
> src/interface.c:83: `IFF_UP' undeclared (first use in this function)
> src/interface.c:90: `IFF_BROADCAST' undeclared (first use in this function)
> src/interface.c:96: `IFF_POINTOPOINT' undeclared (first use in this
> function)
> src/interface.c:103: `IFF_LOOPBACK' undeclared (first use in this function)
> src/interface.c: In function `set_flag':
> src/interface.c:379: `IFF_UP' undeclared (first use in this function)
> src/interface.c:379: `IFF_RUNNING' undeclared (first use in this function)
For IFF_UP and likes, include net/if.h (from your libc include files).
--
Roar B. Rotvik
More information about the Olsr-users
mailing list