[Haskell-cafe] difficulty building (some) TH packages with ghc-7.4.1

John Lato jwlato at gmail.com
Mon Mar 26 12:36:12 CEST 2012


I've run into an odd problem when building certain packages that use
Template Haskell with GHC-7.4.1.  For example, RepLib:

$ cabal --version
cabal-install version 0.13.3
using version 1.14.0 of the Cabal library

$ cabal install -O2 -w ~/.ghc-7.4.1/bin/ghc RepLib --reinstall
Resolving dependencies...
Configuring RepLib-0.5.2...
Building RepLib-0.5.2...
Preprocessing library RepLib-0.5.2...
[ 1 of 12] Compiling Generics.RepLib.R ( Generics/RepLib/R.hs,
dist/build/Generics/RepLib/R.o )
[ 2 of 12] Compiling Generics.RepLib.R1 ( Generics/RepLib/R1.hs,
dist/build/Generics/RepLib/R1.o )
[ 3 of 12] Compiling Generics.RepLib.Derive (
Generics/RepLib/Derive.hs, dist/build/Generics/RepLib/Derive.o )
[ 4 of 12] Compiling Generics.RepLib.PreludeReps (
dist/build/Generics/RepLib/PreludeReps.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package type-equality- ... linking ... done.
Loading package array- ... linking ... done.
Loading package deepseq- ... linking ... done.
Loading package containers- ... linking ... done.
Loading package pretty- ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package transformers- ... linking ... done.
Loading package mtl- ... linking ... done.
cabal: Error: some packages failed to install:
RepLib-0.5.2 failed during the building phase. The exception was:
ExitFailure 11

This is without library profiling enabled.  If I enable library
profiling, the unprofiled build is fine but the profiled build exits
with the same error, at the same location.

If I pass the "-v" argument to cabal-install, the package builds fine
with profiling disabled.  The "-v" flag makes no difference with
profiling enabled, although some packages (but not RepLib) work with

I haven't seen this with ghc-7.2.*, but I'm guessing this is some sort
of cabal-install bug.  Has anyone else witnessed anything like this?

John L.

More information about the Haskell-Cafe mailing list