trying to cabal install lambdabot, failure on 'random' package

/usr/bin/ghc --make -package-name show-0.4.1.1 -hide-all-packages -fbuilding-cabal-package -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id QuickCheck-2.4.0.1-5898cfb0116fc1d6ecef04b3f053c323 -package-id base-4.3.1.0-167743fc0dd86f7f2a24843a933b9dce -package-id random-1.0.0.3-749b78c54a8a99991b32dbb45d98a91b -package-id smallcheck-0.4-008eb21a2943dfdde26401dbc145c45b -package-id syb-0.3-8db7bc4339a1cb8a6f2a46c40447ef0b -O -Wall -XHaskell98 ShowQ ShowFun SimpleReflect <command line>: cannot satisfy -package-id random-1.0.0.3-749b78c54a8a99991b32dbb45d98a91b: random-1.0.0.3-749b78c54a8a99991b32dbb45d98a91b is shadowed by package random-1.0.0.3-57524486875e0c4c260dd22788921013 (use -v for more information) World file is already up to date. cabal: Error: some packages failed to install: lambdabot-4.2.3.2 depends on show-0.4.1.1 which failed to install. lambdabot-utils-4.2.1 failed during the building phase. The exception was: ExitFailure 1 readline-1.0.1.0 failed during the configure step. The exception was: ExitFailure 1 show-0.4.1.1 failed during the building phase. The exception was: ExitFailure 1 I have ghc 7.0.,3 and cabal $ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library From the recent Haskell Platform for OS X. Ideas?

"show" is the failing package A look on Hackage suggests that "show" had problems with its cabal file at versions 0.4 & 0.4.1 and was fixed at 0.4.1.1. Can you try installing "show" individually at 0.4.1.1 the try installing the rest of lambdabot.

On May 7, 2011, at 12:41 AM, Stephen Tetley wrote:
"show" is the failing package
A look on Hackage suggests that "show" had problems with its cabal file at versions 0.4 & 0.4.1 and was fixed at 0.4.1.1.
Can you try installing "show" individually at 0.4.1.1 the try installing the rest of lambdabot.
$ cabal install show Resolving dependencies... Configuring show-0.4.1.1... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package haskell98-1.1.0.1 requires random-1.0.0.3 package QuickCheck-2.4.0.1 requires random-1.0.0.3 package show-0.4.1.1 requires random-1.0.0.3 package random-1.0.0.3 requires time-1.2.0.3 package random-1.0.0.3 requires time-1.2.0.4 Preprocessing library show-0.4.1.1... Building show-0.4.1.1... <command line>: cannot satisfy -package-id random-1.0.0.3-749b78c54a8a99991b32dbb45d98a91b: random-1.0.0.3-749b78c54a8a99991b32dbb45d98a91b is shadowed by package random-1.0.0.3-57524486875e0c4c260dd22788921013 (use -v for more information) cabal: Error: some packages failed to install: show-0.4.1.1 failed during the building phase. The exception was: ExitFailure 1

It looks like cabal-install is wanting to do wacky things to the GHC boot libraries, which means something is seriously astray. What happens when you run `ghc-pkg check` ?

On Sunday 08 May 2011 09:24:50, Sean Perry wrote:
package random-1.0.0.3 requires time-1.2.0.3 package random-1.0.0.3 requires time-1.2.0.4 Preprocessing library show-0.4.1.1... Building show-0.4.1.1... <command line>: cannot satisfy -package-id random-1.0.0.3-749b78c54a8a99991b32dbb45d98a91b: random-1.0.0.3-749b78c54a8a99991b32dbb45d98a91b is shadowed by package random-1.0.0.3-57524486875e0c4c260dd22788921013
You have two versions(?) of random-1.0.0.3, one in the global package-db, one in the user-db. The one in the user-db shadows the global, making it unusable. That's BAD. Having boot packages (random, process, directory, time, ...) in both, global and user db, tends to break stuff, check what's broken already with $ ghc-pkg check If too much is broken, delete your user-db and reinstall fresh, otherwise try unregistering the ones in the user-db shadowing stuff in the global db, in particular random-1.0.0.3, $ ghc-pkg unregister --user random-1.0.0.3 It will probably notify you that unregistering that will break a couple of other packages, the best would probably be to unregister those too and rebuild them against the global random.

On 11-05-08 03:24 AM, Sean Perry wrote:
package random-1.0.0.3 requires time-1.2.0.3 package random-1.0.0.3 requires time-1.2.0.4
In addition to unregistering --user random-1.0.0.3, also unregister --user time-1.2.0.4, the real culprit. The real culprit is why you are infected with a duplicate random-1.0.0.3. If you let time-1.2.0.4 live, the problem will just recur infinitely. See my http://www.vex.net/~trebla/haskell/sicp.xhtml for why this happens and what it costs you. And never "upgrade" packages piecemeal like this again.

On May 8, 2011, at 3:34 PM, Albert Y. C. Lai wrote:
On 11-05-08 03:24 AM, Sean Perry wrote:
package random-1.0.0.3 requires time-1.2.0.3 package random-1.0.0.3 requires time-1.2.0.4
In addition to unregistering --user random-1.0.0.3, also unregister --user time-1.2.0.4, the real culprit. The real culprit is why you are infected with a duplicate random-1.0.0.3. If you let time-1.2.0.4 live, the problem will just recur infinitely.
See my http://www.vex.net/~trebla/haskell/sicp.xhtml for why this happens and what it costs you. And never "upgrade" packages piecemeal like this again.
Thank you for the article. I went looking and had a 6. and two 7. releases of the haskell platform and a bunch of locally installed things that it turns out were migrated poorly. It would be nice if 'cabal upgrade' worked and was not deprecated. Also, installing a new haskell platform could comment on the fact that it is leaving a bunch of old most likely garbage behind and how to resolve it. Tonight I just did not bother and wiped Haskell completely and reinstalled.
participants (4)
-
Albert Y. C. Lai
-
Daniel Fischer
-
Sean Perry
-
Stephen Tetley