GHC build error: cannot satisfy -package ghc-7.1.20110217

William Knop william.knop.nospam at
Fri Feb 25 01:24:33 CET 2011

Hi all,

I'm building GHC HEAD, and I've encountered the following error a couple

"/usr/bin/ghc" -M -dep-makefile ghc/stage1/build/.depend.haskell.tmp
>  -include-pkg-deps -H32m -O -package-conf libraries/bootstrapping.conf
> -hide-all-packages -i -ighc/. -ighc/stage1/build -ighc/stage1/build/autogen
> -Ighc/stage1/build -Ighc/stage1/build/autogen -optP-include
> -optPghc/stage1/build/autogen/cabal_macros.h -package array- -package
> base- -package bytestring- -package directory-
> -package filepath- -package ghc-7.1.20110217 -package process-
> -package unix- -Wall -XHaskell98 -XNondecreasingIndentation -XCPP
> -XPatternGuards -no-user-package-conf -rtsopts -odir ghc/stage1/build -hidir
> ghc/stage1/build -stubdir ghc/stage1/build -hisuf hi -osuf o -hcsuf hc
>  ghc/./Main.hs

<command line>: cannot satisfy -package ghc-7.1.20110217:

    ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4 is unusable due to
> missing or recursive dependencies:

> bin-package-db-
> hoopl-
> hpc-

    (use -v for more information)

make[1]: *** [ghc/stage1/build/.depend.haskell] Error 1

make: *** [all] Error 2

The last time I saw this, I realized that `make clean` and even `make
maintainer-clean` failed to remove the old .hs and .o files in ./libraries.
I ran `find ./libraries | grep "\.hi$\|\.o$" | xargs -n 1 rm` which cleaned
things up nicely. Then I had to fiddle around with `ghc-pkg` and
unfortunately I don't remember exactly what I did, but everything built

This time, the error persists and I'm getting nowhere messing with `ghc-pkg`
or manual builds of the offending libraries. It's odd that the dependencies
are all shown, although ghc-7.1.20110217 is highlighted in blue (not sure
what that means):

$ ghc-pkg list -v

using cache:
> /Users/wknop/.ghc/x86_64-darwin-7.1.20110217/package.conf.d/package.cache

using cache:
> /Library/Frameworks/GHC.framework/Versions/7.1.20110217-x86_64/usr/lib/ghc-7.1.20110217/package.conf.d/package.cache


   Cabal-1.11.0 (Cabal-1.11.0-94afda515f19c403e7bc1e64b05e7f80)

   array- (array-

   base- (base-

> (bin-package-db-

   binary- (binary-

> (bytestring-

   containers- (containers-

   directory- (directory-

> (extensible-exceptions-

   ffi-1.0 (builtin_ffi)

   filepath- (filepath-

   ghc-7.1.20110217 (ghc-7.1.20110217-b77087559342dd20dfcfb258ea8804c4)

   ghc-prim- (ghc-prim-

> (haskell2010-

   haskell98- (haskell98-

   hoopl- (hoopl-

   hpc- (hpc-

> (integer-gmp-

   old-locale- (old-locale-

   old-time- (old-time-

   pretty- (pretty-

   process- (process-

   random- (random-

   rts-1.0 (builtin_rts)

> (template-haskell-

   time- (time-

   unix- (unix-


   HUnit- (HUnit-

   QuickCheck- (QuickCheck-

> (ansi-terminal-0.5.5-572a1d0154fb2632bb4e9431adf0cdb1)

> (ansi-wl-pprint-0.6.3-875ef2078f6bfbf85f537bf474d4db67)

   hostname-1.0 (hostname-1.0-fd008e4cbc7e53cd089e95782cd47a3a)

   mtl- (mtl-

   regex-base-0.93.2 (regex-base-0.93.2-f611e499723a1c17ae67e04fe4ce3d1e)

   regex-posix-0.94.4 (regex-posix-0.94.4-9e243c82c4410fcdd8b9c4a9f579cd23)

> (test-framework-0.3.3-2e089ba99de1028033d51a65ef26cced)

> (test-framework-hunit-0.2.6-cd25c078816dfb54dc08cf64d24bcea2)

> (test-framework-quickcheck2-0.2.9-0063f8833c46c25ff4d6bb13461990f8)

> (transformers-

   xml-1.3.7 (xml-1.3.7-eb24b369ce1c655abc9947262d56223e)

The other notable thing is that the versions of the installed packages
matches the packages I am building with GHC. I initially thought that it
would be a good thing, however now I'm thinking that it's leading to some
kind of conflict between the build system and the bootstrap system.

In the past I've noticed that cabal does not deal well with different
versions of GHC, particularly that it doesn't keep track which version of
GHC is used to build and register a package (and the .cabal user directory
doesn't have separate subdirectories for different cabal versions). This is
quite annoying, since it means one can't really have test installs of GHC
without fiddling around with prefixes or sandbox construction. Anyway, I
wouldn't be surprised if conflicts from that sort of thing could cause the
issue I'm having.

So I suppose the question now is, what is the actual cause and should it be
fixed in GHC's build system or in cabal's source?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list