简体   繁体   English

用于编译 x264 的“修复构建脚本”是什么?

[英]What is this “fixing the build scripts” for compiling x264?

I am trying to compile an all static build of source-customized ffmpeg libraries with the additional codecs from VideoLAN, such as their x264 codec.我正在尝试使用来自 VideoLAN 的其他编解码器(例如它们的 x264 编解码器)编译源自定义 ffmpeg 库的所有 static 构建。 I am ultimately building for use in Windows with Visual Studio 2015 C++, so I am comparing a few compiling guides for my instructions.我最终是为在 Windows 和 Visual Studio 2015 C++ 中使用而构建的,所以我比较了一些编译指南来了解我的说明。

In the guide linked below (I located via Google searches) shows how to compile x264 with the VS2015 toolchain in MSYS2 without any special steps: https://gist.github.com/RangelReale/3e6392289d8ba1a52b6e70cdd7e10282在下面链接的指南中(我通过 Google 搜索找到)显示了如何在 MSYS2 中使用 VS2015 工具链编译 x264,无需任何特殊步骤: https://gist.github.com/RangelReale/3e639e270cdd789d86

While in this other guide, offered by the compiling guide pages from ffmpeg's web site, it includes steps for "fixing the build scripts" for x264: https://www.roxlu.com/2019/062/compiling-ffmpeg-with-x264-on-windows-10-using-msvc在 ffmpeg 的 web 站点的编译指南页面提供的其他指南中,它包括用于 x264 的“修复构建脚本”的步骤: https://www.roxlu.com/2019/062/compiling-ffmpeg- x264-on-windows-10-using-msvc

Problem being, when I "fix the build scripts" the configure script no longer finds a C compiler.问题是,当我“修复构建脚本”时,配置脚本不再找到 C 编译器。 Building with the first guide seems to work, but it was also written nearly 2 years ago, so perhaps the ffmpeg guide is doing some important fix?使用第一个指南构建似乎可行,但它也是近 2 年前编写的,所以也许 ffmpeg 指南正在做一些重要的修复? I don't know.我不知道。

I am:我是:

  1. Running a "VS2015 x64 Native Tools Command Prompt"运行“VS2015 x64 Native Tools 命令提示符”
  2. launching a pacman loaded msys2 shell via "msys2_shell.cmd -mingw64 -use-full-path"通过“msys2_shell.cmd -mingw64 -use-full-path”启动一个 pacman 加载的 msys2 shell
  3. git cloning http://git.videolan.org/git/x264.git git 克隆http://git.videolan.org/git/x264.git

and at this point the two compiling guides vary, the first guide just cd's into x264 and runs configure while the other guide does some curl download of a config.guess file and then some sed manipulation of./configure.在这一点上,两个编译指南有所不同,第一个指南只是 cd 到 x264 并运行配置,而另一个指南执行一些 curl 下载 config.guess 文件,然后一些 sed 操作./configure。 Considering these instructions are "endorsed" by the ffmpeg site, I am left wondering what that is doing and how critical is it that these "special" steps cause my x264 configure to fail.考虑到 ffmpeg 站点“认可”了这些说明,我想知道这是在做什么,以及这些“特殊”步骤导致我的 x264 配置失败有多重要。

All this manipulations with "config.guess" and "configure" are only needed because later on they run simple "msys2_shell.cmd" ie in MSYS-mode.只需要使用“config.guess”和“configure”进行所有这些操作,因为稍后它们会运行简单的“msys2_shell.cmd”,即在 MSYS 模式下。 Correct/supported way in x264 is to run shell in MINGW32 or MINGW64 mode with "-mingw32" and "-mingw64" options like you do (or run mingw32.exe / mingw64.exe instead of msys2_shell.cmd). x264 中正确/受支持的方式是在 MINGW32 或 MINGW64 模式下运行 shell,使用“-mingw32”和“-mingw64”选项(或运行 mingw32.exe / mingw64.exe 而不是 msys2_shell.cmd)。 This change result in different output of "uname" command which is important for x264's configure.此更改导致“uname”命令的 output 不同,这对于 x264 的配置很重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM