Bug in Cabal creating user package.conf

Simon Marlow simonmar at microsoft.com
Tue May 3 07:32:28 EDT 2005


On 30 April 2005 09:06, Ashley Yakeley wrote:

> In article <87ekcsr9u0.fsf at syntaxpolice.org>,
>  Isaac Jones <ijones at syntaxpolice.org> wrote:
> 
>> Hmm.  How sure are you that it was cabal that created the
>> package.conf file?  This is the code that does so, and it definitely
>> seems to add a newline:
> 
> This is on Mac OS X, and it's definitely Setup.hs that's creating the
> file, and it definitely has just "[]".
> 
> Transcript (prompt reduced to "$ " for brevity):
> 
> $ cat Setup.hs
> import Distribution.Simple
> main = defaultMain
> $ rm -rf ~/.ghc
> $ runghc Setup.hs configure
> Warning: Package is copyright All Rights Reserved
> Warning: No license-file field.
> Configuring TimeLib-0.1...
> configure: searching for ghc in path.
> configure: found ghc at /usr/local/bin/ghc
> configure: looking for package tool: ghc-pkg near compiler in
> /usr/local/bin/ghc
> configure: found package tool in /usr/local/bin/ghc-pkg
> configure: Using install prefix: /usr/local
> configure: Using compiler: /usr/local/bin/ghc
> configure: Compiler flavor: GHC
> configure: Compiler version: 6.4
> configure: Using package tool: /usr/local/bin/ghc-pkg
> configure: Using haddock: /usr/local/bin/haddock
> configure: Using happy: /usr/local/bin/happy
> configure: Using alex: /usr/local/bin/alex
> configure: Using hsc2hs: /usr/local/bin/hsc2hs
> configure: No cpphs found
> configure: Reading installed packages...
> cannot parse package list
> $ cat ~/.ghc/powerpc-darwin-6.4/package.conf
> []$ uname -a
> Darwin Avebury.local 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22
> 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC  Power
> Macintosh powerpc
> $ ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.4
> $ ls -Al ~/.ghc/powerpc-darwin-6.4/package.conf
> -rw-r--r--    1 ashley   ashley          2 Apr 30 00:57
> /Users/ashley/.ghc/powerpc-darwin-6.4/package.conf

It's not a newline issue, something else strange is going on here.  Your
local package.conf is being created by ghc-pkg (which is a little eager
to create it in 6.4; 6.4.1 will be better).

The parse error is coming from Cabal (Distribution.Simple.Configure)
which is having trouble parsing the list of packages from ghc-pkg list.
Could you post your output from "ghc-pkg list" after running the
configure step above?

Cheers,
	Simon 


More information about the Libraries mailing list