cabal use questions

Peter Gavin pgavin at gmail.com
Tue Sep 2 13:31:31 EDT 2008


minh thu wrote:
> Hi,
> 
> I've some questions related to Cabal.
> 
> The command "ghc-pkg list" reports two versions of
> Cabal : 1.2.4.0 and 1.4.0.2.
> 
> How do I get rid of the first one ?

You don't.  The first one is the one that came with GHC, probably.  The other 
I'm assuming you installed yourself.  If you try to remove the first one, I 
think GHC will probably break.

> 
> Also, I try to build a Cabal package of my own
> but configuring it doen't work :
> 
> $ runhaskell Setup.lhs configure
> Configuring ae-fast-0.1...
> Setup.lhs: At least the following dependencies are missing:
> GLUT -any, OpenGL -an
> 

Try:

$ runhaskell Setup.lhs configure --user

If you've installed the OpenGL and GLUT package with --user, any packages that 
use them will have to be configured with --user as well.

If you do ghc-pkg list, it will tell you which packages are installed just for 
your user, and which are installed globally.

> I have the OpenGL and GLUT packages (doing :m + them in ghci works).
> 
> I run the configure command in this directory :
> $ ls
> ae-fast.cabal  Graphics  LICENSE  Setup.lhs
> 
> $ cat ae-fast.cabal
> name:                ae-fast
> version:             0.1
> Cabal-Version:       >= 1.2
> synopsis:            Miscellaneous stuffs to easily try new ideas
> description:         Miscellaneous stuffs to easily try new ideas
> category:            Graphics
> license:             BSD3
> license-file:        LICENSE
> author:              Vo Minh Thu
> maintainer:        Vo Minh Thu
> build-type:          Simple
> 
> Library
>   Build-Depends:       base, OpenGL, GLUT
>   Exposed-Modules:     Graphics.AE.Fast.GLUT
> 

Your cabal file looks fine.

Pete

> What's wrong ?
> Thank you,
> Thu
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries



More information about the Libraries mailing list