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

ghcWithPackages fails due to 094edba #1161

Closed
aristidb opened this issue Nov 2, 2013 · 1 comment · Fixed by #1188
Closed

ghcWithPackages fails due to 094edba #1161

aristidb opened this issue Nov 2, 2013 · 1 comment · Fixed by #1188

Comments

@aristidb
Copy link
Contributor

aristidb commented Nov 2, 2013

I have this in my system environment:

      (haskellPackages.ghcWithPackages (self : with self;
        [ xmonad xmonadContrib xmonadExtras
          haskellPlatform diagrams diagramsCairo pipes criterion ] ))

When I revert @peti's commit 094edba, it works fine, but with that commit nixos-rebuild fails:

building path(s) `/nix/store/lcrvwna97v9gc17yx29wd0hssk3026h7-etc-file'
building path(s) `/nix/store/lyqf2j52zmyypc02k05n7wq024v2vpac-issue'
building path(s) `/nix/store/cm1a6hncy2spn06iz8x9ykbgsay20m4m-haskell-env-ghc-7.6.3'
building path(s) `/nix/store/1vyis990azzvjm49q28w8yq4ab8vhq62-nixos-version'
building path(s) `/nix/store/lxvfajqbnxij7dqw1gz0iqzlgvdd60i0-options-db.xml'
building /nix/store/lcrvwna97v9gc17yx29wd0hssk3026h7-etc-file
building /nix/store/lyqf2j52zmyypc02k05n7wq024v2vpac-issue
building /nix/store/cm1a6hncy2spn06iz8x9ykbgsay20m4m-haskell-env-ghc-7.6.3
building /nix/store/lxvfajqbnxij7dqw1gz0iqzlgvdd60i0-options-db.xml
collision between `/nix/store/p01hdsfn3hhkwynwa32zi2y01sch2pa7-ghc-7.6.3/bin/ghc-pkg-7.6.3' and `/nix/store/8jahygmb98mpxzziwf3facnp3z3v1m2h-ghc-7.6.3-wrapper/bin/ghc-pkg-7.6.3' at /nix/store/9z6d76pz8rr7gci2n3igh5dqi7ac5xqj-builder.pl line 72.
builder for `/nix/store/rv3p6vymb5g8a6ch4138jg18x5ir8lss-haskell-env-ghc-7.6.3.drv' failed with exit code 2
cannot build derivation `/nix/store/dac3f98v5a772srads3vxl4sfsis7mzf-system-path.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/j9d3irlydm4z3ylaqbnnvwwfhp1kqpli-nixos-14.02pre-e549f3d.drv': 1 dependencies couldn't be built
error: build of `/nix/store/j9d3irlydm4z3ylaqbnnvwwfhp1kqpli-nixos-14.02pre-e549f3d.drv' failed
Command exited with non-zero status 100
@peti
Copy link
Member

peti commented Nov 2, 2013

haskellPlatform exports ghc binaries that collide with the ones provided by the wrapper. If you remove that attribute and replace it with the list of packages that you're actually interested in, then the error will disappear. See the discussion at d64917a#commitcomment-4478148 for further details about this issue.

peti referenced this issue Nov 2, 2013
 * There now is full support for building Haskell packages as shared libraries
   for GHC versions 7.4.2 or later. The Cabal builder recognizes the following
   attributes:

    - enableSharedLibraries configures Cabal to build of shared libraries in
      addition to static ones. This option requires that all dependencies of
      the package have been compiled for use in shared libraries, too.

    - enableSharedExecutables configures Cabal to prefer shared libraries when
      linking executables.

   The default values for these attributes are arguments to the haskellPackages
   expression.

 * Haskell builds now run in a LANG="en_US.UTF-8" environment to avoid plenty
   of build and test suite errors. Without this setting, GHC seems unable to
   deal with the UTF-8 character encoding that's generally considered standard
   in the Haskell world.

 * The Cabal builder supports a new attribute 'testTarget' to specify the exact
   set of tests to be run during the check phase.

 * The ghc-wrapper attribute ghcVersion has been removed. Instead, we use the
   ghc.version attribute, which exists in unwrapped GHC derivations, too.
peti added a commit to peti/nixpkgs that referenced this issue Nov 9, 2013
…ignores collisions.

This change is intended to fix <NixOS#1161>
and to address some of the concerns that come up during the discussion of
<NixOS@d64917a>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants