|
From: | Van Rafelghem Dominique |
Subject: | [bug-gnu-libiconv] libiconv doesn't build as an Android native library |
Date: | Thu, 23 Jun 2011 19:27:17 -0400 |
Hi everyone, I’m trying to build libiconv-1.13.1 as a native library to be used on Android. I used a standalone toolchain as described in the Android NDK documentation. I generated an Android application level 8 compiler using the android-ndk-r5b for linux on an x86 platform. I’m building on a Ubuntu 10.10 distribution which has all the GNU Autotools needed to build libiconv. I chose this method of building the library (instead of Google’s build tools) since I can still run the normal configure command and make commands. Unfortunately, this isn’t working for me. The configure script executes normally and seems to run to completion properly, generating the Makefile and any other files it needs. This is my configure invocation: Ø ./configure –host=arm-linux-androideabi –prefix=/usr/local/android8 –disable-nls –disable-xmp –disable-shared CC=/data/android-8-toolchain/bin/arm-linux-androideabi-gcc \ Ø CXX=/data/android-8-toolchain/bin/arm-linux-androideabi-g++ CFLAGS=’-mthumb –g –DANDROID –Wno-multichar’ CXXFLAGS=’-mthumb –g –DANDROID –Wno-multichar’ \ Ø LDFLAGS=’-Wl, --fix-cortex-a8’ LIBS=’-lstdc++ -lsupc++’ For configure I did have to update config.guess and config.sub in the build-aux and libcharset/build-aux directories to a newer version which I obtained from the GNU libtool website at http://www.gnu.org/software/libtool/. The timestamp on the config.sub is 2011-03-23 and on the config.guess it is 2011-05-11. Once these scripts were update the configure script seemed to run correctly. The problem is when executing make the compile errors out when trying to compile srclib/areadlink.c. Here is a snippet of the log file which I’ve attached: make[2]: Entering directory `/home/dtitest/Downloads/libiconv-1.13.1/srclib' The strange thing is that even though the build fails the libraries seem to have been generated. The compile error seems to be an issue in which the stdint.h file, from the srclib directory which looks to be generated, is not compatible with the Android toolchain and libraries. I realize that Android is using a pared down version of libc called Bionic so maybe that is what is causing this problem. It is possible that the header files they use don’t match the header for libiconv so that might be causing the problem. I’ve attached the output of the make command with the error. I also did an ls command on the lib/.libs directory which does have the libiconv libraries in it. Any help with this would be greatly appreciated. Dominique |
[Prev in Thread] | Current Thread | [Next in Thread] |