Nixpkgs: haskellPackages.base_4_12_0_0 broken

Created on 10 Oct 2019  路  3Comments  路  Source: NixOS/nixpkgs

Issue description

haskellPackages.base_4_12_0_0 is broken.

Build log

these derivations will be built:
  /nix/store/0c6qrncb50niji76xhrd6gw94rcvcavv-base-4.12.0.0.drv
building '/nix/store/0c6qrncb50niji76xhrd6gw94rcvcavv-base-4.12.0.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/8fil9jim41clgkfbchn8yq14azgbr1zd-ghc-8.6.5.
unpacking sources
unpacking source archive /nix/store/b5n58gi6l70bmb35wmjbqv8d6m963y9r-base-4.12.0.0.tar.gz
source root is base-4.12.0.0
setting SOURCE_DATE_EPOCH to timestamp 1537738361 of file base-4.12.0.0/Unsafe/Coerce.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded

GHC/Float.hs:32:2: error:
     fatal error: ieee-flpt.h: No such file or directory
     #include "MachDeps.h"
      ^~~~~~~~~~~~~
   |
32 | #include "MachDeps.h"
   |  ^
compilation terminated.
`cc' failed in phase `C pre-processor'. (Exit code: 1)
builder for '/nix/store/0c6qrncb50niji76xhrd6gw94rcvcavv-base-4.12.0.0.drv' failed with exit code 1
error: build of '/nix/store/0c6qrncb50niji76xhrd6gw94rcvcavv-base-4.12.0.0.drv' failed

Steps to reproduce

nix-build -A haskellPackages.base_4_12_0_0 --arg config '{ allowBroken = true; }'

Technical details

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

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.46, NixOS, 19.03.172764.50d5d73e22b (Koi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.2.2`
 - channels(root): `"nixos-19.03.173582.df7e351af91"`
 - nixpkgs: `/run/current-system/nixpkgs`
bug haskell

Most helpful comment

Do you think it would be worthwhile for me to try to figure out how to get base_4_12_0_0 to build correctly?

No, I don't think that there's anything useful that one can do with base_4_12_0_0. Even if it it were to compile, it wouldn't be good for anything. Using ghc with any base library other than the one it contains doesn't much sense.

All 3 comments

@leosbotelho Thanks for the report. Is there some reason you're specifically trying to use base_4_12_0_0?

Normally, when you get GHC from nixpkgs, it comes with base as one of its built-in packages:

$ nix-shell -p ghc
$ ghc-pkg list
/nix/store/4kb89jz02shsgh7lyx2dfnj6kjjfb01f-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
...
    base-4.12.0.0
...

Some of the core GHC packages have versions on Hackage later than the version provided by GHC. For instance, in nixos-19.09, the default GHC is 8.6.5. It provides array-0.5.3.0 with GHC:

$ nix-shell -p ghc
$ ghc-pkg list
/nix/store/4kb89jz02shsgh7lyx2dfnj6kjjfb01f-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
...
    array-0.5.3.0
...

However, there is actually a later version of array on Hackage: 0.5.4.0. nixpkgs also provides this version:

$ nix-build '<nixpkgs>' -A haskellPackages.array_0_5_4_0
...
/nix/store/cmp6cvh4035602l03bv3hlrsyzx1k3j6-array-0.5.4.0

So to sum up, nixpkgs provides the latest version of base as base_4_12_0_0, but it is currently not useful because base-4.12.0.0 is already packaged in with GHC.

I guess it would be ideal if base_4_12_0_0 compiled correctly, but there shouldn't currently be any problem with it not compiling.

@peti Do you think it would be worthwhile for me to try to figure out how to get base_4_12_0_0 to build correctly?

Do you think it would be worthwhile for me to try to figure out how to get base_4_12_0_0 to build correctly?

No, I don't think that there's anything useful that one can do with base_4_12_0_0. Even if it it were to compile, it wouldn't be good for anything. Using ghc with any base library other than the one it contains doesn't much sense.

@cdepillabout No specific reason. Just thought some broken packages were due to a broken - standalone - base, but your comments - and nix-build - helped to clarify much of it.
Haskell and Nix are giving me quite the headaches. But it's worth it.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vaibhavsagar picture vaibhavsagar  路  3Comments

ghost picture ghost  路  3Comments

spacekitteh picture spacekitteh  路  3Comments

tomberek picture tomberek  路  3Comments

copumpkin picture copumpkin  路  3Comments