vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
547 stars 90 forks source link

./runtime.pl does not work with CRLF endings on Windows #280

Closed jamievlin closed 2 years ago

jamievlin commented 2 years ago

On WSL systems, if the user uses Windows git with CRLF file checking, the compilation fails from missing symbols as ./runtime.pl script does not properly recognize Windows line endings.

A relatively easy fix is to add

binmode STDIN, ":unix:crlf";
binmode BASE, ":unix:crlf";

after the lines

open STDIN, "<$prefix.in" or die "can't open input file $prefix.in";
open BASE, "<runtimebase.in" or die "can't open runtimebase.in";
open STDOUT, ">$prefix.cc" or die "can't open output file $prefix.cc";

in runtime.pl script.