x264 无法使用 MacPorts 构建

x264 fails to build using MacPorts

使用 MacPorts 安装 FFmpeg,我遇到了依赖 x264 的错误:

...
--->  Computing dependencies for ffmpeg
--->  Dependencies to be installed: x264
--->  Configuring x264
Error: Failed to configure x264, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_x264/x264/work/x264-956c8d8/config.log
Error: org.macports.configure for port x264 returned: configure failure: command execution failed
Error: Failed to install x264
...

...即使在更新和升级其他所有内容后仍然存在。

..为了用功能性(但可能不推荐)破解来回答我自己的问题,我按照上面的错误消息建议咨询了 config.log。根据日志,问题是 clang 不支持 -falign-loops 选项。注释掉包含"falign-loops"的两行配置后,x264构建成功。配置文件在此处找到:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_x264/x264/work/x264-956c8d8/configure

注释掉有问题的两行后,port install x264 完美运行。