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

fix ghc bootstrap on non-nixos nonstd-storepath #40691

Closed
wants to merge 1 commit into from
Closed

fix ghc bootstrap on non-nixos nonstd-storepath #40691

wants to merge 1 commit into from

Conversation

jcumming
Copy link
Contributor

@jcumming jcumming commented May 17, 2018

Something goes amiss in the configurePhase and binaries start picking up
system libraries and everything falls apart. Patch the configure script
to use a bourne shell out of the store, and things are happier.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

Something goes amiss in the configurePhase and binaries start picking up
system binaries and everything falls apart. Patch the configure script
to use a bourne shell out of the store, and things are happier.
@peti
Copy link
Member

peti commented May 17, 2018

@GrahamcOfBorg build haskell.compiler.ghc7103Binary haskellPackages.ghc

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskell.compiler.ghc7103Binary, haskellPackages.ghc

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

Looks good. I'll run some test builds to confirm everything still works fine afterwards.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: haskell.compiler.ghc7103Binary, haskellPackages.ghc

Partial log (click to expand)

/nix/store/9xbkliqfp1b3ngqn455vsg913vjwx5vx-ghc-7.10.3-binary/share/doc/ghc/html/libraries/gen_contents_index: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/9xbkliqfp1b3ngqn455vsg913vjwx5vx-ghc-7.10.3-binary/lib/ghc-7.10.3/ghc-split: interpreter directive changed from "/usr/bin/perl" to "/nix/store/cxdmh98g0lvl1dyq304c1lq7f90dh01f-perl-5.24.3/bin/perl"
head: write error: Broken pipe
checking for references to /build in /nix/store/9xbkliqfp1b3ngqn455vsg913vjwx5vx-ghc-7.10.3-binary...
running install tests
[1 of 1] Compiling Main             ( main.hs, main.o )
Linking main ...
compilation ok
/nix/store/9xbkliqfp1b3ngqn455vsg913vjwx5vx-ghc-7.10.3-binary
/nix/store/3cv3s9lv79qjkqyafbclbk03gz5z813w-ghc-8.2.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: haskell.compiler.ghc7103Binary, haskellPackages.ghc

Partial log (click to expand)

     warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]

/nix/store/p5l238l1m6n55pwpsri66r67aj9yq4jm-ghc-7.10.3-binary/lib/ghc-7.10.3/include/rts/storage/ClosureMacros.h:503:56:
     note: expanded from macro 'ZERO_SLOP_FOR_SANITY_CHECK'
#define ZERO_SLOP_FOR_SANITY_CHECK (defined(DEBUG) && !defined(THREADED_RTS))
                                                       ^
9 warnings generated.
compilation ok
/nix/store/p5l238l1m6n55pwpsri66r67aj9yq4jm-ghc-7.10.3-binary
/nix/store/qfhwiq46wws3zlayz3smi422rz8lnwxc-ghc-8.2.2

@peti
Copy link
Member

peti commented May 17, 2018

Merged to haskell-updates via a86aa2a5b274c8eb59e802d6fd14a33dbf490819.

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

3 participants