Skip to content

Not enough detail in error messages from cabal-install bootstrap script #609

Closed
bos opened this Issue May 24, 2012 · 3 comments

3 participants

@bos
Haskell member
bos commented May 24, 2012

(Imported from Trac #616, reported by markstos on 2009-12-06)

I just tried to bootstrap cabal 0.6.2 and it failed like this:

"Building the cabal-install package failed"

Because the message lacks any detail, I am forced to give up at this point. I scrolled back through the output (which the failure message didn't even hint that I should do), and I all I saw were some "warnings". I didn't see any "fatal" or error messages.

The reason cabal fails may well have something to do with my environment (Ubuntu Karmic 9.10), but the bug is cabal here is that fails to provide a helpful diagnostic, stonewalling the troubleshooting process.

Here's my full ./bootstrap output:

$ sh ./bootstrap.sh
Checking installed packages for ghc-6.10.4...
parsec is already installed and the version is ok.
network is already installed and the version is ok.
Cabal is already installed and the version is ok.
HTTP-4000.0.4 will be downloaded and installed.
zlib-0.5.0.0 will be downloaded and installed.
Downloading HTTP-4000.0.4...
--2009-12-06 18:05:53--  http://hackage.haskell.org/packages/archive/HTTP/4000.0.4/HTTP-4000.0.4.tar.gz
Resolving hackage.haskell.org... 69.30.63.197
Connecting to hackage.haskell.org|69.30.63.197|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44063 (43K) [application/x-tar]
Saving to: `HTTP-4000.0.4.tar.gz'
100%[=====================================================================================================>] 44,063      97.5K/s   in 0.4s
2009-12-06 18:05:54 (97.5 KB/s) - `HTTP-4000.0.4.tar.gz' saved [44063/44063]
[1 of 1] Compiling Main             ( Setup.lhs, Setup.o )
Linking Setup ...
                                                                                                                                              Configuring HTTP-4000.0.4...
Preprocessing library HTTP-4000.0.4...
Building HTTP-4000.0.4...
[ 1 of 15] Compiling Network.HTTP.Utils ( Network/HTTP/Utils.hs, dist/build/Network/HTTP/Utils.o )
[ 2 of 15] Compiling Network.HTTP.MD5Aux ( Network/HTTP/MD5Aux.hs, dist/build/Network/HTTP/MD5Aux.o )
[ 3 of 15] Compiling Network.HTTP.MD5 ( Network/HTTP/MD5.hs, dist/build/Network/HTTP/MD5.o )
[ 4 of 15] Compiling Network.HTTP.Base64 ( Network/HTTP/Base64.hs, dist/build/Network/HTTP/Base64.o )
Network/HTTP/Base64.hs:184:0:
    Warning: Pattern match(es) are non-exhaustive
             In the definition of `int4_char3': Patterns not matched: [_]
Network/HTTP/Base64.hs:242:0:
    Warning: Pattern match(es) are non-exhaustive
             In the definition of `quadruplets': Patterns not matched: [_]
[ 5 of 15] Compiling Network.Stream   ( Network/Stream.hs, dist/build/Network/Stream.o )
[ 6 of 15] Compiling Network.HTTP.Headers ( Network/HTTP/Headers.hs, dist/build/Network/HTTP/Headers.o )
[ 7 of 15] Compiling Network.BufferType ( Network/BufferType.hs, dist/build/Network/BufferType.o )
[ 8 of 15] Compiling Network.HTTP.Base ( Network/HTTP/Base.hs, dist/build/Network/HTTP/Base.o )
Network/HTTP/Base.hs:75:0:
    Warning: Module `Control.Monad' is imported, but nothing from it is used,
               except perhaps instances visible in `Control.Monad'
             To suppress this warning, use: import Control.Monad()
[ 9 of 15] Compiling Network.StreamSocket ( Network/StreamSocket.hs, dist/build/Network/StreamSocket.o )
Network/StreamSocket.hs:54:9:
    Warning: orphan instance: instance Stream Socket
[10 of 15] Compiling Network.TCP      ( Network/TCP.hs, dist/build/Network/TCP.o )
[11 of 15] Compiling Network.StreamDebugger ( Network/StreamDebugger.hs, dist/build/Network/StreamDebugger.o )
[12 of 15] Compiling Network.HTTP.Stream ( Network/HTTP/Stream.hs, dist/build/Network/HTTP/Stream.o )
[13 of 15] Compiling Network.HTTP.HandleStream ( Network/HTTP/HandleStream.hs, dist/build/Network/HTTP/HandleStream.o )
Network/HTTP/HandleStream.hs:30:24:
    Warning: Imported from `Network.Stream' but not used:
               type constructor or class `ConnError'
[14 of 15] Compiling Network.HTTP     ( Network/HTTP.hs, dist/build/Network/HTTP.o )
[15 of 15] Compiling Network.Browser  ( Network/Browser.hs, dist/build/Network/Browser.o )
/usr/bin/ar: creating dist/build/libHSHTTP-4000.0.4.a
Installing library in /home/mark/.cabal/lib/HTTP-4000.0.4/ghc-6.10.4
Registering HTTP-4000.0.4...
Reading package info from "dist/installed-pkg-config" ... done.
Writing new package config file... done.
Downloading zlib-0.5.0.0...
--2009-12-06 18:07:32--  http://hackage.haskell.org/packages/archive/zlib/0.5.0.0/zlib-0.5.0.0.tar.gz
Resolving hackage.haskell.org... 69.30.63.197
Connecting to hackage.haskell.org|69.30.63.197|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 122533 (120K) [application/x-tar]
Saving to: `zlib-0.5.0.0.tar.gz'
100%[=====================================================================================================>] 122,533      183K/s   in 0.7s
2009-12-06 18:07:33 (183 KB/s) - `zlib-0.5.0.0.tar.gz' saved [122533/122533]
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
Configuring zlib-0.5.0.0...
Preprocessing library zlib-0.5.0.0...
Building zlib-0.5.0.0...
[1 of 5] Compiling Codec.Compression.Zlib.Stream ( dist/build/Codec/Compression/Zlib/Stream.hs, dist/build/Codec/Compression/Zlib/Stream.o )
[2 of 5] Compiling Codec.Compression.Zlib.Internal ( Codec/Compression/Zlib/Internal.hs, dist/build/Codec/Compression/Zlib/Internal.o )
[3 of 5] Compiling Codec.Compression.Zlib.Raw ( Codec/Compression/Zlib/Raw.hs, dist/build/Codec/Compression/Zlib/Raw.o )
[4 of 5] Compiling Codec.Compression.Zlib ( Codec/Compression/Zlib.hs, dist/build/Codec/Compression/Zlib.o )
[5 of 5] Compiling Codec.Compression.GZip ( Codec/Compression/GZip.hs, dist/build/Codec/Compression/GZip.o )
/usr/bin/ar: creating dist/build/libHSzlib-0.5.0.0.a
Installing library in /home/mark/.cabal/lib/zlib-0.5.0.0/ghc-6.10.4
Registering zlib-0.5.0.0...
Reading package info from "dist/installed-pkg-config" ... done.
Writing new package config file... done.
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
Configuring cabal-install-0.6.2...
Preprocessing executables for cabal-install-0.6.2...
Building cabal-install-0.6.2...
[ 1 of 33] Compiling Distribution.Client.Check ( Distribution/Client/Check.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Check.o )
[ 2 of 33] Compiling Distribution.Client.BuildReports.Types ( Distribution/Client/BuildReports/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Types.o )
[ 3 of 33] Compiling Distribution.Client.Types ( Distribution/Client/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Types.o )
[ 4 of 33] Compiling Distribution.Client.Dependency.TopDown.Types ( Distribution/Client/Dependency/TopDown/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/TopDown/Types.o )
[ 5 of 33] Compiling Distribution.Client.Setup ( Distribution/Client/Setup.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Setup.o )
[ 6 of 33] Compiling Distribution.Client.Config ( Distribution/Client/Config.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Config.o )
[ 7 of 33] Compiling Distribution.Client.Win32SelfUpgrade ( Distribution/Client/Win32SelfUpgrade.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Win32SelfUpgrade.o )
[ 8 of 33] Compiling Paths_cabal_install ( dist/build/autogen/Paths_cabal_install.hs, dist/build/cabal/cabal-tmp/Paths_cabal_install.o )
[ 9 of 33] Compiling Distribution.Client.HttpUtils ( Distribution/Client/HttpUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/HttpUtils.o )
[10 of 33] Compiling Distribution.Compat.TempFile ( Distribution/Compat/TempFile.hs, dist/build/cabal/cabal-tmp/Distribution/Compat/TempFile.o )
[11 of 33] Compiling Distribution.Client.Utils ( Distribution/Client/Utils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Utils.o )
[12 of 33] Compiling Distribution.Client.Tar ( Distribution/Client/Tar.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Tar.o )
[13 of 33] Compiling Distribution.Client.IndexUtils ( Distribution/Client/IndexUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/IndexUtils.o )
[14 of 33] Compiling Distribution.Client.InstallPlan ( Distribution/Client/InstallPlan.hs, dist/build/cabal/cabal-tmp/Distribution/Client/InstallPlan.o )
[15 of 33] Compiling Distribution.Client.Dependency.Types ( Distribution/Client/Dependency/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Types.o )
[16 of 33] Compiling Distribution.Client.Dependency.Bogus ( Distribution/Client/Dependency/Bogus.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Bogus.o )
[17 of 33] Compiling Distribution.Client.InstallSymlink ( Distribution/Client/InstallSymlink.hs, dist/build/cabal/cabal-tmp/Distribution/Client/InstallSymlink.o )
[18 of 33] Compiling Distribution.Client.Dependency.TopDown.Constraints ( Distribution/Client/Dependency/TopDown/Constraints.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/TopDown/Constraints.o )
[19 of 33] Compiling Distribution.Client.Dependency.TopDown ( Distribution/Client/Dependency/TopDown.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/TopDown.o )
Distribution/Client/Dependency/TopDown.hs:37:55:
    Warning: Imported from `Distribution.Package' but not used:
               `notThisPackageVersion'
Distribution/Client/Dependency/TopDown.hs:555:0:
    Warning: Defined but not used: `addPackageExcludeConstraint'
[20 of 33] Compiling Distribution.Client.Dependency ( Distribution/Client/Dependency.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency.o )
[21 of 33] Compiling Distribution.Client.Fetch ( Distribution/Client/Fetch.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Fetch.o )
[22 of 33] Compiling Distribution.Client.Unpack ( Distribution/Client/Unpack.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Unpack.o )
[23 of 33] Compiling Distribution.Client.SrcDist ( Distribution/Client/SrcDist.hs, dist/build/cabal/cabal-tmp/Distribution/Client/SrcDist.o )
[24 of 33] Compiling Distribution.Client.BuildReports.Anonymous ( Distribution/Client/BuildReports/Anonymous.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Anonymous.o )
[25 of 33] Compiling Distribution.Client.BuildReports.Upload ( Distribution/Client/BuildReports/Upload.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Upload.o )
Distribution/Client/BuildReports/Upload.hs:63:6:
    Warning: Defined but not used: `response'
[26 of 33] Compiling Distribution.Client.Upload ( Distribution/Client/Upload.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Upload.o )
[27 of 33] Compiling Distribution.Client.BuildReports.Storage ( Distribution/Client/BuildReports/Storage.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Storage.o )
[28 of 33] Compiling Distribution.Client.Update ( Distribution/Client/Update.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Update.o )
[29 of 33] Compiling Distribution.Client.SetupWrapper ( Distribution/Client/SetupWrapper.hs, dist/build/cabal/cabal-tmp/Distribution/Client/SetupWrapper.o )
[30 of 33] Compiling Distribution.Client.Configure ( Distribution/Client/Configure.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Configure.o )
[31 of 33] Compiling Distribution.Client.Install ( Distribution/Client/Install.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Install.o )
[32 of 33] Compiling Distribution.Client.List ( Distribution/Client/List.hs, dist/build/cabal/cabal-tmp/Distribution/Client/List.o )
[33 of 33] Compiling Main             ( Main.hs, dist/build/cabal/cabal-tmp/Main.o )
Linking dist/build/cabal/cabal ...
Error during cabal-install bootstrap:
Building the cabal-install package failed
@bos
Haskell member
bos commented May 24, 2012

(Imported comment by @dcoutts on 2009-12-06)

The script does this:

  ./Setup build ${VERBOSE} \
|| die "Building the ${PKG} package failed"
And you're seeing:

Linking dist/build/cabal/cabal ...
Error during cabal-install bootstrap:
Building the cabal-install package failed
So there is no more detail available. My guess is that the linking failed. The usual reason for that is it using too much memory and the kernel killing the linker to free up memory. Are you working on a memory-constrained system?

@bos
Haskell member
bos commented May 24, 2012

(Imported comment by @kosmikus on 2009-12-08)

I'm not sure what could be done here to improve the amount of feedback.

@jsl
jsl commented Feb 24, 2015

Given that there is no activity since 2009, I propose closing. Please re-open or create a new issue if this still happens.

/cc @tibbe

@tibbe tibbe closed this Feb 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.