[FFmpeg-devel] [MSVC toolchain] Patch to allow building FFmpeg with Linux bash on Windows (WSL)

Aaron Levinson alevinsn_dev at levland.net
Fri Dec 29 05:12:23 EET 2017

On 12/28/2017 6:43 PM, Cyber Sinh wrote:
> The attached patch changes the configure script for FFmpeg (and associated
> shell scripts) to call MSVC tools including their extensions (cl.exe instead
> of cl for example). This is necessary, because WSL can automatically launch
> Windows processes from the Linux side but only if the process is in the path
> and includes the full name. Linux doesn't automatically append .exe and such
> to invoke a file.

I haven't confirmed yet that this works in the msys2 environment on 
Windows, although according to 
, it supposedly shouldn't cause any issues with building under msys2 or WSL.

It appears all of the contents of this patch have been taken from 
another patch, available at 
, although its reasonable that the author of this patch would have come 
up with it on their own since it is so simple.  It would be reasonable 
to give credit to Gilles Khouzam in the patch description, if the author 
of this patch (Cyber Sinh) and Gilles Khouzam are not the same individual.

Also, Gilles's patch does more to get FFmpeg to build properly under 
WSL, so just adding the file extension may not be sufficient to get 
FFmpeg to build under WSL.

On a separate note, building under WSL, as opposed to msys2, seems 
promising if only from a build performance perspective.  According to 
the blog post, it builds at least twice as fast under WSL than it does 
with msys2.

Aaron Levinson

More information about the ffmpeg-devel mailing list