On 22 October 2005 05:24, Donald Bruce Stewart wrote:

> Not sure if this is in fact an unknown package, as I'm only able to
> reproduce 
> it by installing Cabal-1.1.4 (and I think Seth is using 1.1.3, so
> 1.1.3 also 
> breaks the build) -- even though my package space doesn't change.
> 
> I've triggered this with both 6.4.1 and 6.5, but only if I use the
> darcs version of Cabal.

Strange things are indeed afoot in the package system.  Mostly they are
explainable, but the diagnostics are really terrible right now (I've
improved this to some extent in the current sources).

> To reproduce:
> 
> * Install hs-plugins and download yi+gtk. To save time we can edit
> yi's .cabal 
> file to skip the gtk2hs dependency. Note that the plugins dep is
> needed to 
> reproduce the bug (suspicious).
> 
>     $ darcs get http://www.cse.unsw.edu.au/~dons/code/hs-plugins
>     $ cd hs-plugins
>     $ chmod 700 configure
>     $ runhaskell Setup.hs configure --prefix=/home/dons
>     $ runhaskell Setup.hs build
>     $ runhaskell Setup.hs install
> 
>     $ darcs get http://scannedinavian.com/repos/yi
>     $ cd yi
>     $ sed 's/\(Build-depends:\).*/\1 base, mtl, plugins/' yi.cabal >
>     yi.cabal.1 $ mv yi.cabal.1 yi.cabal
>     $ runhaskell Setup.lhs configure
>     $ runhaskell Setup.lhs build
> 
> And it should stop with "Could not find module `Graphics.UI.Gtk'",
> which is OK (we removed the gtk dep).  Now, to trigger a panic,
> install latest Cabal: 
> 
>     $ darcs get http://cvs.haskell.org/darcs/cabal
>     $ cd cabal
>     ... edit GNUMakefile for your environment ...
>     $ make
>     $ ghc-pkg unregister Cabal-1.0
>     $ make install
> 
> Now, return to the build of yi:
> 
>     $ cd yi
>     $ runhaskell Setup.lhs configure
>     $ runhaskell Setup.lhs build -v9
> 
>     Preprocessing library yi-0.2...
>     Preprocessing executables for yi-0.2...
>     Building yi-0.2...
>     Building library...
>     /home/dons/bin/ghc -package-name yi --make -v -cpp -ffi -O
>     -funbox-strict-fields -Wall -fglasgow-exts -hide-all-packages -i
>     -idist/build/autogen -isrc -odir dist/build -hidir dist/build
>     -package base-1.0 -package mtl-1.0 -package plugins-0.9.10 Yi
>     Yi.Buffer Yi.Char Yi.Core Yi.DLists Yi.Editor Yi.Gtk Yi.GtkBuffer
>     Yi.Lexers Yi.MkTemp Yi.UI Yi.UTF8 Yi.Window Yi.Keymap.Ee
>     Yi.Keymap.Emacs Yi.Keymap.Vim Yi.Plugin Glasgow Haskell Compiler,
>             Version 6.5, for Haskell 98, compiled by GHC version
> 6.2.2 Using package config file: /home/dons/lib/ghc-6.5/package.conf
> Using package config file:
> /home/dons/.ghc/i386-openbsd-6.5/package.conf *** Deleting temp files
> Deleting: ghc-6.5: ghc-6.5: panic! (the `impossible' happened, GHC
> version 6.5): unknown exception     
> 
>     Please report it as a compiler bug to
>     [email protected], or
> http://sourceforge.net/projects/ghc/. 

plugins depends on Cabal, doesn't it?  I suspect that Cabal-1.0 is your
missing package.

> Typing the above cmd line by hand also causes the panic. What does
> the package space look like?
> 
>     $ ghc-pkg list
>     /home/dons/lib/ghc-6.5/package.conf:
>         rts-1.0, base-1.0, haskell98-1.0, template-haskell-1.0,
>         unix-1.0, parsec-2.0, haskell-src-1.0, network-1.0,
>         QuickCheck-1.0, HUnit-1.1, mtl-1.0, fgl-5.2, X11-1.1,
>         HGL-3.1, OpenGL-2.0, stm-1.0, readline-1.0, (lang-1.0),
>         (concurrent-1.0), (posix-1.0), (util-1.0), (data-1.0),
>         (text-1.0), (net-1.0), (hssource-1.0), (ghc-6.5),
>         glib-0.9.9.6, gtk-0.9.9.6, mogul-0.9.9.6, glade-0.9.9.6,
>     gconf-0.9.9.6, sourceview-0.9.9.6, (plugins-0.9.10), Cabal-1.1.4
> /home/dons/.ghc/i386-openbsd-6.5/package.conf: 
> 
> Hmm, plugins is hidden?

Yes, it will have been hidden when you installed the new Cabal, to avoid
conflicts.  ghc-pkg does tell you about this, if you watch the messages
carefully.

>     $ ghc-pkg expose plugins-0.9.10
> 
> Try again:
>     $ runhaskell Setup.lhs build
>     Preprocessing library yi-0.2...
>     Preprocessing executables for yi-0.2...
>     Building yi-0.2...
>     ghc-6.5: ghc-6.5: panic! (the `impossible' happened, GHC version
>         6.5): unknown exception
> 
>     Please report it as a compiler bug to
>     [email protected], or
> http://sourceforge.net/projects/ghc/. 
> 
> What if we re-register Cabal-1.0?
>     $ cd ~/src/ghc/cvs/build/libraries/Cabal
>     $ ghc-pkg unregister Cabal-1.1.4
>     $ ghc-pkg register package.conf.installed
> 
> And then yi builds ok.

Yes, because Cabal-1.0 is now found again.

ghc-pkg should probably warn/complain that unregistering Cabal-1.0 is a
bad idea.

The dependency of plugins on Cabal causes other problems when you have
two versions of Cabal installed.  What you should really do is upgrade
Cabal first, *then* build and install hs-plugins, then build yi.

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to