-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would an additional platform check GHC version for Windows Subsystem for Linux make sense? #28471
Comments
/cc @peti. To me personally, WSL itself doesn't seem worth building all Haskell stuff twice on Hydra, and having |
I don't understand the technical details behind this request. What is WSL? Is that a separate platform in Nixpkgs? And if so, what is it called? |
@peti: it's about the linux-inside-windows situation: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide Using the same linux binaries should usually just work there. |
So it's not a separate platform in Nixpkgs? |
Yes, my understanding is that it doesn't need to be a separate platform, in general. (I don't use Windows, so I've never really tried WSL...) |
Yes, a different platform is kinda overkill. The way to currently detect if the user is running Linux or not is by inpecting the I was thinking about adding a check for GHC8+ |
I think it would be feasible to add a boolean argument to the GHC Nix expression that enables/disables use of large-address-space at compile-time so that people who want that can override the default choice easily. Disabling it for all of Linux by default doesn't sound like a good idea to me. @NickSeagull, does this answer your question? |
Definitely, disabling it for all of Linux is not feasible at all. The situation that I'm thinking of is:
How the user would proceed on enabling that flag, and furthermore, could they dynamicly enable it in their |
I think you'll find that https://nixos.org/nixpkgs/manual/#sec-overrides and https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure provide a wealth of information towards that end. If you have any specific questions, then it's probably best to ask on the nix-devel mailing list or -- even better -- in the #nixos IRC channel. The bug tracker seems like it's the wrong place for that kind of conversation. |
In case someone comes from Google looking for a working version of GHC for WSL, I've created a repository with overrides for different packages that are meant to be "patched" somehow for working properly in WSL. https://github.com/NickSeagull/wsl-nixpkgs |
Issue description
Currently, if a user tries to use GHC8+ in WSL, when using the versions provided by nixpkgs or by Stackage, it simply fails on compile anything as it tried to allocate more memory than it is able to (1TB+).
This is because GHC 8.0's new block-structured heap for 64-bit platforms. From the GHC 8.0.1 release notes:
There is a whole Github thread for discussing this on MS BashOnWindows repo.
Would it make sense for
nixpkgs
to include a "fixed" version of GHC8, so one is able to run it from WSL?This is solved easily, as described in this comment:
As I can see, it is already being checked for iOS in this file for
ghc-8.0.2
.Would it make sense to add another check for WSL here?
Steps to reproduce
Try to compile any project that depends on GHC8+ on WSL.
Technical details
nix-env (Nix) 1.11.13
"17.09pre112229.e619ace733"
grep: /etc/nix/nix.conf: No such file or directory
The text was updated successfully, but these errors were encountered: