tank1781053 2015-12-07 02:57 采纳率: 0%
浏览 1950

iOS配置编译ffmpeg无法编译成功

#!/bin/bash
SDKVERSION="9.1"

ARCHS="armv7 armv7s i386"

DEVELOPER=xcode-select -print-path

cd "dirname \"$0\""
REPOROOT=$(pwd)

where we will store intermediary builds

INTERDIR="${REPOROOT}/built"
mkdir -p $INTERDIR

########################################

Exit the script if an error happens

for ARCH in ${ARCHS}
do
if [ "${ARCH}" == "i386" ];
then
PLATFORM="iPhoneSimulator"
EXTRA_CONFIG="--arch=i386 --disable-asm --enable-cross-compile --target-os=darwin --cpu=i386"
EXTRA_CFLAGS="-arch i386"
EXTRA_LDFLAGS="-I${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk/usr/lib"
else
PLATFORM="iPhoneOS"
EXTRA_CONFIG="--arch=arm --target-os=darwin --enable-cross-compile --cpu=cortex-a9 --disable-armv5te"
EXTRA_CFLAGS="-w -arch ${ARCH}"
fi

mkdir -p "${INTERDIR}/${ARCH}"

./configure --prefix="${INTERDIR}/${ARCH}" \
--disable-neon \
--disable-armv6 \
--disable-armv6t2 \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-iconv \
--disable-bzlib \
--enable-avresample \
--sysroot="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk" \
--cc="${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" \
--as='/usr/sbin/gas-preprocessor.pl' \
--extra-cflags="${EXTRA_CFLAGS} -miphoneos-version-min=${SDKVERSION}" \
--extra-ldflags="-arch ${ARCH} ${EXTRA_LDFLAGS} -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk -miphoneos-version-min=${SDKVERSION}" ${EXTRA_CONFIG} \
--enable-pic \
--extra-cxxflags="$CPPFLAGS -isysroot ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"

make && make install && make clean

done

mkdir -p "${INTERDIR}/universal/lib"

cd "${INTERDIR}/armv7/lib"
for file in *.a
do

cd ${INTERDIR}
xcrun -sdk iphoneos lipo -output universal/lib/$file -create -arch armv7 armv7/lib/$file -arch armv7s armv7s/lib/$file -arch i386 i386/lib/$file
echo "Universal $file created."

done
cp -r ${INTERDIR}/armv7/include ${INTERDIR}/universal/

echo "Done."

以上为config.sh执行后只生成了i386的库,armv7和armv7s都没有生成东西,提示如下:
-bash: cd: /Users/nevermore/Downloads/ffmpeg-2.8.3/built/armv7/lib: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: armv7/lib/*.a (No such file or directory)
Universal *.a created.
cp: /Users/nevermore/Downloads/ffmpeg-2.8.3/built/armv7/include: No such file or directory
Done.

机器的os操作系统为最新版10.10.5,xcode7.1也是最新的,请大家帮帮忙应该怎么解决

  • 写回答

1条回答 默认 最新

  • 普通网友 2015-12-07 07:14
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料