I had the exact same problem.
The problem is related to eol (end of lines) handling of certain files with the Perl build used. You should not use the MSYS Perl build. Instead you should use ActivePerl or StrawberryPerl, as indicated in the guide. Be sure though that the PATH points to the appropriate Perl distribution, prior to the MSYS Perl.
export PATH=/appropriate/perl/dist:$PATH
This answer helped me solve the problem.