[FFmpeg-user] Problems trying to compile FFmpeg on MinGW under Cygwin - dependency contamination or something else?

Hashim Aziz hashaziz at hotmail.com
Thu Mar 14 18:50:15 EET 2019


I've spent the last few days trying to compile FFmpeg with superior libraries like libfdk and libopus. I've run Cygwin on top of Windows 7 for years, so want to compile using it or using packages that can be easily obtained via it (via the apt-cyg package manager). I've been adapting this guide from the FFmpeg Wiki:

https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

...for this purpose, and so far have managed to compile the five or six dependencies that I need from source using the instructions on that page. When eventually compiling FFmpeg itself however, I ran into the following error:
ERROR: aom >= 1.0.0 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user at ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Makefile:160: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'.  Stop.
Makefile:160: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'.  Stop.
I've read that cross-compilation requires that all dependences that the end binary relies on are built with the same toolchain that the end binary is - if this is true, could it be the source of my problem? Some of the dependencies I compiled from source were compiled with native gcc (libaom being one of them), while the ones that wouldn't play ball with the standard gcc (primarily x264 if I remember correctly) were compiled with the x86_64-w64-mingw32-gcc and x86_64-w64-mingw32-g++ packages available from the package manager. If it is likely to be the issue, then what about dependencies relied upon by the end binary to compile but that I didn't manually build from source? There are many more packages in the Cygwin package repository that I'm making use of to build the packages and FFmpeg itself from source. Do all of these used dependencies need to have x86_64-w64-mingw33 variants for me to successfully compile a better version of FFmpeg on Windows?

Here's the command I ran to get the error above:
cd /ffmpeg_sources &&
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 &&
tar xjvf ffmpeg-snapshot.tar.bz2 &&
cd ffmpeg && ./configure --arch=x86_64 --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32 \
--enable-cross-compile \
--extra-cflags="-I/usr/local/include" \
--extra-ldflags="-L/usr/local/lib" \
--prefix="/usr/local" \
--pkg-config-flags="--static" \
--extra-libs="-lpthread -lm" \
--enable-libaom \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-gpl \
--enable-nonfree 2>&1 | tee "/ffmpeg_compile.txt" &&
make -j$(nproc) 2>&1 | tee -a "/ffmpeg_compile.txt" &&
make install 2>&1 | tee -a "/ffmpeg_compile.txt"
If the "compilation contamination" thing isn't likely to be the issue, then does anyone have any idea what might be? The most I've been able to find on it is this:

https://github.com/rdp/ffmpeg-windows-build-helpers/issues/332

...which seems to apply to FFmpeg's Windows Build Helpers, suggesting the same route cuase (though there is no Cygwin support for that tool, before anyone insists I should use it). I've also Cygwin for several years now would rather not venture outside its ecosystem to install additional stuff when I use it a lot and it suits my needs.

Thank you, I'd really appreciate some help on this. I've attached my config.log file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 420402 bytes
Desc: config.log
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20190314/c570ec3f/attachment.obj>


More information about the ffmpeg-user mailing list