shell.nix depends on build artifacts
Filed Mar 19, 2018, as https://github.com/snowleopard/hadrian/issues/532
- *Steps to reproduce:**
git clone --recursive git://git.haskell.org/ghc.git
cd ghc/hadrian
nix-shell --pure
- *Expected result:** Successful build.
- *Actual result:**
hadrian(master)$ nix-shell --pure
these derivations will be built:
/nix/store/lmpgkvswlkcgpcjdilbyh202vm8a5i5r-directory-1.3.1.5.drv
/nix/store/rcg0mmq0bincjfjnzbabc8fq7307bylq-process-1.6.3.0.drv
/nix/store/15alkpni823gkfp63c79962v032wxvjs-extra-1.6.4.drv
/nix/store/1b54g6nv8rw0kq3i5xjpcbhy88jvdnbr-xml-1.3.14.drv
/nix/store/89salv051l8yr2y2k52pzkqraw9lfib9-test-framework-0.8.1.1.drv
/nix/store/iqq0xsvgf3hf551b3jj0x3lg661c5y4f-test-framework-hunit-0.3.0.2.drv
/nix/store/cy7ynm7r9jb41kxb1gxbwdprhvl03ivk-parsec-3.1.13.0.drv
/nix/store/rgnsvxfvmbhrkniy0c86v65jgvx8nsan-test-framework-quickcheck2-0.3.0.4.drv
/nix/store/fyrj002axd2skdz370hi13fq6prjh5cz-network-uri-2.6.1.0.drv
/nix/store/7qcfy5gy9sjcz7cijqghgj3cilm2pzps-HTTP-4000.3.8.drv
/nix/store/gk0w3grh2hz008sp6ksy669zvl6pyznb-js-flot-0.8.3.drv
/nix/store/h39chz7m8zvawlrzfjsz496vl2rbp921-hashable-1.2.6.1.drv
/nix/store/zpv0xi25jq6p5kkpvbc11sq73dxi2g0a-unordered-containers-0.2.8.0.drv
/nix/store/i7p5c3mv9p20z7kb2mrdlpx0fwmyz3f5-shake-0.16.2.drv
/nix/store/pzfcvib6sbsaascsc7djzcfqzlw847gc-Cabal-2.3.0.0.drv
/nix/store/j5w4i42pgfy03s7fjsj4dfkis26c3nnp-happy-1.19.8.drv
/nix/store/pl2dxjvbqs36rh80q5i09zdhbh6hjl2r-alex-3.2.3.drv
/nix/store/dck8p81zlij9qksglaw8hkp11msrm426-hadrian-0.1.0.0.drv
building '/nix/store/lmpgkvswlkcgpcjdilbyh202vm8a5i5r-directory-1.3.1.5.drv'...
building '/nix/store/1b54g6nv8rw0kq3i5xjpcbhy88jvdnbr-xml-1.3.14.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2.
setupCompilerEnvironmentPhase
Build with /nix/store/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2.
unpacking sources
unpacking source archive /nix/store/khjm3agcb1y91925r78h3chaq56w9fi7-6wsbrbb60dzbfqf62c6sskwcijc3arjj-directory
unpacking sources
unpacking source archive /nix/store/dnx7hpl7wz81r3av4l09pqqhdqi4qpg6-xml-1.3.14.tar.gz
source root is xml-1.3.14
source root is 6wsbrbb60dzbfqf62c6sskwcijc3arjj-directory
setting SOURCE_DATE_EPOCH to timestamp 1424727750 of file xml-1.3.14/xml.cabal
patching sources
patching sources
compileBuildDriverPhase
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-xml-1.3.14.drv-0/package.conf.d -j1 -threaded
setupCompileFlags: -package-db=/tmp/nix-build-directory-1.3.1.5.drv-0/package.conf.d -j1 -threaded
[1 of 1] Compiling Main ( Setup.hs, /tmp/nix-build-directory-1.3.1.5.drv-0/Main.o )
[1 of 1] Compiling Main ( Setup.hs, /tmp/nix-build-xml-1.3.14.drv-0/Main.o )
Linking Setup ...
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/v3yazy78gy6kkpvrcn3schm8lc8y5dgl-xml-1.3.14 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --docdir=/nix/store/zdzgar7mwysym9dbai87fann20pbw75n-xml-1.3.14-doc/share/doc --with-gcc=gcc --package-db=/tmp/nix-build-xml-1.3.14.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/v3yazy78gy6kkpvrcn3schm8lc8y5dgl-xml-1.3.14/lib/ghc-8.2.2/xml-1.3.14 --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --enable-tests --ghc-option=-split-sections
configuring
configureFlags: --verbose --prefix=/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --docdir=/nix/store/w0gkzrf5q6ng40vzyvdl5m8pvw9v9dxy-directory-1.3.1.5-doc/share/doc --with-gcc=gcc --package-db=/tmp/nix-build-directory-1.3.1.5.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5/lib/ghc-8.2.2/directory-1.3.1.5 --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --enable-tests --ghc-option=-split-sections
Configuring directory-1.3.1.5...
Warning: The 'build-type' is 'Configure' but there is no 'configure' script.
You probably need to run 'autoreconf -i' to generate it.
Configuring xml-1.3.14...
Dependency base >=3 && <5: using base-4.10.1.0
Dependency bytestring -any: using bytestring-0.10.8.2
Dependency text -any: using text-1.2.3.0
Dependency base >=4.5 && <4.12: using base-4.10.1.0
Dependency directory -any: using directory-1.3.1.5
Dependency filepath >=1.3 && <1.5: using filepath-1.4.2
Dependency time >=1.4 && <1.9: using time-1.8.0.2
Dependency unix >=2.5.1 && <2.8: using unix-2.7.2.2
Source component graph:
component lib
component test:test dependency lib
Configured component graph:
component directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK
include base-4.10.1.0
include time-1.8.0.2
include filepath-1.4.2-DyDAQ5oOwBVDvLxMoNLDxx
include unix-2.7.2.2
component directory-1.3.1.5-8aJ3UecsjNUIxs4bq1vU8T-test
include base-4.10.1.0
include directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK
include filepath-1.4.2-DyDAQ5oOwBVDvLxMoNLDxx
include time-1.8.0.2
include unix-2.7.2.2
Linked component graph:
unit directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK
include base-4.10.1.0
include time-1.8.0.2
include filepath-1.4.2-DyDAQ5oOwBVDvLxMoNLDxx
include unix-2.7.2.2
System.Directory=directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK:System.Directory,System.Directory.Internal=directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK:System.Directory.Internal,System.Directory.Internal.Prelude=directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK:System.Directory.Internal.Prelude
unit directory-1.3.1.5-8aJ3UecsjNUIxs4bq1vU8T-test
include base-4.10.1.0
include directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK
include filepath-1.4.2-DyDAQ5oOwBVDvLxMoNLDxx
include time-1.8.0.2
include unix-2.7.2.2
Ready component graph:
definite directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK
depends base-4.10.1.0
depends time-1.8.0.2
depends filepath-1.4.2-DyDAQ5oOwBVDvLxMoNLDxx
depends unix-2.7.2.2
definite directory-1.3.1.5-8aJ3UecsjNUIxs4bq1vU8T-test
depends base-4.10.1.0
depends directory-1.3.1.5-EFdDcGoPsV2JQnFPz1QOGK
depends filepath-1.4.2-DyDAQ5oOwBVDvLxMoNLDxx
depends time-1.8.0.2
depends unix-2.7.2.2
Using Cabal-2.0.1.0 compiled by ghc-8.2
Using compiler: ghc-8.2.2
Using install prefix:
/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5
Executables installed in:
/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5/bin
Libraries installed in:
/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5/lib/ghc-8.2.2/directory-1.3.1.5
Dynamic Libraries installed in:
/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5/lib/ghc-8.2.2/x86_64-linux-ghc-8.2.2
Private executables installed in:
/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5/libexec/x86_64-linux-ghc-8.2.2/directory-1.3.1.5
Data files installed in:
/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5/share/x86_64-linux-ghc-8.2.2/directory-1.3.1.5
Documentation installed in:
/nix/store/w0gkzrf5q6ng40vzyvdl5m8pvw9v9dxy-directory-1.3.1.5-doc/share/doc
Configuration files installed in:
/nix/store/59r1c7sfgph9j2xxsc1k3j6dwkm32ybk-directory-1.3.1.5/etc
No alex found
Using ar found on system at:
/nix/store/aplvnhqdm6s9wj9r0jh46r46wvh65j86-binutils-2.28.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 6.4.0 given by user at:
/nix/store/wriy1xis74fybcg3m1jnq5bd5myxvhm6-gcc-wrapper-6.4.0/bin/gcc
Using ghc version 8.2.2 found on system at:
/nix/store/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2/bin/ghc
Using ghc-pkg version 8.2.2 found on system at:
/nix/store/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.18.1 found on system at:
/nix/store/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2/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/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2/bin/hpc
Using hsc2hs version 0.68.2 found on system at:
/nix/store/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/yf0bs1q9ph388jms8xlgcd5vh99amjm4-hscolour-1.24.2/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/wriy1xis74fybcg3m1jnq5bd5myxvhm6-gcc-wrapper-6.4.0/bin/ld
No lhc found
No lhc-pkg found
No pkg-config found
Using runghc version 8.2.2 found on system at:
/nix/store/d57p5gzyld7b3y4irzv70bfa3d8xxwgx-ghc-8.2.2/bin/runghc
Using strip version 2.28 found on system at:
/nix/store/aplvnhqdm6s9wj9r0jh46r46wvh65j86-binutils-2.28.1/bin/strip
Using tar found on system at:
/nix/store/vvq16kzwgx9yhkf0fwwms5xzgg0rwdpl-gnutar-1.29/bin/tar
No uhc found
Setup: configure script not found.
builder for '/nix/store/lmpgkvswlkcgpcjdilbyh202vm8a5i5r-directory-1.3.1.5.drv' failed with exit code 1
cannot build derivation '/nix/store/dck8p81zlij9qksglaw8hkp11msrm426-hadrian-0.1.0.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/dck8p81zlij9qksglaw8hkp11msrm426-hadrian-0.1.0.0.drv' failed
Notice that the build fails for a library shipped with GHC. In shell.nix
it's included as localPackage
.
- *Workaround**
First, we need to run configurePhase
of the default Nix derivation for GHC HEAD:
cd ghc
nix-shell '<nixpkgs>' -A haskell.compiler.ghcHEAD
configurePhase
exit
Now we can cd
into ghc/hadrian
and proceed normally, the build won't fail.
The issue is that this step shouldn't be required, we must have a self-contained shell.nix
.
Trac metadata
Trac field | Value |
---|---|
Version | 8.6.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Build System (Hadrian) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |