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

Haskell: can't compile warp in ghcWithPackages, maybe problem with nats? #7240

Closed
ryantm opened this issue Apr 7, 2015 · 6 comments
Closed

Comments

@ryantm
Copy link
Member

ryantm commented Apr 7, 2015

I made this shell.nix file:

{ pkgs ? (import <nixpkgs> {}).pkgs }:

let

  env = pkgs.haskellngPackages.ghcWithPackages (p: with p;
   [ warp ]);

in

pkgs.stdenv.mkDerivation {
  name = "heyefi";
  buildInputs = [ env ];
  shellHook = ''
    export NIX_GHC="${env}/bin/ghc"
    export NIX_GHCPKG="${env}/bin/ghc-pkg"
    export NIX_GHC_DOCDIR="${env}/share/doc/ghc/html"
    export NIX_GHC_LIBDIR=$( $NIX_GHC --print-libdir )
  '';
}

and tried to run it with:

$ make shell
nix-shell --pure -j 4 -I nixpkgs=/home/ryantm/p/nixpkgs --show-trace --option extra-binary-caches http://hydra.nixos.org --option extra-binary-caches http://hydra.cryp.to --option build-use-chroot true --fallback 
these derivations will be built:
  /nix/store/kiqjx1l2jkclmjf6j8p65irp9y81hfyh-ghc-7.8.4.drv
building path(s) ‘/nix/store/7w71lymnlisliwz1amrvvyv2403lhf5y-ghc-7.8.4’
created 151 symlinks in user environment
There are problems in package nats-1:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
There are problems in package wai-3.0.2.3:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
There are problems in package simple-sendfile-0.2.18:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "unix-2.7.0.1-d7de2c9293605f58486b3752d772cdb6" doesn't exist
There are problems in package zlib-0.5.4.2:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
There are problems in package vault-0.3.0.4:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "containers-0.5.5.1-d7910f1cd81272c1f31ca9f71d0f206e" doesn't exist
There are problems in package semigroups-0.16.2.2:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "containers-0.5.5.1-d7910f1cd81272c1f31ca9f71d0f206e" doesn't exist
  dependency "deepseq-1.3.0.2-0ddc77716bd2515426e1ba39f6788a4f" doesn't exist
There are problems in package appar-0.1.4:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
There are problems in package text-1.2.0.4:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "deepseq-1.3.0.2-0ddc77716bd2515426e1ba39f6788a4f" doesn't exist
There are problems in package http-date-0.0.6:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
There are problems in package byteorder-1.0.4:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
There are problems in package http-types-0.8.6:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
There are problems in package auto-update-0.1.2.1:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
There are problems in package void-0.7:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
There are problems in package blaze-builder-0.3.3.4:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
There are problems in package warp-3.0.11:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "unix-2.7.0.1-d7de2c9293605f58486b3752d772cdb6" doesn't exist
There are problems in package case-insensitive-1.2.0.4:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "deepseq-1.3.0.2-0ddc77716bd2515426e1ba39f6788a4f" doesn't exist
There are problems in package iproute-1.4.0:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "containers-0.5.5.1-d7910f1cd81272c1f31ca9f71d0f206e" doesn't exist
There are problems in package hashable-1.2.3.2:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
There are problems in package streaming-commons-0.1.10.0:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "directory-1.2.1.0-1b239651bf547478c9e952c1e47c8fbe" doesn't exist
  dependency "process-1.2.0.0-ac5f66ef47c8e6680cd098551063b07c" doesn't exist
  dependency "unix-2.7.0.1-d7de2c9293605f58486b3752d772cdb6" doesn't exist
There are problems in package stm-2.4.4:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
There are problems in package scientific-0.3.3.8:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "deepseq-1.3.0.2-0ddc77716bd2515426e1ba39f6788a4f" doesn't exist
There are problems in package unordered-containers-0.2.5.1:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "deepseq-1.3.0.2-0ddc77716bd2515426e1ba39f6788a4f" doesn't exist
There are problems in package network-2.6.0.2:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "unix-2.7.0.1-d7de2c9293605f58486b3752d772cdb6" doesn't exist
There are problems in package attoparsec-0.12.1.6:
  dependency "array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd" doesn't exist
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09" doesn't exist
  dependency "containers-0.5.5.1-d7910f1cd81272c1f31ca9f71d0f206e" doesn't exist
  dependency "deepseq-1.3.0.2-0ddc77716bd2515426e1ba39f6788a4f" doesn't exist
There are problems in package unix-compat-0.4.1.4:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "unix-2.7.0.1-d7de2c9293605f58486b3752d772cdb6" doesn't exist
There are problems in package random-1.1:
  dependency "base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1" doesn't exist
  dependency "time-1.4.2-192d26f44a2c945780bbb921626c3399" doesn't exist

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
nats-1
wai-3.0.2.3
simple-sendfile-0.2.18
zlib-0.5.4.2
vault-0.3.0.4
semigroups-0.16.2.2
appar-0.1.4
text-1.2.0.4
http-date-0.0.6
byteorder-1.0.4
http-types-0.8.6
auto-update-0.1.2.1
void-0.7
blaze-builder-0.3.3.4
warp-3.0.11
case-insensitive-1.2.0.4
iproute-1.4.0
hashable-1.2.3.2
streaming-commons-0.1.10.0
stm-2.4.4
scientific-0.3.3.8
unordered-containers-0.2.5.1
network-2.6.0.2
attoparsec-0.12.1.6
unix-compat-0.4.1.4
random-1.1
builder for ‘/nix/store/kiqjx1l2jkclmjf6j8p65irp9y81hfyh-ghc-7.8.4.drv’ failed with exit code 1
error: build of ‘/nix/store/kiqjx1l2jkclmjf6j8p65irp9y81hfyh-ghc-7.8.4.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies
make: *** [shell] Error 100

