[Haskell-cafe] build failure on Hackage

Roman Cheplyaka roma at ro-che.info
Sat Jul 13 23:05:35 CEST 2013

* Brian Lewis <brian at lorf.org> [2013-07-13 15:44:58-0500]
> On 2013.07.13, at 23:15, Roman Cheplyaka wrote:
> > 1. Why exactly does haddock fail?
> I think it never actually tries to build the Haddock docs for the actual
> package of interest because its dependencies failed to build.
> Here's the GLFW-b build log:
> http://hackage.haskell.org/packages/archive/GLFW-b/1.0.0/logs/failure/ghc-7.6
> ...
> Running Haddock for bindings-DSL-1.0.16...
> ...
> Running Haddock for th-lift-0.5.5...
> ...
> * Missing C library: Xxf86vm
> These messages are from the build of bindings-GLFW, a dependency of
> GLFW-b. Due to the missing library, bindings-GLFW's build fails. So
> GLFW-b's does too.
> I guess I think the build failure should be noted, but that Hackage
> should go on and build the docs anyway.

Ah, yes. This may be a bit more complicated than it seems, due to the
way Cabal works.

Let's say you've built the docs for this library. Now you have to
install it, so that its reverse dependencies can reference it.

Installation involves registering the package, so that Cabal can later
see which packages are installed. Here's the catch: package databases
are maintained by compilers, not by Cabal. In the common case this means
GHC. (Unfortunately, haddock is not a separate compiler, which would be
a more proper solution.) So we must register the package with GHC.

But then we cannot distinguish between real and docs-only packages.
Cabal and GHC would expect package to be installed, and would happily
attempt to build other packages against it, and fail miserably.


More information about the Haskell-Cafe mailing list