help with cabal; trying to escape from configuration hell

I am trying to run happstack on my Mac, but unfortunately I am getting error messages as described in: http://code.google.com/p/happstack/issues/detail?id=88 The cure seems to be to downgrade to network-2.2.0.1, but unfortunately my installed cabal depends on network-2.2.1.4. I tried to re-install happstack using: cabal install happstack --reinstall --constraint="network==2.2.0.2" but unfortunately the ghc happily reports to link against network-2.2.1.4: ... Loading package parsec-2.1.0.1 ... linking ... done. Loading package hsemail-1.3 ... linking ... done. Loading package network-2.2.1.4 ... linking ... done. Loading package SMTPClient-1.0.1 ... linking ... done. Loading package time-1.1.4 ... linking ... done. ... Can someone rescue me? Doaitse

S. Doaitse Swierstra wrote:
I am trying to run happstack on my Mac, but unfortunately I am getting error messages as described in:
http://code.google.com/p/happstack/issues/detail?id=88
The cure seems to be to downgrade to network-2.2.0.1, but unfortunately my installed cabal depends on network-2.2.1.4.
There's a better cure if you're willing to modify & build Happstack. Gregory Collins describes it in this message: http://groups.google.com/group/HAppS/msg/0c9a0d0fd7c6aff0 It needs to be applied in the following file: happstack-server/src/Happstack/Server/HTTP/Socket.hs Replace the definition of acceptLite with the one in the above email, and rebuild happstack-server. The problem seems to be that on OS X, the Template Haskell code to detect at compile time whether IPv6 support is available is failing and causing the wrong code to get compiled in. Anton

On Tue, 2009-09-22 at 17:13 +0200, S. Doaitse Swierstra wrote:
I am trying to run happstack on my Mac, but unfortunately I am getting error messages as described in:
http://code.google.com/p/happstack/issues/detail?id=88
The cure seems to be to downgrade to network-2.2.0.1, but unfortunately my installed cabal depends on network-2.2.1.4.
I tried to re-install happstack using:
cabal install happstack --reinstall --constraint="network==2.2.0.2"
but unfortunately the ghc happily reports to link against network-2.2.1.4:
... Loading package parsec-2.1.0.1 ... linking ... done. Loading package hsemail-1.3 ... linking ... done. Loading package network-2.2.1.4 ... linking ... done. Loading package SMTPClient-1.0.1 ... linking ... done. Loading package time-1.1.4 ... linking ... done. ...
Can someone rescue me?
Is that log output from when you are compiling happstack itself (and that snippet is the template haskell code being loaded) or is it when you are loading the final built package in ghci? If it's the TH bit then it appears to be an instance of this bug: http://hackage.haskell.org/trac/ghc/ticket/2555 The problem appears to be that while we compile happstack against network-2.2.0.2, when it comes to the template haskell stuff, it goes and picks up the latest version of network instead. GHC HQ have not been able to reproduce this so it would be useful if we could have more details on what you are finding. In particular a full log of this command would be useful: $ cabal install happstack -v --reinstall --constraint="network==2.2.0.2" Note the -v so that we will see how cabal invokes ghc. Attach the log to the ghc ticket above. Once you've saved the evidence, the workaround is to unregister the later network version, then ghc cannot possibly pick it. Duncan
participants (3)
-
Anton van Straaten
-
Duncan Coutts
-
S. Doaitse Swierstra