4

When I try to install the "encoding" library, I get this failure, but I can't find any documentation to tell me what it means:

$ sudo cabal install encoding --global
Resolving dependencies...
cabal: Error: some packages failed to install:
encoding-0.6.6 failed during the configure step. The exception was:
ExitFailure 127

EDIT: With verbose logging, I have:

$ cabal install encoding --global -v
Reading available packages...
Resolving dependencies...
In order, the following would be installed:
encoding-0.6.6 (new package)
Extracting
/home/aditya/.cabal/packages/hackage.haskell.org/encoding/0.6.6/encoding-0.6.6.tar.gz
to /tmp/encoding-0.6.610687...
creating /tmp/encoding-0.6.610687/encoding-0.6.6/dist/setup
/tmp/encoding-0.6.610687/encoding-0.6.6/dist/setup/setup configure --verbose=2
--ghc --global --flags=newghc --flags=splitbase --constraint=HaXml ==1.22.5
--constraint=array ==0.3.0.2 --constraint=base ==4.3.1.0 --constraint=binary
==0.5.1.0 --constraint=bytestring ==0.9.1.10 --constraint=containers ==0.4.0.0
--constraint=extensible-exceptions ==0.1.1.2 --constraint=ghc ==7.0.3
--constraint=ghc-prim ==0.2.0.0 --constraint=mtl ==2.0.1.0
--constraint=regex-compat ==0.93.1
World file is already up to date.
cabal: Error: some packages failed to install:
encoding-0.6.6 failed during the configure step. The exception was:
ExitFailure 127

This still doesn't seem to tell me what C library dependency could be missing.

donatello
  • 5,727
  • 6
  • 32
  • 56

1 Answers1

3

This typically means that C libraries were missing, that were required by the package (or one of its dependencies).

Turning on verbose logging should help.

$ cabal install encoding -v
Don Stewart
  • 137,316
  • 36
  • 365
  • 468
  • Alternatively, you can just trying scrolling up to where cabal was trying to build the encoding-0.6.6 package, as it says in the cabal FAQ. – rotskoff Apr 18 '12 at 01:28
  • I'ved edited my post to include information in verbose logging. It still does not seem to say what C lib is missing. – donatello Apr 18 '12 at 03:10
  • 1
    It seems that package encoding-0.6.6 has invalid archive on hackage - it contains "dist" folder with build artifacts. If you download older version and run cabal configure (or delete "dist") you will see compilation error. – Paul Graphov Apr 18 '12 at 09:38
  • I am going to mark this answer as right, even though @PaulGraphov's hint solved it for me. – donatello May 02 '12 at 20:51