2 re hanamaki Re_Hanamaki 于 2014.05.12 14:30 提问

Mac下编译Android FFmpeg2.2.2报错gcc is unable to create an executable file

大家好。报错如题。查看config.log里面有错:
EGIN /var/folders/ch/3lnns2f14bv398_ghdz1v9_h0000gn/T//ffconf.nj0OFFb3.c
1 #include
2 #if !(defined ARM_ARCH_4 || defined TARGET_ARCH_4)
3 #error "unsatisfied condition: defined __ARM_ARCH_4
|| defined __TARGET_ARCH_4"
4 #endif
END /var/folders/ch/3lnns2f14bv398_ghdz1v9_h0000gn/T//ffconf.nj0OFFb3.c

有很多都是类似的,还有比如
#error "unsatisfied condition: defined ARM_ARCH_4T || defined TARGET_ARCH_4T"
#error "unsatisfied condition: defined __ARM_ARCH_5
|| defined __TARGET_ARCH_5"
这种。

我的config.sh如下:

#!/bin/bash

export PREBUILT=/Users/AAA/Documents/Development/Android/Environment/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
export PLATFORM=/Users/AAA/Documents/Development/Android/Environment/android-ndk-r9d/platforms/android-9/arch-arm

./configure --target-os=linux \
--arch=arm \
--enable-version3 \
--enable-gpl \
--enable-nonfree \
--disable-stripping \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffserver \
--disable-ffprobe \
--disable-symver \
--enable-encoders \
--enable-decoders \
--enable-muxers \
--disable-devices \
--disable-protocols \
--enable-protocol=file \
--enable-avfilter \
--enable-network \
--enable-avdevice \
--disable-asm \
--enable-cross-compile \
--enable-runtime-cpudetect \
--sysroot=$PLATFORM \
--disable-everything \
--disable-doc \
--enable-avresample \
--enable-demuxer=rtsp \
--enable-muxer=rtsp \
--enable-protocol=rtp \
--enable-hwaccels \
--enable-zlib \
--prefix=$PLATFORM/usr \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--extra-cflags="-I$PLATFORM/usr/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" \
--disable-asm \
--enable-neon \
--enable-armv5te \
--extra-ldflags="-Wl,-T,$PREBUILT/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.x -Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib $PLATFORM/usr/lib/crtbegin_dynamic.o $PLATFORM/usr/lib/crtend_android.o -lc -lm -ldl"

谢谢大家了。

1个回答

q315344306
q315344306   2014.07.14 15:42

问题解决了么?我在windows上编译,也遇到这个问题。

Csdn user default icon
上传中...
上传图片
插入图片