Hi folks,

I've gotten some reports (see below) of issues with building
HDBC-postgresql on GHC 6.12.  Its Setup.hs file [1] is the culprit.  The
problem is that AnyVersion needs to be removed to work with Cabal in GHC
6.12.

But I still want to support older Cabal.

Following the directions in the Cabal manual, I tried:

#if MIN_VERSION_Cabal(1,8,0)
                         pgconfigProgram (withPrograms lbi)
#else
                         pgconfigProgram AnyVersion (withPrograms lbi)
#endif

While of course adding the needed bits to invoke CPP.  This didn't
resolve it; apparently Cabal doesn't define macros for use in Setup.hs,
only for use in the application.

There also seems to be no conditional for use in the .cabal file to
resolve this.

I could check the GHC version, but that doesn't necessarily correspond
to Cabal version.

Any ideas?

-- John

[1]
http://git.complete.org/hdbc-postgresql?a=blob;f=Setup.hs;h=0656cb41adc814de8542b6f28040e131ae86be3c;hb=HEAD
--- Begin Message ---
Hello John,

I don't know if you're aware but HDBC-postgresql is failing to build on 
hackage. I think this is because the requireProgram function used in Setup.hs 
has changed between cabal 1.6 and cabal 1.7 (the version parameter has been 
removed).

It seems to build fine if you simply remove the AnyVersion argument in Setup.hs 
line 39, apparently this is the only thing stopping it from building on cabal 
1.8/ghc 6.12, I haven't checked cabal 1.7/ghc 6.10. I don't know what changes 
to the versions in the cabal file should go with this, if just adding cabal >= 
1.7 is correct or not.

Will you be able to upload a fixed version to hackage in the near future? It 
would be handy for me so that my project's haddock docs appear there on hackage 
(my project is hssqlppp). It's not particularly urgent, so please don't rush on 
my account.

Thanks for all your great contributions on hackage, Real World Haskell and 
elsewhere,
Jake Wheat


--- End Message ---
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to