Re: Fwd: installing happy 1.17

On Sat, 2008-06-07 at 09:36 -0700, Thomas Hartman wrote:
cabal issue?
Yes and no. What is happening is that there are several versions of the Cabal library installed. In particular Cabal-1.3.12 and Cabal-1.5.2. The happy package uses build-type Custom so cabal-install compiles the Setup.lhs script. The question is what version of the Cabal library should it use? The happy.cabal file specifies cabal-version: >= 1.2 so we'd better respect that. But even then we have several choices. Currently it just picks the highest one of the remaining choices. In this case that meant Cabal-1.5.2 -- the latest development version. This version turns out to have API changes that means that we get a type error when compiling Setup.lhs. As it happens, if cabal-install had picked one of the other choices then it would have compiled ok because the 1.2.x and upcoming 1.4.x series do not have those api changes. The immediate workarounds are: * unregister Cabal-1.5.2 * cabal install happy --cabal-lib-version 1.3.12 Perhaps a better solution is for cabal-install to choose the version of the Cabal library differently. Of course it has to be within the hard constraints specified in the .cabal file and on the command line. But after that perhaps it should prefer the version of the Cabal library that it itself was built with and at second preference the latest version in the same major series. The last preference would be as now, the latest version available. Sound sensible? Duncan
---------- Forwarded message ---------- From: Thomas Hartman
Date: 2008/6/7 Subject: installing happy 1.17 To: haskell I had a problem installing happy 1.17 (same result with happy head). This appears to be required for installing happs-hsp-template via cabal install.
thanks for any advice!
Thomas.
*****
thartman@thartman-laptop:~/haskellInstalls/smallInstalls>darcs get --partial http://darcs.haskell.org/happy/ ********************** Copying patch 87 of 87... done. Applying patch 86 of 86... done. Finished getting.
thartman@thartman-laptop:~/haskellInstalls/smallInstalls>cd happy
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/happy>runghc Setup.lhs configure
Setup.lhs:30:43: Not in scope: `buildVerbose' thartman@thartman-laptop:~/haskellInstalls/smallInstalls/happy>cabal --version cabal-install version 0.4.9 using version 1.3.12 of the Cabal library thartman@thartman-laptop:~/haskellInstalls/smallInstalls/happy>ghc-pkg list | grep -i cabal Cabal-1.2.3.0, Cabal-1.3.11, Cabal-1.3.12, Cabal-1.5.2,

On Sat, 2008-06-07 at 18:44 +0100, Duncan Coutts wrote:
Perhaps a better solution is for cabal-install to choose the version of the Cabal library differently. Of course it has to be within the hard constraints specified in the .cabal file and on the command line. But after that perhaps it should prefer the version of the Cabal library that it itself was built with and at second preference the latest version in the same major series. The last preference would be as now, the latest version available.
Sound sensible?
Done:
Sat Jun 7 19:26:00 BST 2008 Duncan Coutts

On Sat, 2008-06-07 at 21:20 +0200, Bertram Felgenhauer wrote:
Duncan Coutts wrote:
The immediate workarounds are: * unregister Cabal-1.5.2
Better, hide it (that's reversible) - or does that not work with cabal-install?
If Cabal ignored hidden packages then you could never install packages that depend on the ghc package since that's always hidden. Though again we could use that as a preference rather than a hard constraint. Duncan

great, sudo cabal install from inside 1.17 distribution dir now seems
to do the right thing.
however, after it's done installing (apparently without error) the
happy version is still 1.16 and the happy executable is from 2006.
This means that I still can't install other packages that rely on happy >=1.17
sudo cabal install haskell-src-exts
Resolving dependencies...
'haskell-src-exts-0.3.4' is cached.
Configuring haskell-src-exts-0.3.4...
cabal: happy version >=1.17 is required but the version found at
/usr/bin/happy is version 1.16
cabal: Error: some packages failed to install:
haskell-src-exts-0.3.4 failed during the configure step. The exception was:
exit: ExitFailure 1
happy-1.17>sudo cabal install
Resolving dependencies...
Warning: defaultUserHooks in Setup script is deprecated.
Configuring happy-1.17...
Warning: No 'build-type' specified. If you do not need a custom Setup.hs or
./configure script then use 'build-type: Simple'.
Preprocessing executables for happy-1.17...
Building happy-1.17...
[ 1 of 18] Compiling Paths_happy (
dist/build/autogen/Paths_happy.hs,
dist/build/happy/happy-tmp/Paths_happy.o )
Linking dist/build/happy/happy ...
Installing: /home/thartman/.cabal/bin
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/happy-1.17>happy
--version
Happy Version 1.16 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c)
1997-2005 Simon Marlow
Happy is a Yacc for Haskell, and comes with ABSOLUTELY NO WARRANTY.
This program is free software; you can redistribute it and/or modify
it under the terms given in the file 'LICENSE' distributed with
the Happy sources.
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/happy-1.17>ls
-l `which happy`
-rwxr-xr-x 1 root root 941968 2006-11-23 21:34 /usr/bin/happy
thartman@thartman-laptop:~/haskellInstalls/smallInstalls/happy-1.17>
2008/6/7 Duncan Coutts
On Sat, 2008-06-07 at 21:20 +0200, Bertram Felgenhauer wrote:
Duncan Coutts wrote:
The immediate workarounds are: * unregister Cabal-1.5.2
Better, hide it (that's reversible) - or does that not work with cabal-install?
If Cabal ignored hidden packages then you could never install packages that depend on the ghc package since that's always hidden.
Though again we could use that as a preference rather than a hard constraint.
Duncan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Sat, 2008-06-07 at 14:46 -0700, Thomas Hartman wrote:
great, sudo cabal install from inside 1.17 distribution dir now seems to do the right thing.
however, after it's done installing (apparently without error) the happy version is still 1.16 and the happy executable is from 2006.
This means that I still can't install other packages that rely on happy >=1.17
sudo cabal install haskell-src-exts Resolving dependencies... 'haskell-src-exts-0.3.4' is cached. Configuring haskell-src-exts-0.3.4... cabal: happy version >=1.17 is required but the version found at /usr/bin/happy is version 1.16
At the moment by default cabal-install installs binaries to ~/.cabal/bin which isn't on the $PATH unless you deliberately change your $PATH. The reason we don't put things directly into ~/bin/ is because some people worry about cabal-install "clobbering" programs that the user already had in ~/bin/. One idea for resolving this is: http://hackage.haskell.org/trac/hackage/ticket/289 We'd very much appreciate feedback on what the right thing to do is and if the above spec is ok for someone to implement it. Duncan
participants (3)
-
Bertram Felgenhauer
-
Duncan Coutts
-
Thomas Hartman