NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14.01k forks source link

haskell.packages.ghc865.base-noprelude is broken (breaks pandoc on ghc865) #95970

Closed lf- closed 3 years ago

lf- commented 4 years ago

Describe the bug The build for nixpkgs.haskell.packages.ghc865.base-noprelude is broken, also breaking pandoc. It is not broken on the nixos-20.03 branch.

This regression appears to have happened in ea1aae15ae62c59641cfb84f1138a8a0d3b365e2. git bisect run nix-build . -A haskell.packages.ghc865.base-noprelude

Fail log

running nix-build . -A haskell.packages.ghc865.base-noprelude
these derivations will be built:
  /nix/store/ybvpahvhmkzl017826k9q2dhyh1jr9w7-base-noprelude-4.13.0.0.drv
building '/nix/store/ybvpahvhmkzl017826k9q2dhyh1jr9w7-base-noprelude-4.13.0.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/hzj3fpcfcm6cjp2lnjlqxfyzwqvp8nmb-ghc-8.6.5.
unpacking sources
unpacking source archive /nix/store/wij1zy1f3kw6pnh32a7vrk8qj2mdhn5q-base-noprelude-4.13.0.0.tar.gz
source root is base-noprelude-4.13.0.0
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file base-noprelude-4.13.0.0/LICENSE
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main             ( /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs, /build/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/kmmg81gi14qx07n37p8cs7s2331skgh9-base-noprelude-4.13.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/
$libname --with-gcc=gcc --package-db=/build/package.conf.d --ghc-option=-j4 --disable-split-objs --enable-library-profiling --profiling-detail=exported
-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --en
able-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/7yjv8l75a8b1x3vmmnbsdwd5b0gzngga-ncurses-6.1-2
0190112/lib --extra-lib-dirs=/nix/store/phwyg24nm8z4r91iyrhmdfljxpw1ihd5-libffi-3.3/lib --extra-lib-dirs=/nix/store/r05vk4zq34sps98izq4v4n9h7m1a6wgx-gm
p-6.2.0/lib
Using Parsec parser
Configuring base-noprelude-4.13.0.0...
CallStack (from HasCallStack):
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:950:20 in Cabal-2.4.0.1:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:460:12 in Cabal-2.4.0.1:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:596:20 in Cabal-2.4.0.1:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.4.0.1:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:178:19 in Cabal-2.4.0.1:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:115:27 in Cabal-2.4.0.1:Distribution.Simple
  defaultMain, called at /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs:2:8 in main:Main
Setup: Encountered missing dependencies:
base ==4.13.0.0

builder for '/nix/store/ybvpahvhmkzl017826k9q2dhyh1jr9w7-base-noprelude-4.13.0.0.drv' failed with exit code 1
error: build of '/nix/store/ybvpahvhmkzl017826k9q2dhyh1jr9w7-base-noprelude-4.13.0.0.drv' failed

To Reproduce Steps to reproduce the behavior:

  1. nix-build -A haskell.packages.ghc865.base-noprelude

Expected behavior Package should build.

Additional context This broke the build for pandoc and probably many other packages.

Notify maintainers

@peti

Metadata Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
  - haskell.packages.ghc865.base-noprelude
  - haskell.packages.ghc865.pandoc
# a list of nixos modules affected by the problem
module:
maralorn commented 4 years ago

The issue here is, that that commit bumped the base and base-noprelude version we use (because it bumps default ghc to 8.8). I am not sure, but I think a fix for this would be to override base-noprelude to 4.12.0.0 in pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix

cdepillabout commented 4 years ago

Alternatively, if possible we may want to just raise pandoc to compile with ghc-8.8.

maralorn commented 4 years ago

I think this issue is about pandoc being broken with ghc 8.6.5. I think the normal nixpkgs pandoc is already build with 8.8. at least I can install it without issue.

cdepillabout commented 4 years ago

@maralorn Aaah, that makes sense. Thanks for the clarification.

@lf- In that case, you should be aware that the support for various Haskell packages not on the current main Haskell compiler can be very spotty.

For instance, the current main Haskell compiler is GHC-8.8. As @maralorn said, Pandoc is built with GHC-8.8, but it may not be working on GHC-8.10, GHC-8.6, etc.

If you'd like to build Pandoc with an older GHC, I suggest you just use an older version of Nixpkgs, where the main GHC is older.

lf- commented 4 years ago

@cdepillabout I'd like to, but there are some dependency issues such that nixpkgs Haskell is overall more broken on ghc 8.8, for my project at least, with more dependency conflicts, mostly relating to base versions. And I want Haskell language server for productivity reasons, which is why I was trying to upgrade nixpkgs.

cdepillabout commented 3 years ago

The haskell-updates branch has now been updated to Stackage Nightly, which is currently using ghc-8.10.2.

Given that it hasn't been fixed, I don't think it is likely that anyone will look into getting pandoc building on the old ghc-8.6.5. If you need pandoc building with an old GHC, I suggest you just use an old version of nixpkgs.

lf- commented 3 years ago

@cdepillabout yeah, the update on that is we migrated to GHC8.8, with some suffering from Pandoc changes, and are holding back the ghcjs components to nixos-20.03 [which we intend on moving forward but haven't had time] :)

so it's all good on our end.