<meta http-equiv="content-type" content="text/html; charset=utf-8"><font class="Apple-style-span" face="arial, sans-serif"><div><div><span class="Apple-style-span" style="border-collapse: collapse;"><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-size: 13px; "><div>
Hello,</div><div><br></div><div>I'm trying to compile OLSR on Ubuntu to make it run on Android but I'm having some problems.</div><div><br></div><div>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.</div>
<div><br></div><div>I couldn't find the r1 of NDK as recomended on Makefile.android so I'm using the release 4.</div><div><br></div><div>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:</div>
</span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">fabioalmeida@fabioalmeida-pc:~/Desktop/olsrd-0.6.0$ make OS=android DEBUG=0 build_all</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">/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</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">In file included from /usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/sys/socket.h:33,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/defs.h:48,</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/linux/kernel_routes_ioctl.c:42:</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/linux/socket.h: In function '__cmsg_nxthdr':</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">/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</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">In file included from src/defs.h:51,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/linux/kernel_routes_ioctl.c:42:</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/stdlib.h: At top level:</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">/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</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">/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</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">/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</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">In file included from src/lq_packet.h:48,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/lq_plugin.h:48,</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/link_set.h:49,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/routing_table.h:52,</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/kernel_routes.h:46,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/linux/kernel_routes_ioctl.c:43:</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/ipcalc.h: In function 'sockaddr4_to_string':</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/ipcalc.h:160: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">In file included from src/ipc_frontend.h:54,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> from src/linux/kernel_routes_ioctl.c:44:</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h: In function 'getpagesize':</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h:170: warning: nested extern declaration of '__page_size'</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h: In function '__getpageshift':</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">/usr/src/android-ndk-r4/build/platforms/android-3/arch-arm/usr/include/unistd.h:174: warning: nested extern declaration of '__page_shift'</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c: In function 'delete_all_inet_gws':</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:90: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:101: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:102: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:103: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:104: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:106: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:107: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_add_route':</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:141: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:142: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:143: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:145: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:150: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:153: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_add_route6':</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:193: error: storage size of 'kernel_route' isn't known</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:198: error: invalid application of 'sizeof' to incomplete type 'struct in6_rtmsg' </span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:193: warning: unused variable 'kernel_route'</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_del_route':</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:244: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:245: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:246: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:248: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:251: warning: cast increases required alignment of target type</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:257: warning: cast increases required alignment of target type</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c: In function 'olsr_ioctl_del_route6':</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:289: error: storage size of 'kernel_route' isn't known</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:294: error: invalid application of 'sizeof' to incomplete type 'struct in6_rtmsg' </span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">src/linux/kernel_routes_ioctl.c:289: warning: unused variable 'kernel_route'</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">make: *** [src/linux/kernel_routes_ioctl.o] Error 1</span></div></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">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.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">Thanks for the help,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">Fabio Almeida</span></div>
<div style="border-collapse: collapse; "><br></div></font>