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

Cyber Sinh cyber.sinh at free.fr
Fri Dec 29 13:41:07 EET 2017


Hi Aaron,

- I were not aware of the Gilles Khouzam patch when I make the patch (I read its useful blog post). But feel free to give credits to anyone you want. Adding ".exe" to the end of Windows executables is not rocket science, as you said.
- My patch is sufficient to build FFmpeg on bash on Windows. At least on my machine with the current master. The Gilles patch was used for compiling the FFmpegInterop project and was post for one year.
- Performance is not the sole benefit of using bash on Windows. We don't have to install/use msys2 which is a pain for Windows user. 

Sylvain Rougeaux

-----Message d'origine-----
De : ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] De la part de Aaron Levinson
Envoyé : vendredi 29 décembre 2017 04:12
À : FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
Objet : Re: [FFmpeg-devel] [MSVC toolchain] Patch to allow building FFmpeg with Linux bash on Windows (WSL)

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 https://blogs.msdn.microsoft.com/gillesk/2016/12/02/building-ffmpeg-using-wsl/
, 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 https://github.com/Microsoft/FFmpegInterop/blob/gillesk/wsl/0001-Updating-scripts-to-run-under-WSL.patch
, 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
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list