[GHC] #13315: Compile broken on new MSYS2

#13315: Compile broken on new MSYS2 -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Build System | Version: 8.0.1 Keywords: | Operating System: Windows Architecture: | Type of failure: Building GHC Unknown/Multiple | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13315 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13315: Compile broken on new MSYS2 -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): The only workaround I have found so far that works reliably is forcing the mounts to be text mounts. My `/ect/fstab` contains {{{ none / cygdrive text,posix=0,noacl,user 0 0 C:/TeamCity/buildAgent/work /c/TeamCity/buildAgent/work ntfs text,posix=0,noacl,user 0 0 }}} It seems to be important to also force the `/` to be a text mount. The tools seem to look at the path they're in to determine how to behave. note that the output of `mount` does not reflect the change of the `/` mount, but it does work. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13315#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13315: Compile broken on new MSYS2 -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13315#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13315: Compile broken on new MSYS2 -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: upstream Priority: high | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => upstream Comment: https://github.com/Alexpux/MSYS2-packages/issues/822 The solution above is only partial. pipes are still affected by this change in behaviour and there's no way to correct those without inserting `dos2unix` calls between the pipes. This is a non-starter. The above changes are enough to build GHC again, just seems not enough to be able to run `nofib`. The best solution is for the `MSYS2` project to revert these `Cygwin` patches in the distro. As they're not the expected behaviour for Windows. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13315#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13315: Compile broken on new MSYS2 -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: Component: Build System | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Windows | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: upstream => closed * resolution: => fixed Comment: upstream has reverted the change made by cygwin. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13315#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC