[Olsr-dev] Problem with compiling olsrd-0.6.1 source code using Android NDK r4
Henning
(spam-protected)
Mon Jun 20 20:57:13 CEST 2011
On Monday 20 June 2011 20:13:58 Nai-Shuo Jheng wrote:
> Hi all,
>
> I''m a newbie of android development & trying to port olsrd-0.6.1 to my HTC
> Desire phone.
> I have been download android NDK version 4 & move the NDK folder to /opt/,
> just like Makefile.android said:
>
> NDK = /opt/android-ndk-r4b
> NDK_ARCH = $(NDK)/build/platforms/android-3/arch-arm
>
> Then, I start to compile it with:
>
> sudo make OS=android DEBUG=0 build_all
>
> However, it suddenly show many error message below:
>
> /opt/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/../lib/gcc
> /arm-eabi/4.2.1/include/stdio.h:50:23: error: sys/cdefs.h: No such file or
> directory
> /opt/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/../lib/gcc
> /arm-eabi/4.2.1/include/stdio.h:51:24: error: sys/_types.h: No such file or
> directory
> src/unix/misc.c:43:20: error: unistd.h: No such file or directory
> ......
>
> It seems like it could't find these header files, and those are
> in /opt/android-ndk-r4b/build/platforms/android-3/arch-arm/usr/include
> folder.
> But Makefile.android have been already setup the external path of header
> files:
>
> CFLAGS += -I$(NDK_ARCH)/usr/include
> CFLAGS += -I$(TOPDIR)/android
>
> Does anyone have the same problem or solution? Thanks.
You could try the attached patch.
Then create a "standalone toolchain" with the NDK script and run make with the
following parameter:
CC=<path-to-your-android-toolchain>/bin/<something>-gcc OS=android make
Henning
-------------- next part --------------
A non-text attachment was scrubbed...
Name: android.patch
Type: text/x-patch
Size: 3891 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20110620/92361a86/attachment.bin>
More information about the Olsr-dev
mailing list