Skip to content
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

Feature/mingw coreutils #43710

Closed
wants to merge 3 commits into from
Closed

Conversation

angerman
Copy link
Contributor

Motivation for this change

Broken out of #43559

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@@ -10,6 +10,7 @@

assert aclSupport -> acl != null;
assert selinuxSupport -> libselinux != null && libsepol != null;
assert hostPlatform.libc != "msvcrt";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make more sense to avoid the assertion and just do platforms = platforms.unix below. Assertions are annoying because there is no way to override them with something like allowUnsupportedPlatform.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point.

@@ -40,7 +40,7 @@ let
libc_lib = if libc == null then null else getLib libc;
cc_solib = getLib cc;
# The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
coreutils_bin = if nativeTools then "" else getBin coreutils;
coreutils_bin = if (nativeTools || targetPlatform.isWindows) then "" else getBin coreutils;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think this one is in error? It means cc-wrapper won't use coreutils, which seems wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. this is right. It should not use coreutils on windows. We don't have them on windows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that means you won't use them on Linux when you are making windows binaries. Use hostPlatform to turn it just when compiling on Windows (for any target).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... I'll try hostPlatform, let's see. My issue was that it tried to buld coreutils for windows when cross compiling windows stuff on linux.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't want the cc-wrapper changes. The rest is good, though.

@matthewbauer
Copy link
Member

matthewbauer commented Aug 1, 2018

@angerman Did you ever run into this bug:

libraries/Win32/ghc.mk:4: libraries/Win32/dist-install/build/.depend-v-p.haskell: No such file or directory
make[1]: *** [libraries/Win32/ghc.mk:4: libraries/Win32/dist-install/build/Graphics/Win32/GDI/Types.hs] Error 1

? Here is the build:

https://hydra.nixos.org/build/78166084

@angerman
Copy link
Contributor Author

angerman commented Aug 1, 2018

@matthewbauer I haven't. But I remember there being some similar sounding issues with recent git checkouts of GHC. I haven't looked into those though...

@matthewbauer
Copy link
Member

Applied in acaa6c9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants