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

Remove reference to unpackaged GHC version #51050

Merged
merged 1 commit into from Nov 26, 2018
Merged

Conversation

alyssais
Copy link
Member

@alyssais alyssais commented Nov 25, 2018

This reverts #28827.

Motivation for this change

#51042

ghc802 is no longer in Nixpkgs as of 2f0de54.

The Cabal bug that ghc802 was a workaround for was fixed in Cabal 2.2, though, so this shouldn't be necessary any more.

Upstream bugs:
NixOS/jailbreak-cabal#13
haskell/cabal#4719

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This reverts commit d13f7c5.

ghc802 is no longer in Nixpkgs as of
2f0de54.

The Cabal bug that ghc802 was a workaround for was fixed in Cabal 2.2,
though, so this shouldn't be necessary any more.

Upstream bugs:
NixOS/jailbreak-cabal#13
haskell/cabal#4719

Fixes NixOS#51042.
@alyssais
Copy link
Member Author

@GrahamcOfBorg build haskell.packages.ghcHEAD.jailbreak-cabal

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: haskell.packages.ghcHEAD.jailbreak-cabal

Partial log (click to expand)

builder for '/nix/store/xg8dk46g1ylqi95598pjjyaq37m6z605-llvm-3.9.1.drv' failed with exit code 2
cannot build derivation '/nix/store/8ghz4yg7jh9rlhjbnxql046sacrw2rjk-ghc-8.2.2-binary.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vay6sm6s5k1cy90v1nzq616i5agillkg-hscolour-1.24.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vl8z66hp2a09cbsdwcd4q8ak0y8jsm4a-hscolour-1.24.4.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/bxdf1ms46kcbnn25gjjiz937sb5v9ipx-mtl-2.2.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/x7f1n4760isg1mb2ra86rnkffpr86ybn-happy-1.19.9.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/z3f2s3spjc7favc5xrd2267lpzihd1fm-alex-3.2.4.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/yjsdfj1affmmlvw2j80briipxm2f2z3x-ghc-8.5.20180118.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/dsk5m17vyxp6iijbwry7xi6hcamqamgz-jailbreak-cabal-1.3.3.drv': 1 dependencies couldn't be built
error: build of '/nix/store/dsk5m17vyxp6iijbwry7xi6hcamqamgz-jailbreak-cabal-1.3.3.drv' failed

@alyssais
Copy link
Member Author

Failure on aarch64-linux

g++: internal compiler error

I highly doubt that that's related to this change.

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: haskell.packages.ghcHEAD.jailbreak-cabal

Partial log (click to expand)

"/nix/store/7j8xphvywambkdb9pq385kkvr3nfm7vw-ghc-8.2.2-binary/bin/ghc" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Wall  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -package-db libraries/bootstrapping.conf  -this-unit-id ghc-8.5 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage1/build -Icompiler/stage1/build -icompiler/stage1/build/./autogen -Icompiler/stage1/build/./autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/stage1    -optP-include -optPcompiler/stage1/build/./autogen/cabal_macros.h -package-id base-4.10.1.0 -package-id deepseq-1.4.3.0 -package-id directory-1.3.0.2 -package-id process-1.6.1.0 -package-id bytestring-0.10.8.2 -package-id binary-0.8.5.1 -package-id time-1.8.0.2 -package-id containers-0.5.10.2 -package-id array-0.5.2.0 -package-id filepath-1.4.1.2 -package-id template-haskell-2.13.0.0 -package-id hpc-0.6.0.3 -package-id transformers-0.5.4.0 -package-id ghc-boot-8.5 -package-id ghc-boot-th-8.5 -package-id ghci-8.5 -package-id unix-2.7.2.2 -package-id terminfo-0.4.1.0 -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -DSTAGE=1 -Rghc-timing  -Wcpp-undef  -no-user-package-db -rtsopts        -odir compiler/stage1/build -hidir compiler/stage1/build -stubdir compiler/stage1/build    -c compiler/llvmGen/LlvmMangler.hs -o compiler/stage1/build/LlvmMangler.o
<<ghc: 366848664 bytes, 64 GCs, 13724692/33865600 avg/max bytes residency (6 samples), 74M in use, 0.000 INIT (0.001 elapsed), 0.717 MUT (0.818 elapsed), 0.542 GC (0.578 elapsed) :ghc>>
"/nix/store/7j8xphvywambkdb9pq385kkvr3nfm7vw-ghc-8.2.2-binary/bin/ghc" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Wall  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -package-db libraries/bootstrapping.conf  -this-unit-id ghc-8.5 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage1/build -Icompiler/stage1/build -icompiler/stage1/build/./autogen -Icompiler/stage1/build/./autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/stage1    -optP-include -optPcompiler/stage1/build/./autogen/cabal_macros.h -package-id base-4.10.1.0 -package-id deepseq-1.4.3.0 -package-id directory-1.3.0.2 -package-id process-1.6.1.0 -package-id bytestring-0.10.8.2 -package-id binary-0.8.5.1 -package-id time-1.8.0.2 -package-id containers-0.5.10.2 -package-id array-0.5.2.0 -package-id filepath-1.4.1.2 -package-id template-haskell-2.13.0.0 -package-id hpc-0.6.0.3 -package-id transformers-0.5.4.0 -package-id ghc-boot-8.5 -package-id ghc-boot-th-8.5 -package-id ghci-8.5 -package-id unix-2.7.2.2 -package-id terminfo-0.4.1.0 -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -DSTAGE=1 -Rghc-timing  -Wcpp-undef  -no-user-package-db -rtsopts        -odir compiler/stage1/build -hidir compiler/stage1/build -stubdir compiler/stage1/build    -c compiler/llvmGen/LlvmCodeGen/Data.hs -o compiler/stage1/build/LlvmCodeGen/Data.o
<<ghc: 533362480 bytes, 79 GCs, 15394033/38443288 avg/max bytes residency (6 samples), 83M in use, 0.001 INIT (0.001 elapsed), 0.995 MUT (1.161 elapsed), 0.653 GC (0.696 elapsed) :ghc>>
"/nix/store/7j8xphvywambkdb9pq385kkvr3nfm7vw-ghc-8.2.2-binary/bin/ghc" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Wall  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -package-db libraries/bootstrapping.conf  -this-unit-id ghc-8.5 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage1/build -Icompiler/stage1/build -icompiler/stage1/build/./autogen -Icompiler/stage1/build/./autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/stage1    -optP-include -optPcompiler/stage1/build/./autogen/cabal_macros.h -package-id base-4.10.1.0 -package-id deepseq-1.4.3.0 -package-id directory-1.3.0.2 -package-id process-1.6.1.0 -package-id bytestring-0.10.8.2 -package-id binary-0.8.5.1 -package-id time-1.8.0.2 -package-id containers-0.5.10.2 -package-id array-0.5.2.0 -package-id filepath-1.4.1.2 -package-id template-haskell-2.13.0.0 -package-id hpc-0.6.0.3 -package-id transformers-0.5.4.0 -package-id ghc-boot-8.5 -package-id ghc-boot-th-8.5 -package-id ghci-8.5 -package-id unix-2.7.2.2 -package-id terminfo-0.4.1.0 -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -DSTAGE=1 -Rghc-timing  -Wcpp-undef  -no-user-package-db -rtsopts        -odir compiler/stage1/build -hidir compiler/stage1/build -stubdir compiler/stage1/build    -c compiler/llvmGen/LlvmCodeGen/Ppr.hs -o compiler/stage1/build/LlvmCodeGen/Ppr.o
<<ghc: 331658728 bytes, 59 GCs, 16124693/41075136 avg/max bytes residency (6 samples), 88M in use, 0.000 INIT (0.001 elapsed), 0.602 MUT (0.770 elapsed), 0.586 GC (0.628 elapsed) :ghc>>
"/nix/store/7j8xphvywambkdb9pq385kkvr3nfm7vw-ghc-8.2.2-binary/bin/ghc" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Wall  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -package-db libraries/bootstrapping.conf  -this-unit-id ghc-8.5 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage1/build -Icompiler/stage1/build -icompiler/stage1/build/./autogen -Icompiler/stage1/build/./autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/stage1    -optP-include -optPcompiler/stage1/build/./autogen/cabal_macros.h -package-id base-4.10.1.0 -package-id deepseq-1.4.3.0 -package-id directory-1.3.0.2 -package-id process-1.6.1.0 -package-id bytestring-0.10.8.2 -package-id binary-0.8.5.1 -package-id time-1.8.0.2 -package-id containers-0.5.10.2 -package-id array-0.5.2.0 -package-id filepath-1.4.1.2 -package-id template-haskell-2.13.0.0 -package-id hpc-0.6.0.3 -package-id transformers-0.5.4.0 -package-id ghc-boot-8.5 -package-id ghc-boot-th-8.5 -package-id ghci-8.5 -package-id unix-2.7.2.2 -package-id terminfo-0.4.1.0 -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -DSTAGE=1 -Rghc-timing  -Wcpp-undef  -no-user-package-db -rtsopts        -odir compiler/stage1/build -hidir compiler/stage1/build -stubdir compiler/stage1/build    -c compiler/llvmGen/LlvmCodeGen/CodeGen.hs -o compiler/stage1/build/LlvmCodeGen/CodeGen.o
building of '/nix/store/s0pbc20nndpw12c46fvij3ih6zhi8kjq-ghc-8.5.20180118.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/2dabbbs7ylsndcpgv1222mhvfp1va8mq-jailbreak-cabal-1.3.3.drv': 1 dependencies couldn't be built
error: build of '/nix/store/2dabbbs7ylsndcpgv1222mhvfp1va8mq-jailbreak-cabal-1.3.3.drv' failed

@Mic92 Mic92 merged commit 4fef4fb into NixOS:master Nov 26, 2018
@alyssais alyssais deleted the ghc-head branch November 26, 2018 14:31
@teto
Copy link
Member

teto commented Nov 28, 2018

Might be losely related I tried cherrypicking on nixos-unstable and then master but nix-shell -p haskellPackages.stack still fails with

error: while evaluating the attribute 'LD_LIBRARY_PATH' of the derivation 'myEnv' at /home/teto/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:180:11:
while evaluating 'makeSearchPathOutput' at /home/teto/nixpkgs/lib/strings.nix:142:5, called from (string):1:91:
while evaluating 'makeSearchPath' at /home/teto/nixpkgs/lib/strings.nix:122:5, called from /home/teto/nixpkgs/lib/strings.nix:142:11:
while evaluating anonymous function at /home/teto/nixpkgs/lib/strings.nix:123:77, called from undefined position:
while evaluating 'getOutput' at /home/teto/nixpkgs/lib/attrsets.nix:455:23, called from undefined position:
while evaluating the attribute 'compiler.ghc802' at /home/teto/nixpkgs/pkgs/top-level/haskell-packages.nix:43:3:
attribute 'ghc802' missing, at (string):1:43

When doing a strace:

4645  lstat("/home/teto/website", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
4645  lstat("/home/teto/website/with (import <nixpkgs> {}); let inputs = [haskell.compiler.ghc802 git gcc gmp]; libPath = lib.makeLibraryPath inputs; stackExtraArgs = lib.concatMap (pkg: [ ''--extra-lib-dirs=${lib.getLib pkg}", 0x7ffe5f5cd230) = -1 ENOENT (No such file or directory)
4645  getcwd("/home/teto/website", 4096) = 23

I can't find the reference to haskell.compiler.ghc802 anywhere in nixpkgs, my overlay or my file. Looks like it's some code in stack ? any idea how I can work around it ?

@teto
Copy link
Member

teto commented Nov 28, 2018

Seems like the code comes from stack, not sure how to override the ghc compiler though commercialhaskell/stack@da1102b#diff-941db6c0f438bcb7bd9e6c52089f0fb8

@teto
Copy link
Member

teto commented Nov 28, 2018

A good tip was given on irc. To work around teh stack limitation, add in your overlay a fake ghc802 compiler that redirects on another one.
compiler = prev.haskell.compiler // { ghc802 = prev.haskell.compiler.ghc844; };

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