Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"invalid argument" error on windows #1448
I had dependency problems building my project with global cabal, so i wanted to switch to stack. Whereas I am able to install new packages via cabal-install, stack always fails with the same error.
The system is Windows 8.1 x64 first with haskell platform and stack, later only stack. The error did not change.
Steps to reproduce
I have tried both powershell and cmd, uninstalling haskell platform, manually removing the stack root, ghc and cabal dirs in %APPDATA%. It doesn't change. Someone on the IRC suggested a unicode problem, but i have no idea how to check for that.
I have the same issue on windows with
I think you can also add this to your environment variables in windows to work but all this feels like workarounds to me - so it would be great if you could look on it again
in case I am just using an outdated version (although I did grab the latest binary just now) - then please feel free to ignore or delete this comment/item
referenced this issue
Jan 11, 2016
@CarstenKoenig Can you try stack-1.0.2 with GHC 7.10.3? There have been a number of fixes to the way GHC handles character encoding and so Stack no longer does any of the codepage/locale hacks if it detects that you're using ghc-7.10.3 or later.
If that doesn't help, I'm surprised that LANG has any effect on Windows. Have you tried using
I just tested it with 1.0.2 and indeed it seems to work (even with GHC 7.10.2).
To make it short I removed the environment and will try again once I rebooted my machine tomorrow.
well that is hard to tell:
The error happened first in the middle of building a project using
And maybe this is why you don't hear that much - if it only happens with certain packages in the middle of a big pile of other packages(?)
it's still there with stack 1.0.4 (while building ghcjs) - I tried:
nothing works at the moment
I just tried again and yes @mgsloan was on the right track.
Thankfully you don't have to reset your complete system.
At least on my german Win8 and Win10 systems - if you change the Language for non-Unicode programs settings in windows (as described here) to Englisch (US)
GhcJs seems to be finally compiling (at least the
I have the exactly same problem, also during building GHCJS -