Opened 5 years ago

Closed 5 years ago

Last modified 11 months ago

#9603 closed bug (duplicate)

getArgs path transformation is broken on Windows

Reported by: gintas Owned by:
Priority: normal Milestone:
Component: Build System (make) Version: 7.9
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Test Case:
Blocked By: Blocking:
Related Tickets: #9218 Differential Rev(s):
Wiki Page:


It looks like System.Environment.getArgs is trying to be smart on Windows and to transform arguments drive paths to environment-local paths (e.g., 'C:/' => 'C:\msys64', but it messes up the mangling somewhere if the path is not at the beginning of the argument:

$ args "C:/" C:/?

$ /tmp/args " C:/" C;C:\\msys64?

Note the leading "C;" which makes no sense.

$ uname -s MINGW64_NT-6.3

Change History (3)

comment:1 Changed 5 years ago by gintas

This turns out to be an issue with the old mingw gcc that is bundled with GHC in the ghc-tarballs repository. A simple C file printing the contents of argv prints a mangled string when compiled with the bundled gcc, but works correctly when using the relatively up-to-date system gcc version.

Last edited 5 years ago by gintas (previous) (diff)

comment:2 Changed 5 years ago by thomie

Cc: hvr ekmett removed
Component: libraries/baseBuild System
Resolution: duplicate
Status: newclosed

Sounds like doing #9218 will solve this issue as well.

comment:3 Changed 11 months ago by bgamari

Component: Build SystemBuild System (make)

The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make build system to prevent confusion.

Note: See TracTickets for help on using tickets.