Skip to content

Compile broken on new MSYS2

February comes with a major change in behavior for MSYS2/Cygwin. Tools such as awk/sed etc now use binary mode unless on a text mount: https://cygwin.com/ml/cygwin-announce/2017-02/msg00036.html

This is problematic because GHC etc only use the underlying OS to determine how to output line endings. As such we output \r\n but in sed et al $ will no longer match line endings. Which means out scripts are currently broken.

The build will fail with errors such as

[00:09:33][Step 2/6] utils/hp2ps/dist/build/.depend.c_asm:2: *** missing separator.  Stop.
[00:09:33][Step 2/6] make: *** [Makefile:125: all] Error 2

This is because the --make-depends output from GHC will write a file using \r\n newlines which sed et al will no longer match with $.

This change is pretty catastrophic in that it also applies to piped data from stdout/stderr.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information