You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./configure for -msvc freely interchanges between windows/msys commands, which results in it being quite fragile: it's a good idea to treat msys as a purely unix-like environment, and then have a single escape-hatch to execute windows commands (eg. via cmd).
Ways this can currently break (these are just the ones I personally ran into):
Having a program/script named reg on the path. This will cause ./configure's reg invocations to fail, as it expects them to call the windows reg utility.
Not having msys inherit PATH from windows: this is perfectly valid, and was at one point required to build rust in msys, if rust was installed on PATH in windows.
In several places, the escaping is broken and only works by chance. For example, on this line include_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %INCLUDE%"), msys path conversion will convert /c into C:\, and the value of %INCLUDE% will not include the additions that vcvarsall would normally make. As yet, I've been unable to determine the correct escape sequence to use (//c will produce the desired /c, but that will uncover a host of new escaping issues...)
The quick way to solve most of these problems is to run all commands intended to run in the windows environment via cmd: this eliminates potential for conflicts to a single item, cmd, and will ensure those commands find the windows versions of programs. However it does not solve the escaping issue.
Moving to a cargo-based build system and dropping the msys dependency altogether will of course fix this much more effectively!
The text was updated successfully, but these errors were encountered:
./configure
for -msvc freely interchanges between windows/msys commands, which results in it being quite fragile: it's a good idea to treat msys as a purely unix-like environment, and then have a single escape-hatch to execute windows commands (eg. via cmd).Ways this can currently break (these are just the ones I personally ran into):
reg
on the path. This will cause./configure
's reg invocations to fail, as it expects them to call the windowsreg
utility.include_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %INCLUDE%")
, msys path conversion will convert/c
intoC:\
, and the value of%INCLUDE%
will not include the additions thatvcvarsall
would normally make. As yet, I've been unable to determine the correct escape sequence to use (//c
will produce the desired/c
, but that will uncover a host of new escaping issues...)The quick way to solve most of these problems is to run all commands intended to run in the windows environment via
cmd
: this eliminates potential for conflicts to a single item,cmd
, and will ensure those commands find the windows versions of programs. However it does not solve the escaping issue.Moving to a cargo-based build system and dropping the msys dependency altogether will of course fix this much more effectively!
The text was updated successfully, but these errors were encountered: