android+ndk+r6b,Android NDK r6b Cross-compiling libfaac for android (linking libsupc++ problems)

I'm trying to cross-compile libfaac to android for use with ffmpeg. I've gotten ffmpeg cross-compiled but libfaac is giving me major headaches.

This is the script I'm using to compile libfaac:

ANDROID_API=android-3

export ANDROID_NDK=${HOME}/android-ndk

export ANDROID_SDK=${HOME}/android-sdk

SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-arm

ANDROID_BIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/*-x86/bin/

CROSS_COMPILE=${ANDROID_BIN}/arm-linux-androideabi-

export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools

export ARM_INC=$ANDROID_NDK/platforms/android-5/arch-arm/usr/include

export ARM_LIB=$ANDROID_NDK/platforms/android-5/arch-arm/usr/lib

CFLAGS=" -I$ARM_INC -fPIC -Wall -Wextra -Wno-unused -Wno-multichar -mthumb-interwork -ffunction-sections -funwind-tables -fno-rtti -fstack-protector -fno-short-enums -DANDROID -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Wa,--noexecstack -MMD -MP -MF"

LDFLAGS=" -nostdlib -Bdynamic -Wl,--gc-sections -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi -L$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib -L$ARM_LIB $ARM_LIB/crtbegin_dynamic.o $ARM_LIB/crtend_android.o -Wl,--start-group -lc -lm -ldl -lgcc $ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a $ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib/thumb/libsupc++.a -Wl,--end-group"

FLAGS="--host=arm-androideabi-linux --enable-static --disable-shared --prefix=$HOME "

export CPPFLAGS="$CFLAGS"

export CFLAGS="$CFLAGS"

export CXXFLAGS="$CFLAGS"

export CXX="${CROSS_COMPILE}g++ --sysroot=${SYSROOT}"

export LDFLAGS="$LDFLAGS"

export CC="${CROSS_COMPILE}gcc --sysroot=${SYSROOT}"

export NM="${CROSS_COMPILE}nm"

export STRIP="${CROSS_COMPILE}strip"

export RANLIB="${CROSS_COMPILE}ranlib"

export AR="${CROSS_COMPILE}ar"

cd ../faac

./configure $FLAGS

make clean

make -j4 || exit 1

make install || exit 1

I'm very much a beginner when it comes to c++ code and cross-compiling, and I've build this script using many other scripts as reference so I may be doing some unnecessary or flat-out incorrect things.

Anyways, I'm getting literally hundreds of errors along the line of:

undefined reference to `vtable for __cxxabiv1::__si_class_type_info'

undefined reference to `__cxa_end_cleanup'

undefined reference to `__cxa_throw'

undefined reference to `__gxx_personality_v0'

It seems the issue has to do with me not linking libsupc++ properly.

I tried doing what the person at this other stackoverflow question did, but I don't know if I did it right, I'm unfamiliar with the linking process.

What am I doing wrong? Thank you for any help.

EDIT:

It turns out I may or may not be wrong about libsupc++ causing the problems, the configure.log tells me the compiler can't create an executable, but I can't figure out what the problem is.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值