How to solve ghc-stage2: mkTextEncoding: invalid argument (Invalid argument) issue.

Karel Gardas karel.gardas at
Tue Sep 15 10:56:01 EDT 2009


recently I've found out that my solaris-based GHC buildbot is completely
unusable since it always (when it get to, which means it does not fail
with usual magic number mismatch: old/corrupt interface file?) fails with:

"inplace/bin/ghc-stage2"   -H32m -O -DNEW_GHC_LAYOUT
-hide-all-packages -i -iutils/haddock/src -iutils/haddock/dist/build
-iutils/haddock/dist/build/autogen -Iutils/haddock/dist/build
-Iutils/haddock/dist/build/autogen    -optP-DIN_GHC_TREE -optP-include
-optPutils/haddock/dist/build/autogen/cabal_macros.h -package
Cabal-1.7.4 -package array- -package base- -package
containers- -package directory- -package filepath-
-package ghc-6.11.20090915 -package pretty-
-funbox-strict-fields -O2 -Wall -XForeignFunctionInterface -XCPP
-XPatternGuards -XDeriveDataTypeable -XScopedTypeVariables -XMagicHash
   -odir utils/haddock/dist/build -hidir utils/haddock/dist/build
-stubdir utils/haddock/dist/build -hisuf hi -osuf  o -hcsuf hc -c
utils/haddock/src/Haddock/GhcUtils.hs -o
ghc-stage2: mkTextEncoding: invalid argument (Invalid argument)
make[1]: *** [utils/haddock/dist/build/Haddock/GhcUtils.o] Error 1
make: *** [all] Error 2

I've even tried to update my building GHC from 6.8.3 to 6.10.4, but it
still does not help.

Since I would really like to resurrect my GHC buildbot, do you have any
idea how to fix this issue?

PS: for reference, please have a look at

More information about the Glasgow-haskell-users mailing list