【发布时间】:2014-03-27 05:23:08
【问题描述】:
我正在尝试编译和安装x264 H.264/AVC 编码器。
我已经安装了gcc。但是当我运行时出现“找不到工作的 C 编译器”错误:
./configure --enable-shared --enable-static
我能做什么?
配置日志说:
/bin/gcc conftest.c -Wall -I. -I$(SRCPATH) -falign-loops=16 -mdynamic-no-pic -o conftest
clang: error: unknown argument: '-falign-loops=16' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
【问题讨论】:
-
您是否在命令行中尝试
gcc以查看您的 gcc 是否可用,例如在您的路径中? -
是的,它可用。它在 /usr/bin/gcc 中。
-
config.log 说:检查 -mdynamic-no-pic... 否 2 失败的命令行是:3 ------------------ -------------------------------- 4 /usr/bin/gcc conftest.c -Qunused-arguments -Wall -I . -I$(SRCPATH) -falign-lo ops=16 -mdynamic-no-pic -o conftest 5 clang:错误:未知参数:'-falign-loops=16' [-Wunused-command-line-ar gument-hard -error-in-future] 6 clang:注意:这将是未来的硬错误(不能降级为警告)
-
运行:
/usr/bin/gcc --version;很可能是伪装的clang。我得到:Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)。我倾向于使用 GCC 4.8.2,但我是为自己构建的。 -
是的,这就是我拥有的确切版本,Apple LLVM 版本 5.1 (clang-503.0.38)(基于 LLVM 3.4svn)。非常感谢 Jonathan Leffler,我将按照您的链接构建 GNU GCC。