[Haskell-cafe] cabal-install failure

Gwern Branwen gwern0 at gmail.com
Fri Jun 13 22:10:52 EDT 2008


On 2008.06.13 22:22:06 +0100, Duncan Coutts <duncan.coutts at worc.ox.ac.uk> scribbled 2.1K characters:
>
> On Fri, 2008-06-13 at 11:19 -0400, Darrin Thompson wrote:
> > Cabal-install is looking good. It now, for the record, has only two
> > deps outside of Cabal-1.4.
> >
> > I installed cabal-install-0.5 on ubuntu with the haskell.org linux
> > binary for ghc 6.8.2.
> >
> > I then tried cabal-install yi
> >
> > Got this output:
> > ... many successful installs ...
> > Registering vty-3.0.1...
> > Reading package info from "dist/installed-pkg-config" ... done.
> > Saving old package config file... done.
> > Writing new package config file... done.
> > Downloading yi-0.3...
> > [1 of 1] Compiling Main             ( Setup.hs, dist/setup/Main.o )
> >
> > Setup.hs:9:0:
> >     Warning: Deprecated use of `showPackageId'
> >              (imported from Distribution.Simple, but defined in
> > Distribution.Package):
> >              use the Text class instead
> > Linking dist/setup/setup ...
> > Warning: defaultUserHooks in Setup script is deprecated.
> > Configuring yi-0.3...
> > Warning: Instead of 'ghc-options: -DDYNAMIC -DFRONTEND_VTY' use 'cpp-options:
> > -DDYNAMIC -DFRONTEND_VTY'
> > setup: alex version >=2.0.1 && <3 is required but it could not be found.
> > cabal: Error: some packages failed to install:
> > yi-0.3 failed during the configure step. The exception was:
> > exit: ExitFailure 1
> >
> > Is this a cabal problem of package problem? I would have expected it
> > to fail immediately instead of discover this problem so far into
> > process.
>
> So it's failing when configuring yi because alex is not installed.
>
> So the question is when should this get checked? I think it's not
> unreasonable to have the check where it is now though perhaps we could
> do better by bringing it forward.
>
> The point is, cabal-install only checks that haskell packages are
> available before beginning to install stuff. It leaves all the other
> checks (build tools, C libs, custom checks in Setup.hs script etc) to be
> done at the configure phase of each package.
>
> In theory it's not impossible to imagine doing the configure phase of
> every package before doing the build phase of any package but it's not
> clear that it gains us that much and it's a bit more complex to do it
> that way.
>
> Duncan

I think this may be Cabal's fault anyway. The yi.cabal includes the line:
         build-tools:   alex >= 2.0.1 && < 3

in the 'executable yi' section, right after the build-depends, so Yi is being straightforward and upfront about its needs. Now, Cabal is obviously checking that the build-depends is satisfied first, but why isn't it checking that alex is available when it has the information it needs to check, presumably anything in build-tools is *required*, and the field name suggests that it would be checked?

--
gwern
watchers 5.0i Fax UXO NORAD Consulting meta Gatt of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080613/b4cc70b5/attachment.bin


More information about the Haskell-Cafe mailing list