【问题标题】:build x264 failed on apple M1, No working C compiler found在苹果 M1 上构建 x264 失败,找不到工作的 C 编译器
【发布时间】:2022-01-05 12:07:16
【问题描述】:
  1. 苹果 M1,叮当声
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: arm64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  1. x264 version x264-snapshot-20191217-2245

  2. 配置

 ./configure --prefix=/tmp/  --enable-static
  1. config.log
checking for -Werror=unknown-warning-option... yes
checking for -mdynamic-no-pic... yes
x264 configure script
Command line options: "--prefix=/tmp/" "--enable-static"

checking whether gcc works... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -I$(SRCPATH) -mdynamic-no-pic -arch armv7  -Werror=unknown-warning-option    -lm -arch armv7 -o conftest
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin/libclang_rt.osx.a, missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin/libclang_rt.osx.a (5 slices)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libm.tbd, missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libm.tbd (3 slices)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd (3 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
DIED: No working C compiler found.

【问题讨论】:

  • 为 x264 源使用更新的东西怎么样? code.videolan.org/videolan/x264
  • @nobody555 谢谢,较新的源代码有效。你能发表评论作为答案,我会接受。

标签: apple-m1 x264 libx264


【解决方案1】:

x264 源快照压缩包很久没有更新了。您需要将 x264 源更新到较新的版本:https://code.videolan.org/videolan/x264/

x264 中的 Apple Silicon 支持已于 2020 年底添加。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-27
    • 2014-02-17
    • 2016-01-07
    • 1970-01-01
    • 2018-07-22
    • 2015-01-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多