I tried looking into it some and found that nats does not accept base-4.8. https://github.com/ekmett/nats/blob/master/nats.cabal#L49 I tried jailbreaking it but that did not seem to help:

$ make shell
nix-shell --pure -j 4 -I nixpkgs=/home/ryantm/p/nixpkgs --show-trace --option extra-binary-caches http://hydra.nixos.org --option extra-binary-caches http://hydra.cryp.to --option build-use-chroot true --fallback 
these derivations will be built:
  /nix/store/z3xxkkj3vizr5zbpir92kwv2yrrfx8d1-haskell-nats-1.drv
  /nix/store/lsb1nsif4da9mpzbg2rfg406jxxnwaqj-haskell-semigroups-0.16.2.2.drv
  /nix/store/kla62zca0ma9296hljyancc5n4s3j65v-haskell-void-0.7.drv
  /nix/store/ad363mry2gsrlsvbplsl2mrq1j33ih4z-haskell-warp-3.0.11.drv
  /nix/store/ahj4yni46gprh211g7skg965w98y7g3l-ghc-7.8.4.drv
building path(s) ‘/nix/store/nlsz73zg2lr4kxdiadmixp8znp77gmcc-haskell-nats-1’
setupCompilerEnvironmentPhase
Build with /nix/store/rnxk1a1bz4rgy1rw4973blbfp9f0ic89-ghc-7.8.4.
unpacking sources
unpacking source archive /nix/store/k56p2471sjizjff4la33c7mcjjllipkg-nats-1.tar.gz
source root is nats-1
patching sources
Run jailbreak-cabal to lift version restrictions on build inputs.
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-haskell-nats-1.drv-0/package.conf.d -j1
[1 of 1] Compiling Main             ( Setup.lhs, /tmp/nix-build-haskell-nats-1.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/nlsz73zg2lr4kxdiadmixp8znp77gmcc-haskell-nats-1 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-haskell-nats-1.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/nlsz73zg2lr4kxdiadmixp8znp77gmcc-haskell-nats-1/lib/ghc-7.8.4/nats-1 --enable-split-objs --disable-library-profiling --enable-shared --enable-library-vanilla --enable-executable-dynamic --enable-tests
Configuring nats-1...
Flags chosen: hashable=True
Dependency base >=2 && <4.8: using base-4.7.0.2
Dependency hashable >=1.1 && <1.3: using hashable-1.2.3.2
Setup: The following installed packages are broken because other packages they
depend on are missing. These broken packages must be rebuilt before they can
be used.
package hashable-1.2.3.2 is broken due to missing package
base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1,
bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09
package text-1.2.0.4 is broken due to missing package
array-0.5.0.0-ce080a527b3819e94d851f7f80ca77dd,
base-4.7.0.2-cb23b5265b6e147094c0cd9ac819acb1,
bytestring-0.10.4.0-e82797828c29adab75d6eb4b53384f09,
deepseq-1.3.0.2-0ddc77716bd2515426e1ba39f6788a4f
builder for ‘/nix/store/z3xxkkj3vizr5zbpir92kwv2yrrfx8d1-haskell-nats-1.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/ahj4yni46gprh211g7skg965w98y7g3l-ghc-7.8.4.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/ahj4yni46gprh211g7skg965w98y7g3l-ghc-7.8.4.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies
make: *** [shell] Error 100

Environment:

$ uname -a
Linux rtmnix 3.14.36 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux
~/p/nixpkgs (master *)$ git rev-parse HEAD
facd53315b3bb4185e16c264a66bd2e46569a6e6

cc @peti

@peti
Copy link
Member

peti commented May 11, 2015

Please see #7792 for details how to recover from this issue.

@Fuuzetsu
Copy link
Member

This is getting pretty silly. I wonder if maybe we should fall back to 7.8.4 as default without parallel builds for now…

@itcowed
Copy link
Contributor

itcowed commented May 11, 2015

i think traditionally new y releases are typically not seen to the community as stable until z turns 3 or at least 2. i don't think it would be inappropriate at all to treat 7.8.4 as the default. i am currently rushing to migrate some of my projects onto 7.10, but this is only because i am using ghcjs which is an immature enough platform that staying on the bloody edge is fine. for most projects, 7.8.4 is probably great until some time next year

@Fuuzetsu
Copy link
Member

@dnhgff part of the rush to 7.10 was because a different non-determinism problem was fixed but of course part of it was because we like the bleeding edge ;). Alas we'd need more discussion first. It may just be that there will be a fix for our 7.10 problems in 7.10.2.

@peti
Copy link
Member

peti commented May 11, 2015

Personally, I think that the problems we've had with 7.10.1 plus parallel building are not worse yet than the ones we've had with 7.8.4 w/o parallel building, so I'm included to wait a little longer before we decide to revert. We might also try to disable parallel building with 7.10.x first, if these kind of issues continue to pop up frequently.

@Fuuzetsu
Copy link
Member

We might also try to disable parallel building with 7.10.x first, if these kind of issues continue to pop up frequently.

If you check my last comment on Trac 4012, you'll see that it happens without parallel builds too.

But yes, I'd wait too, just putting the thought out there.

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

No branches or pull requests

4 participants