[Olsr-dev] OLSRv2 cross compilation or Android

Karoly Szabo (spam-protected)
Tue Jan 7 17:05:46 CET 2014


Hi all,
I'm trying to compile Olsrv2 for Android using
Andorid-ndk-r8e
and following the example found in cmake/cross/android_on_linux.cmake
The make command usually stop at 1%
Only after adding those paths I was able to reach (just) 4%

export
PATH=$PATH:/locale/ANDROID/bin:~/adt-bundle-linux-x86/sdk/platform-tools/:/locale/ANDROID/android-ndk-r8e:/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin:/locale/ANDROID/android-ndk-r8e/platforms/android-14/arch-arm/usr/include:/locale/ANDROID/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib:

export
C_INCLUDE_PATH=C_INCLUDE_PATH:/locale/ANDROID/android-ndk-r8e/platforms/android-14/arch-arm/usr/include:/locale/ANDROID/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib:

Does anyone had a similar problem?
Here is the result of the last make (usually was .o files instead of .obj,
but with same results):

Scanning dependencies of target oonf_common
[  1%] Building C object
src-api/common/CMakeFiles/oonf_common.dir/autobuf.c.obj
[  1%] Building C object
src-api/common/CMakeFiles/oonf_common.dir/avl_comp.c.obj
[  2%] Building C object src-api/common/CMakeFiles/oonf_common.dir/avl.c.obj
[  2%] Building C object
src-api/common/CMakeFiles/oonf_common.dir/daemonize.c.obj
[  3%] Building C object
src-api/common/CMakeFiles/oonf_common.dir/netaddr.c.obj
[  3%] Building C object
src-api/common/CMakeFiles/oonf_common.dir/netaddr_acl.c.obj
[  4%] Building C object
src-api/common/CMakeFiles/oonf_common.dir/string.c.obj
[  4%] Building C object
src-api/common/CMakeFiles/oonf_common.dir/template.c.obj
Linking C shared library ../../liboonf_common.so
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/autobuf.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/avl_comp.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/avl.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/daemonize.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/netaddr.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/netaddr_acl.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/string.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: CMakeFiles/oonf_common.dir/template.c.obj: incompatible target
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: cannot find -lc
/locale/ANDROID/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld:
error: cannot find -ldl
collect2: error: ld returned 1 exit status
make[2]: *** [liboonf_common.so] Error 1
make[1]: *** [src-api/common/CMakeFiles/oonf_common.dir/all] Error 2
make: *** [all] Error 2


Thanks in advance,
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20140107/198ca624/attachment.html>


More information about the Olsr-dev mailing list