【问题标题】:Compiling ffmpeg for IOS (R_ABS reloc error)为 IOS 编译 ffmpeg(R_ABS reloc 错误)
【发布时间】:2012-12-06 08:07:46
【问题描述】:

我一直在尝试为 IOS 编译 ffmpeg 库。如果我使用--disable-asm,我可以让它工作,但为了性能,我想在启用它们的情况下构建。

这是我使用过的许多配置命令之一。

./configure --prefix=armv7 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc" --extra-cflags="-arch armv7 -miphoneos-version-min=5.0" --extra-ldflags="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=6.0" --arch=arm --cpu=cortex-a9 --disable-everything --enable-pic --enable-static --disable-shared

它编译得很好,但是当我尝试在我的项目中链接它时,我得到:

ld:在 /ffmpeg/libavcodec/libavcodec.a(simple_idct_armv5te.o) 中,在 _TEXT,_text reloc 0 节中:R_ABS reloc 但在架构 armv7 的目标地址处没有绝对符号 p>

我是否缺少一些关键选项?我试过使用 1.0 版本和最新的 git 版本的 ffmpeg。

【问题讨论】:

  • 你是在Mountain lion上做这个吗,mountain lion的asm有很多问题,如果能用lion你就更好了。我建议使用 5.1 而不是 6.0。
  • 请注意:你知道这不能在 appstore 甚至 cydia 上运行
  • 在此处查看有关 ffmpeg 许可问题的说明:stackoverflow.com/questions/15832754/…

标签: iphone ios compiler-construction linker ffmpeg


【解决方案1】:

我遇到了同样的问题。我的解决方案是切换到更新的 gas-preprocessor.pl,可以在这里找到:https://github.com/mansr/gas-preprocessor

只需安装它来代替您当前使用的旧版本。

【讨论】:

    猜你喜欢
    • 2014-06-02
    • 1970-01-01
    • 1970-01-01
    • 2013-12-12
    • 2014-11-23
    • 1970-01-01
    • 2013-10-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多