[Haskell-cafe] Cabal says "no installed version of base"

John Velman velman at cox.net
Wed Oct 28 10:33:57 EDT 2009


On Tue, Oct 27, 2009 at 09:28:39AM +0000, Duncan Coutts wrote:
> On Wed, 2009-10-21 at 16:05 -0700, John Velman wrote:
> > I'm on OS X Leopard 10.5.8, using ghc 6.10.4 from Haskell Platform.
> > 
> > I'm trying to get a static .a library, callable from C, that I can use in
> > an OS X Cocoa program.  I've tried a very simple case (the one in Haskell
> > Wiki Tutorials,"calling haskell from C") I've managed to make a Mac Cocoa
> > application by adding the ghc generated .o program, plus adding one by one
> > the needed Haskell libraries for "symbol not found" to my Xcode project.
> > There should be a better way.
> > 
> > I've tried just about everything I could find on creating Haskell
> > libraries, with no joy.  My latest try is to use Cabal, following advice
> > found both in "How to write a Haskell program" and the Cabal users guide.
> > 
> > My output from cabal -v configure tells me, among others:
> 
> Is that the full command you ran? No other flags or arguments? I'm
> assuming you're using cabal-install version 0.6.2.
> 

I checked results that I kept, and that was the full command.  As I recall,
ghc-pkg didn't report any problem, but I don't recall whether or not it
listed in {}'s.

After posting this message, (and waiting for a while), I tinkered
considerably with my installation without any better results.  I then
uninstalled, and reinstalled Haskell Platform.

I then went back to documenting what I actually did to get a working Cocoa
with Haskell function program running.

I'll try to redo the cabal version of library creation carefully, and check
the things you mention below, after I finish my documentation of my Cocoa
with Haskell test case.

Thanks,

John V.


> According to the source it only produces that error in response to a top
> level constraint passed on the command line. It internally adds such a
> dependency, to make sure the solver never tries to pick a version of
> base from hackage. The problem could be that your base package is broken
> (missing dependencies) and thus the constraint on an installed base
> cannot be satisfied.
> 
> When you run ghc-pkg list base, does it list it in {}'s? Does ghc-pkg
> check report any problems?
> 
> Duncan


More information about the Haskell-Cafe mailing list