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/ghc cross mingw #50869

Closed
wants to merge 44 commits into from
Closed

Conversation

angerman
Copy link
Contributor

Motivation for this change
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.

this will break when cross compiling where targetPlatform might be something that's not darwin, however the build host is actually darwin.
This is triggered during the check validity phase when cross compiling.

When it is perfectly fine to use the binary package on the build machine.
Only paxmark `haddock` if it was built (not all configuration build haddock).
…arwin"

This reverts commit 4b6c9232b6e6b8fcfc27bf601bbeb9e3aea91818.
This reverts commit 4dac9189b82fefe0176df9b8bc98f549474e1136.
Otherwise we'll end up with inconsistent dependencies.

- haskeline -> stm (1), as shipped with GHC.
- ... -> stm (2), as built with nix.

(1) /= (2) => cabal complains.
For cross compilation, we don't need it, it's deferred to the Setup derivation.
When ghc is th enativeGhc, we don't need to add it to the buildInputs either.
nixpkgs#37012 and  nixpkgs#37707 introduces the setup-hooks for libiconv, which inject `-liconv` into the `NIX_LDFLAGS`. This breaks horribly on windows where the linker end up having no idea how to linke `-liconv`. The configure.ac file specifically ignores libiconv on windows.
cleverca22 and others added 14 commits May 16, 2018 16:42
This reverts commit 7f86470.
Nix cc logic relies on passing /lib for each dependency as a library
search path.  This makes little sense for haskell packages, as their
libs are nested deeply in the /lib tree.  Also GHC will generate the
right library serach paths on its own from the package database
entries.

The larger issue though is that with one search path entry for each
library, and a similar one generated by GHC for each dependency
will eventually overflow the command line argument limits.

As such we do *not* put haskell libraries into $out anymore.
@Ericson2314
Copy link
Member

@angerman you planning on breaking this up or something?

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