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

*** abort because of serious configure-time warning from Cabal #134

Open
MMesch opened this issue Sep 26, 2018 · 8 comments
Open

*** abort because of serious configure-time warning from Cabal #134

MMesch opened this issue Sep 26, 2018 · 8 comments

Comments

@MMesch
Copy link

MMesch commented Sep 26, 2018

probably I am doing something wrong. I often get this error when building with the default.nix that was generated by stack2nix:

*** abort because of serious configure-time warning from Cabal

for example in one case:

   This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
      package accelerate-llvm-native (accelerate-llvm-native-1.2.0.0-6h9HfY2jTx2VH4bfhr7AT) requires Cabal-2.2.0.1
      package proto-lens-protoc (proto-lens-protoc-0.3.1.0-JlEPGIPhQWg4b89HqVvNBT) requires Cabal-2.2.0.1-302vnEvwKg

Usually the version is the same. I had the same warning with a bunch of other packes, e.g. mtl, text, parsec, stm, which I managed to fix by adding:

in compiler.override {
  overrides = self: super: builtins.intersectAttrs super {
          mtl = null;
          text = null;
          stm = null;
          parsec = null;
          llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm_5; };
      };
  initialPackages = stackPackages;
  configurationCommon = { ... }: self: super: {};
  compilerConfig = self: super: {};
}

I would like to understand why this happens and how it can be best avoided. Unfortunately I can't share my whole package to reproduce this. Do you have any idea what this is all about?

@domenkozar
Copy link
Contributor

In this particular case it's overriding Cabal package with GHC core package Cabal. nulling is should help.

@MMesch
Copy link
Author

MMesch commented Sep 27, 2018

yea, nulling works! Just wanted to make sure if there is a better way. So in general all core packages should be nulled? Could this be done automatically by stack2nix for a specific compiler version? Thanks for your help!

@domenkozar
Copy link
Contributor

This is taken care in https://github.com/input-output-hk/stack2nix/blob/master/src/Stack2nix/Render.hs#L41

To handle this properly, it should be dynamic based on GHC version given, which is what #84 is for.

@jbddc
Copy link

jbddc commented Oct 8, 2018

I'm having this issue trying to install stack2nix itself on macOS 10.14 via nix-env -i stack2nix.

log of error:

Warning:
    This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
      package stack (stack-1.7.1-BQMzj61gcS0AMnQ9515h5G) requires hpack-0.28.2-D5wQRI3i0Aj8zKd1Fim8jg
      package cabal2nix (cabal2nix-2.11.1-GuaVBKOfTThDuKLENITX3N) requires hpack-0.31.0-AESTz2gkjLlInPZKnFfKik
      package hpack (hpack-0.31.0-AESTz2gkjLlInPZKnFfKik) requires yaml-0.10.2.0-2VrG2IcweXi2bYu60tkqhi
      package cabal2nix (cabal2nix-2.11.1-GuaVBKOfTThDuKLENITX3N) requires yaml-0.10.2.0-2VrG2IcweXi2bYu60tkqhi
      package stack (stack-1.7.1-BQMzj61gcS0AMnQ9515h5G) requires yaml-0.8.32-4Z0OzlK7LYy1TYzjczwhtA
      package hpack (hpack-0.28.2-D5wQRI3i0Aj8zKd1Fim8jg) requires yaml-0.8.32-4Z0OzlK7LYy1TYzjczwhtA
Using Cabal-2.2.0.1 compiled by ghc-8.4
Using compiler: ghc-8.4.3
Using install prefix:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1
Executables installed in:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1/bin
Libraries installed in:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1/lib/ghc-8.4.3/x86_64-osx-ghc-8.4.3/stack2nix-0.2.1-3ERNdvgZd5F7eRT61gEbWY
Dynamic Libraries installed in:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1/lib/ghc-8.4.3/x86_64-osx-ghc-8.4.3
Private executables installed in:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1/libexec/x86_64-osx-ghc-8.4.3/stack2nix-0.2.1
Data files installed in:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1/share/x86_64-osx-ghc-8.4.3/stack2nix-0.2.1
Documentation installed in:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1/share/doc/x86_64-osx-ghc-8.4.3/stack2nix-0.2.1
Configuration files installed in:
/nix/store/aghblpy3r2jyk8i5g0cg0kz8m1i3qgad-stack2nix-0.2.1/etc
No alex found
Using ar found on system at:
/nix/store/9xjkb4xz0b5lmizij9ppxy7lkxdxhx6b-cctools-binutils-darwin/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 4.2.1 given by user at:
/nix/store/6mca864ajrir4d7j0aka53pvh2p7vdaq-clang-wrapper-5.0.2/bin/clang
Using ghc version 8.4.3 found on system at:
/nix/store/3bnymdg63h6cr994jvfiwiikviv02kan-ghc-8.4.3/bin/ghc
Using ghc-pkg version 8.4.3 found on system at:
/nix/store/3bnymdg63h6cr994jvfiwiikviv02kan-ghc-8.4.3/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.20.0 found on system at:
/nix/store/3bnymdg63h6cr994jvfiwiikviv02kan-ghc-8.4.3/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/3bnymdg63h6cr994jvfiwiikviv02kan-ghc-8.4.3/bin/hpc
Using hsc2hs version 0.68.3 found on system at:
/nix/store/3bnymdg63h6cr994jvfiwiikviv02kan-ghc-8.4.3/bin/hsc2hs
No hscolour found
No jhc found
Using ld found on system at:
/nix/store/qyl9m5wynpyh69qcad28zh8r7ian1x8c-cctools-binutils-darwin-wrapper/bin/ld
No lhc found
No lhc-pkg found
No pkg-config found
Using runghc version 8.4.3 found on system at:
/nix/store/3bnymdg63h6cr994jvfiwiikviv02kan-ghc-8.4.3/bin/runghc
Using strip found on system at:
/nix/store/9xjkb4xz0b5lmizij9ppxy7lkxdxhx6b-cctools-binutils-darwin/bin/strip
Using tar found on system at:
/nix/store/342bldlxhl2smdigz01and97i9wjxfwc-gnutar-1.30/bin/tar
No uhc found
*** abort because of serious configure-time warning from Cabal
builder for '/nix/store/sblgy8dxgr3symldlv2wjlrk7y7jncbk-stack2nix-0.2.1.drv' failed with exit code 1
error: build of '/nix/store/sblgy8dxgr3symldlv2wjlrk7y7jncbk-stack2nix-0.2.1.drv' failed

@domenkozar
Copy link
Contributor

domenkozar commented Oct 8, 2018

For now best to use it from NixOS 18.09, I'll fix nixpkgs master.

@domenkozar
Copy link
Contributor

NixOS/nixpkgs@9e50260

@michaelpj
Copy link

I also just hit this when using stack2nix with a LTS-12 series snapshot.

@domenkozar
Copy link
Contributor

Note: waiting on #84

infinisil added a commit to infinisil/all-hies that referenced this issue Apr 6, 2019
- Now fetching nixpgks with fetchFromGitHub by computing and saving the
sha256 at update time
- Detecting core GHC libraries and setting them to null to fix builds,
workaround for input-output-hk/stack2nix#134
- Add override directory to fix builds for specific ghc versions
- Speed up builds by disabling library profiling for everything
- New nix file structure with powerful selection mechanisms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants