[Olsr-dev] OLSR on Android

Fábio Almeida (spam-protected)
Wed May 25 00:54:17 CEST 2011


Hello,

I'm trying to compile OLSR on Ubuntu to make it run on Android but I'm
having some problems.

I already read the topic in olsr-users about implementing OLSR into Samsung
Galaxy S and I clarified some doubts that I had. Now I'm tying to compile
the most recent version of OLSR that I downloaded from the website.

I couldn't find the r1 of NDK as recomended on Makefile.android so I'm using
the release 4.

I already changed the Makefile.android to the path that I'm using. But when
I try to compile the source I get the following error:

(spam-protected):~/Desktop/olsrd-0.6.0$ make OS=android DEBUG=0
build_all
/usr/src/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/arm-eabi-gcc
-Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
-Wsign-compare -Waggregate-return -Wmissing-noreturn
-Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations
-Wendif-labels -Wwrite-strings -Wbad-function-cast -Wpointer-arith
-Wcast-qual -Wshadow -Wsequence-point -Wpointer-arith -Wcast-align
-Wnested-externs -Winline -Wdisabled-optimization
-finline-functions-called-once -funit-at-a-time -fearly-inlining
-fomit-frame-pointer -finline-limit=350
-I/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include
-Isrc   -DUSE_FPM -Dlinux -Dandroid -DINET_ADDRSTRLEN=16
-Dipv6mr_interface=ipv6mr_ifindex -D'IPTOS_PREC(tos)=((tos)&0xe0)'
-D'IPTOS_TOS(tos)=((tos)&0x1e)'
-DOLSRD_GLOBAL_CONF_FILE=\"/data/local/etc/olsrd.conf\" -DNDEBUG    -c -o
src/linux/kernel_routes_ioctl.o src/linux/kernel_routes_ioctl.c
In file included from
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/sys/socket.h:33,
                 from src/defs.h:48,
                 from src/linux/kernel_routes_ioctl.c:42:
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/linux/socket.h:
In function '__cmsg_nxthdr':
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/linux/socket.h:89:
warning: cast increases required alignment of target type
In file included from src/defs.h:51,
                 from src/linux/kernel_routes_ioctl.c:42:
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/stdlib.h:
At top level:
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/stdlib.h:84:
warning: declaration of 'abs' shadows a built-in function
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/stdlib.h:88:
warning: declaration of 'labs' shadows a built-in function
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/stdlib.h:92:
warning: declaration of 'llabs' shadows a built-in function
In file included from src/lq_packet.h:48,
                 from src/lq_plugin.h:48,
                 from src/link_set.h:49,
                 from src/routing_table.h:52,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_ioctl.c:43:
src/ipcalc.h: In function 'sockaddr4_to_string':
src/ipcalc.h:160: warning: cast increases required alignment of target type
In file included from src/ipc_frontend.h:54,
                 from src/linux/kernel_routes_ioctl.c:44:
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h:
In function 'getpagesize':
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h:170:
warning: nested extern declaration of '__page_size'
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h:
In function '__getpageshift':
/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h:174:
warning: nested extern declaration of '__page_shift'
src/linux/kernel_routes_ioctl.c: In function 'delete_all_inet_gws':
src/linux/kernel_routes_ioctl.c:90: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:101: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:102: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:103: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:104: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:106: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:107: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_add_route':
src/linux/kernel_routes_ioctl.c:141: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:142: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:143: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:145: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:150: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:153: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_add_route6':
src/linux/kernel_routes_ioctl.c:193: error: storage size of 'kernel_route'
isn't known
src/linux/kernel_routes_ioctl.c:198: error: invalid application of 'sizeof'
to incomplete type 'struct in6_rtmsg'
src/linux/kernel_routes_ioctl.c:193: warning: unused variable 'kernel_route'
src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_del_route':
src/linux/kernel_routes_ioctl.c:244: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:245: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:246: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:248: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:251: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c:257: warning: cast increases required
alignment of target type
src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_del_route6':
src/linux/kernel_routes_ioctl.c:289: error: storage size of 'kernel_route'
isn't known
src/linux/kernel_routes_ioctl.c:294: error: invalid application of 'sizeof'
to incomplete type 'struct in6_rtmsg'
src/linux/kernel_routes_ioctl.c:289: warning: unused variable 'kernel_route'
make: *** [src/linux/kernel_routes_ioctl.o] Error 1


I already compiled OLSR for linux and I installed it on my Ubuntu and I
could run it without any problem. Anyone have any idea what this problem
could be? I believe it is something simple but I've read all the
documentation about the required packages and everything but I can't make it
work.

Thanks for the help,
Fabio Almeida
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20110524/ca0dec6e/attachment.html>


More information about the Olsr-dev mailing list