GNOME Bugzilla – Bug 774106
gst-libav fails to build on windows 7 x-64
Last modified: 2018-04-18 11:28:52 UTC
Created attachment 339323 [details] compiler output the compile step returns errors when building libav on windows 7 x64 Service pack 1 (VMWare virtual machine). The errors may be due to wrong setting of WIN_VER or similar. see attached libav-error.txt
Can you get ffmpeg and try to build it independently of gst-libav in the cerbero shell? It seems like some detection of features in the configure script there is broken. Also note that no matter what Windows version you build on, we use the same headers and toolchain. I was building the binaries on Windows 10 FWIW. Most likely this is a bug somewhere in ffmpeg's conditional use of that API and handling the Windows version defines. Relevant part of the code is in compat/w32pthreads.h: > #if _WIN32_WINNT >= 0x0600 > #define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0) > #define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE) > #endif Note that we define -D_WIN32_WINNT=0x0501 for our builds in cerbero.
I believe InitislizeCriticalSectionEx was introduced in Vista because InitializeCriticalSection leaked memory. ffmpeg have probably updated to use InitializeCriticalSectionEx but this is only compilable if -DWIN32_WINNT= 0x600 or higher
Yes but we set it to 0x0501 :) So something is weird here.
where is -DWIN32_WINNT set, I would like to try it out with 0x600.
cerbero/config/windows.config
ffmpeg compiled
So the question now is what the difference between the two builds is, where the overriding #define for _WIN32_WINNT (note the underscore in the beginning) is happening. And why it doesn't happen for me on an even newer Windows.
I un defined and redifined -DWIN32_WINNT=0x0600 in compat/w32pthreads.h and it compiled.
But we don't want _WIN32_WINNT=0x0600 (yet), see bug #756866 Why does it fail if you don't do that? :)
If it is left as 0x0501 it tels me that InitializeCriticalSectionEx is implicitly defined. The compiler settings convert warnings to errors (see original attachment)
But #if _WIN32_WINNT < 0x0600, then it will never ever be used anywhere in ffmpeg according to compat/w32pthreads.h. Only #if _WIN32_WINNT >= 0x0600, then it will be used wherever the non-Ex versions are used. You say it fails for you #if _WIN32_WINNT < 0x0600 because code uses that function (as in your log). But I don't see how. So something seems very broken here. Or what am I missing?
I'm afraid I don't know. I now have a complete 1.10. I suggest we leave the bug sleeping or close it and wait till somebody else has the same problem.
You mean you can't reproduce it anymore?
Thanks for taking the time to report this. However, you are using a version that is too old and not supported anymore by GNOME developers. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes by GNOME developers for the version that you use. By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME. Please feel free to reopen this bug report if the problem still occurs with a recent version of GNOME, or feel free to report this bug in the bug tracking system of your Linux distribution if your distribution still supports the version that you are using.