Alex install failure

Simon Peyton Jones simonpj at
Fri Aug 18 10:25:52 UTC 2017

I'm trying to update my installation of alex, on Unix (Ubuntu).  But I get the dump below
It's complaining about a lock file being an invalid argument (see highlight below).
If I manually remove the file I get past that, it successfully installs tf-random, but the same thing happens on the next package.  So I can install packages one at a time, but that's silly.
Any ideas?

cabal install alex

Resolving dependencies...

Configuring tf-random-0.5...

Building tf-random-0.5...

Failed to install tf-random-0.5

Build log ( /home/simonpj/.cabal/logs/tf-random-0.5.log ):

cabal: Entering directory '/tcabal mp/cabal-tmp-26141/tf-random-0.5'

Configuring tf-random-0.5...

Building tf-random-0.5...

Preprocessing library tf-random-0.5...

[1 of 4] Compiling System.Random.TF.Gen ( src/System/Random/TF/Gen.hs, dist/build/System/Random/TF/Gen.o )

[2 of 4] Compiling System.Random.TF.Init ( src/System/Random/TF/Init.hs, dist/build/System/Random/TF/Init.o )

src/System/Random/TF/Init.hs:94:5: warning: [-Wdeprecations]

    In the use of 'bitSize' (imported from Data.Bits):

    Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead"


94 |   | bitSize n > 64 = error "mkTFGen: case where size of Int > 64 not implemented"

   |     ^^^^^^^

[3 of 4] Compiling System.Random.TF ( src/System/Random/TF.hs, dist/build/System/Random/TF.o )

[4 of 4] Compiling System.Random.TF.Instances ( src/System/Random/TF/Instances.hs, dist/build/System/Random/TF/Instances.o )

Creating package registration file:


Installing library in


Registering tf-random-0.5...

cabal: '/usr/local/bin/ghc-pkg' exited with an error:

ghc-pkg: Couldn't open database

/home/simonpj/.ghc/x86_64-linux-8.2.1/package.conf.d for modification:



hLock: invalid argument (Bad file descriptor)

cabal: Leaving directory '/tmp/cabal-tmp-26141/tf-random-0.5'

cabal: Error: some packages failed to install:

QuickCheck- depends on tf-random-0.5 which failed to install.

alex-3.2.1 depends on tf-random-0.5 which failed to install.

tf-random-0.5 failed during the final install step. The exception was:

ExitFailure 1

simonpj at cam-05-unx:~/code/HEAD$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list