Closed centromere closed 8 years ago
[82 of 91] Compiling Rules.Cabal ( /tmp/foo/ghc/shake-build/src/Rules/Cabal.hs, /tmp/foo/ghc/shake-build/.shake/Rules/Cabal.o ) [Distribution.Verbosity changed]
[90 of 91] Compiling Rules ( /tmp/foo/ghc/shake-build/src/Rules.hs, /tmp/foo/ghc/shake-build/.shake/Rules.o ) [Rules.Cabal changed]
[91 of 91] Compiling Main ( /tmp/foo/ghc/shake-build/src/Main.hs, /tmp/foo/ghc/shake-build/.shake/Main.o ) [Rules changed]
@centromere Do I understand correctly that you are working on the Cabal package? (guessing from Distribution.Verbosity changed
).
Also, the previous build must have been unsuccessful, since Cabal
is not listed by ghc-pkg list
.
It's very hard for me to understand what's going on. Can you do a build clean
and try to build again?
I am not working on the Cabal package. I am only testing the build system. Just now I started from a clean build:
/---------------------------------------------------------------------\
| Successfully built program 'mkUserGuidePart' (Stage2). |
| Executable: inplace/bin/mkUserGuidePart |
| Program synopsis: Generate various portions of GHC's documentation. |
\---------------------------------------------------------------------/
/--------------------------------------------------\
| Run GhcCabal (stage = Stage2, package = ghctags) |
| input: utils/ghctags/ghctags.cabal |
| => output: utils/ghctags/stage2/package-data.mk |
\--------------------------------------------------/
Configuring ghctags-0.1...
ghc-cabal: At least the following dependencies are missing:
Cabal >=1.22 && <1.24
shakeArgsWith 0.000s 0%
Function shake 0.144s 0%
Database read 0.000s 0%
With database 0.000s 0%
Running rules 2085.326s 99% =========================
Total 2085.471s 100%
Error when running Shake build system:
* inplace/bin/ghctags
* OracleQ (PackageDataKey (".build/stage2/utils/ghctags/package-data.mk",".build_stage2_utils_ghctags_C_SRCS"))
* .build/stage2/utils/ghctags/package-data.mk
* .build/stage2/utils/ghctags/package-data.mk utils/ghctags/stage2/package-data.mk
user error (Development.Shake.cmd, system command failed
Command: inplace/bin/ghc-cabal configure utils/ghctags stage2 --with-ghc=/tmp/foo/ghc/inplace/bin/ghc-stage2 --with-ghc-pkg=/tmp/foo/ghc/inplace/bin/ghc-pkg --enable-library-vanilla --enable-library-for-ghci --disable-library-profiling --disable-shared --configure-option=CFLAGS=-fno-stack-protector --configure-option=CPPFLAGS=-Iincludes -Iincludes/dist-derivedconstants/header --gcc-options=-fno-stack-protector --configure-option=--with-cc=/usr/bin/gcc --with-gcc=/usr/bin/gcc --with-ld=/usr/bin/ld --with-ar=/usr/bin/ar --with-alex=/opt/alex/3.1.4/bin/alex --with-happy=/opt/happy/1.19.5/bin/happy
Exit code: 1
Stderr:
ghc-cabal: At least the following dependencies are missing:
Cabal >=1.22 && <1.24
)
NB: I'm using --flavour=quick
This is very strange, I have no idea how the build system could reach stage2 without having built the Cabal library first. It did build inplace/bin/ghc-stage2
somehow -- but that requires Cabal library too!
What happens if you explicitly ask it to build the Cabal library?
build.sh --flavour=quick .build/stage1/libraries/Cabal/Cabal/libHSCabal-1.23.1.0.a
Perhaps, the library is built, but ghc-pkg
failed to register it?
NB: I'm using --flavour=quick
That should be fine.
To test that ghc-pkg
registration works as expected, you could also try the following:
build.sh --flavour=quick inplace/lib/package.conf.d/Cabal-1.23.1.0.conf
/--------------------------------------------------------------------\
| Successfully built library 'Cabal' (Stage1, way v). |
| Library: .build/stage1/libraries/Cabal/Cabal/libHSCabal-1.23.1.0.a |
| Library synopsis: A framework for packaging Haskell software. |
\--------------------------------------------------------------------/
shakeArgsWith 0.000s 0%
Function shake 0.147s 0%
Database read 0.472s 0%
With database 0.023s 0%
Running rules 143.143s 99% =========================
Pool finished (3431 threads, 1 max) 0.000s 0%
Lint checking 0.059s 0%
Total 143.844s 100%
Build completed in 2:24m
After restarting, the build finishes successfully.
@centromere Thanks! So, the conclusion seems to be: the Cabal library was deleted after stage2 GHC got built, but before ghctags. I will try to reproduce tomorrow. This looks like a missing dependency somewhere.
This was performed in a stock ubuntu:16.04
docker container.
I have difficulties reproducing this exact problem, but discovered a serious bug in the process: #216.
@centromere Can you reproduce the problem? If yes, could you provide the exact steps?
@snowleopard Try doing the following:
docker run -it ubuntu:16.04 /bin/bash
echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286
apt-get update
apt-get install -y --no-install-recommends git autoconf g++ file ncurses-dev bzip2 make cabal-install-1.22 ghc-7.10.3 happy-1.19.5 alex-3.1.4
export PATH=/root/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.4/bin:$PATH
cabal update
cabal install --global ansi-terminal mtl shake QuickCheck
git clone --recursive git://git.haskell.org/ghc.git
cd ghc
git clone git://github.com/snowleopard/shaking-up-ghc shake-build
./boot
./configure
./shake-build/build.sh --flavour=quick
root@1bd30ea47f29:/ghc# git submodule status --recursive
85ece0f8653e7b1e7de6024d372cfeaf36ab5fa9 .arc-linters/arcanist-external-json-linter (heads/master)
ec37a68838566cb830c33cb30bfade003a306cff libffi-tarballs (remotes/origin/libffi-3.2.1)
ecdf65a3c1e01b798e9d073258a6d1c8ff63a6d8 libraries/Cabal (Cabal-1.22.0.0-release-840-gecdf65a)
fec966e6d77a5e7f4a586de6096954137a1fe914 libraries/Win32 (Win32-2.3.1.0-release-1-gfec966e)
6551ad9edaca1634a8149ad9c27a72feb456d4e1 libraries/array (v0.5.1.0-9-g6551ad9)
2afc452571f8176af84c01e47da91ee371bbefbd libraries/binary (0.8.2.0)
84d041649c39e7dc0fe8d348da10d6ed1679a8f9 libraries/bytestring (0.10.6.0-38-g84d0416)
aa982fb83f2561d3b27b89b46d36ffca21e072cc libraries/containers (v0.5.7.1-13-gaa982fb)
40d4db0a4e81a07ecd0f1bc77b8772088e75e478 libraries/deepseq (v1.4.1.1-15-g40d4db0)
33ce1ca6bef97b60957e4763b046eac9a982ead0 libraries/directory (v1.2.5.1)
33eb2fb7e178c18f2afd0d537d791d021ff75231 libraries/dph (2009-06-25-1149-g33eb2fb)
f510e50feefe9995334769dd5e26c79edbe6fdc1 libraries/filepath (v1.4.1.0)
5e53651b2683f31bf5efc842c33f07afc05ec287 libraries/haskeline (0.7.2.2-7-g5e53651)
b4477e825a93373124ec5cf29b9850df9608f5bd libraries/hoopl (v3.10.2.1)
17c3771e42e64ecda8970e8d6bea5c7e7fe1a4d6 libraries/hpc (v0.6.0.2-14-g17c3771)
ec04d059b13fc348789d87adfbabb9351f8574db libraries/parallel (v3.2.0.6-13-gec04d05)
9fd5f2b596bdfbce0414f973009b579d5d2430fa libraries/pretty (pretty-1.1.3.2-release)
1af89788d5c9ab7a0a93ff6764e1770e6c80d957 libraries/primitive (primitive-0.5.2.1-release-58-g1af8978)
296cbce6294316d6534b4449fc7ab0f0d3f5775b libraries/process (v1.4.1.0-9-g296cbce)
c72dd0a01ae6255bead2d4fad33f002bb5684030 libraries/random (v1.1-9-gc72dd0a)
ee756000fc654a105ff3f8a319b904f2df33c65b libraries/stm (v2.4.4.1-4-gee75600)
140ca44db6fc734cfc0388e82f9e5270f31475d8 libraries/terminfo (0.4.0.2)
a73564c366b15f7057b614188662d7b7a8eaab19 libraries/time (time-1.6-release-6-ga73564c)
10348c4bbf60debbfc82463e1035aca1cb7b51bc libraries/transformers (0_5_2_0)
861ad256e0a5337a1a685b1cd50ae91ee9374cab libraries/unix (v2.7.1.0-52-g861ad25)
6c17dd6fadc5e7e3e09f7892380ce1339f296efd libraries/vector (0_7-245-g6c17dd6)
fb9e0bbb69e15873682a9f25d39652099a3ccac1 libraries/xhtml (3000.2.1)
a5995850221d2808cf3f71965f0e8df0f2908ca1 nofib (2009-06-25-233-ga599585)
ab954263a793d8ced734459d6194a5d89214b66c utils/haddock (haddock-2.16.1-release-473-gab95426)
d9c13cb8f5be89a030783d758fcf7c077351c6a9 utils/hsc2hs (2009-06-25-94-gd9c13cb)
I'm closing this, as I couldn't reproduce the issue. The build system has changed quite a bit, so this could be no longer relevant. Feel free to reopen if the issue reoccurs.