Building libvpx on Windows

87 views
Skip to first unread message

Egor Yusov

unread,
Aug 22, 2019, 8:41:39 PM8/22/19
to Codec Developers
Hello!
I am trying to follow instructions to build libvpx for Windows.
I installed cygwin and yasm as directed, however when I run ../libvpx/configure --help from cygwin bash, I get a lot of errors like below:

../libvpx/build/make/configure.sh: line 11: $'\r': command not found
../libvpx/build/make/configure.sh: line 12: $'\r': command not found
../libvpx/build/make/configure.sh: line 16: syntax error near unexpected token `$'{\r''
'./libvpx/build/make/configure.sh: line 16: `
die_unknown(){
../libvpx/configure: line 165: enable_feature: command not found
../libvpx/configure: line 165: enable_feature: command not found
../libvpx/configure: line 165: enable_feature: command not found
../libvpx/configure: line 165: enable_feature: command not found
../libvpx/configure: line 192: enable_feature: command not found
../libvpx/configure: line 203: enabled: command not found
../libvpx/configure: line 204: enable_feature: command not found
../libvpx/configure: line 205: enable_feature: command not found
../libvpx/configure: line 207: enable_feature: command not found
../libvpx/configure: line 208: enable_feature: command not found
../libvpx/configure: line 209: enable_feature: command not found
../libvpx/configure: line 210: enable_feature: command not found
../libvpx/configure: line 211: enable_feature: command not found
../libvpx/configure: line 212: enable_feature: command not found
../libvpx/configure: line 213: enable_feature: command not found
../libvpx/configure: line 776: process: command not found
../libvpx/configure: line 777: print_webm_license: command not found

I tried to use dos2unix to fix line endings in configure script itself, but apparently all other files need to be fixed as well. Is it a known problem?

I managed to run the command from Mingw bash though installed with Windows git, but it does not recognize make. Besides, there is no solution files in the build folder, only .mk files (such as solution-x86_64-win64-vs15.mk).

Could you suggest how this can be fixed?

Thanks,
Egor.


James Zern

unread,
Aug 22, 2019, 10:42:03 PM8/22/19
to codec...@webmproject.org
Hi,
It's a mix of both. The files could be listed in .gitattributes to
force unix line endings, but in general I think we expect the line
endings to be preserved on check out. On windows you'll want to make
sure autocrlf is set to input rather than native [1].

> I managed to run the command from Mingw bash though installed with Windows git, but it does not recognize make. Besides, there is no solution files in the build folder, only .mk files (such as solution-x86_64-win64-vs15.mk).
>

That's expected. The project and solution files are generated by make.

[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf

Egor Yusov

unread,
Aug 23, 2019, 6:51:34 PM8/23/19
to Codec Developers
Thanks James,

> On windows you'll want to make sure autocrlf is set to input rather than native [1]. 

Setting autocrlf to input fixed the issue and I managed to successfully build and run vp9 encoder.

TBH, I was not aware that git may change line endings at check out. I guess it may worth mentioning this in build instructions. Another thing you may want to mention is that cygwin installer by default does not install developer tools, which should be enabled manually.

James Zern

unread,
Aug 27, 2019, 7:27:35 PM8/27/19
to codec...@webmproject.org
I'm glad you got it working and thanks for the documentation
suggestions. I filed https://crbug.com/webm/1651 to track.
Reply all
Reply to author
Forward
0 new messages