问题
When I try to build libiconv using the Android NDK standalone toolchain (android-ndk-r5-crystax-2), I get this error output. Can someone please tell me what might be wrong?
My environment looks like this:
export NDK=$HOME/android/android-ndk-r5-crystax-2
export TOOLCHAIN=$HOME/android/toolchain
export ARCH=armv7-a
export SYSROOT=$TOOLCHAIN/sysroot
export PATH=$PATH:$TOOLCHAIN/bin:$SYSROOT/usr/local/bin
export CROSS_COMPILE=arm-linux-androideabi
export CC=${CROSS_COMPILE}-gcc
export CXX=${CROSS_COMPILE}-g++
export AR=${CROSS_COMPILE}-ar
export AS=${CROSS_COMPILE}-as
export LD=${CROSS_COMPILE}-ld
export RANLIB=${CROSS_COMPILE}-ranlib
export NM=${CROSS_COMPILE}-nm
export STRIP=${CROSS_COMPILE}-strip
export CFLAGS="-DANDROID -mandroid -fomit-frame-pointer --sysroot $SYSROOT -march=$ARCH -mfloat-abi=softfp -mfpu=vfp -mthumb"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-L${NDK}/sources/crystax/libs/armeabi-v7a -lcrystax"
回答1:
when run configure script, you shoud specify: gl_cv_header_working_stdint_h=yes.
Example:
./configure --prefix=$PRIFIX --host=arm-linux-androideabi gl_cv_header_working_stdint_h=yes
Good luck.
回答2:
I had the same problem. Turns out, the library will still be built, this is some other part of the build process that is failing. make install and you should see libiconv installed, despite it returning failue.
Also, when you go to use your shiny new libiconv, the shared version won't work because it will want to use the versioned soname (libiconv.so..) but android-ndk isn't too happy about that. Make sure you build it static, and you'll be good.
来源:https://stackoverflow.com/questions/9053702/building-libiconv-fails-with-the-android-standalone-toolchain