2
回答
ndk编译x264报错,无法生成动态库
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

ndk-rd5编译x264报错:/usr/watermark/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: failed to set dynamic section sizes: Nonrepresentable section on output
collect2: ld returned 1 exit status
make: *** [libx264.so.120] Error 1

配置文件如下:export ARM_ROOT=/usr/watermark/android-ndk-r5b
export PLATFORM=$ARM_ROOT/platforms/android-8/arch-arm
export ARM_INC=$PLATFORM/usr/include
export ARM_LIB=$PLATFORM/usr/lib
#export ARM_TOOL=$ARM_ROOT/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86
#export ARM_LIBO=$ARM_TOOL/lib/gcc/arm-eabi/4.4.0
export ARM_TOOL=$ARM_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
export ARM_LIBO=$ARM_TOOL/lib/gcc/arm-linux-androideabi/4.4.3
export PATH=$ARM_TOOL/bin:$PATH
export ARM_PRE=arm-linux-androideabi

./configure --prefix=/home/arm_lib \
        --disable-gpac \
        --disable-asm  \
        --enable-static \
        --enable-shared \
        --disable-thread \
        --extra-cflags=" -I$ARM_INC -fPIC -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -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 -DANDROID  -Wa,--noexecstack -MMD -MP " \
        --extra-ldflags="  -nostdlib -Bdynamic  -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$ARM_LIB -nostdlib $ARM_LIB/crtbegin_dynamic.o $ARM_LIB/crtend_android.o -lc -lm -ldl -lgcc " \
        --cross-prefix=/usr/watermark/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/${ARM_PRE}- --host=arm-linux
        #--cross-prefix=/usr/watermark/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/${ARM_PRE}- --host=arm-linux

希望能有知情的前辈们给给小弟指点迷津,感激不敬!

举报
叶呤风
发帖于6年前 2回/1K+阅
顶部