cabal, ghc-pkg, PATH
frederik at a5.repetae.net
Mon Aug 22 03:57:52 EDT 2005
On Sun, Aug 21, 2005 at 08:18:50PM -0700, Isaac Jones wrote:
> Frederik Eaton <frederik at a5.repetae.net> writes:
> > Hi,
> > Does cabal use the version of ghc and ghc-pkg from PATH? I have ones
> > which are locally installed, and sometimes it seems like cabal is
> > using the ones in /usr/bin/ instead. For instance, it is complaining
> > about packages which are only visible to the versions installed in
> > /usr/bin/. However, cabal wouldn't be messing up consistently since it
> > shows the correct 'ghc' path for compilations, when I run it with
> > '-v'.
> Check which version of ghc and ghc-pkg it discovers during the
> configure phase. Yes, it looks for it in PATH, or you can tell it
> where to find the executable. If it finds the correct
> /path/to/ghc-pkg, then use /path/to/ghc-pkg -l to see if the broken
> packages are visable to this ghc.
I'm guessing I should look in the .setup-config file? It looks correct
> When you compile it with -v, it'll show the path, as you say. Then
> you can look for the command its running and track down the error that
> way. If you get the error when you run the correct /path/to/ghc by
> hand, then I guess it's that ghc's package database that has the
> broken packages.
Hmm. Well, I've already gotten rid of the broken packages so it's
harder to debug, but at the time, I had already tried everything you
suggested. The package databases used by the ghc and ghc-pkg
executables in $PATH were OK, but when I tried to build, an error was
coming up which was related to a problem with /usr/bin/ghc's package
database, which should have been inaccessible.
Maybe it's a bug in ghc.
More information about the Libraries