Build failures in packages built with GHC 6.6

shelarcy shelarcy at gmail.com
Thu Sep 14 09:41:57 EDT 2006


Hi Duncan,

On Mon, 11 Sep 2006 17:34:26 +0900, Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:
> Over the weekend Lennart Kolmodin tested all of Gentoo's Haskell
> packages with the latest GHC 6.6 RC snapshot. Here is his report of what
> failed, and how:
>
> http://www.haskell.org/~gentoo/gentoo-haskell/projects/GHC-6.5-failures.html

2006-09-12, Packages failing with GHC 6.5:
> wx/src/Graphics/UI/WX/Types.hs:94:0:
>     Bad interface file: out/wx/imports/Graphics/UI/WXCore/Types.hi
>         Something is amiss; requested module
>             wx:Graphics.UI.WXCore.Types differs from name found in the
>             interface file wxcore:Graphics.UI.WXCore.Types
>
> This is tricky. The wx package needs to be registered locally before
> anything else can be built against it.

This error comes from Generalise Package Support.
http://www.haskell.org/pipermail/cvs-ghc/2006-July/030207.html

So the wxcore package needs to be registered locally before building
the wx package's module, the wx package doesn't need to be registered.

See wxhaskell's Makefile definition :

   WXCORE-HCFLAGS	=$(HCFLAGS) -fvia-C -package-name $(WXCORE)


   # build main library
   wxcore: wxc wxd wxcore-dirs $(WXCORE-LIBS)

   (snip)

   WX-HCFLAGS	=$(HCFLAGS) -fvia-C -package-name $(WX)

   WX-HSDIRS	=-i$(WX-SRCDIR) $(WXCORE-HSDIRS)

   # build main library
   wx: wxcore wx-dirs $(WX-LIBS)

   ...

The wx package wants to use its package's module when dependecies
is built same time. But that is build as wxcore's by -package-name
option. Then above error is caused.

Unfortunately, Generised Package's Support is used just internally.
Because syntax is proposal now.

http://www.mail-archive.com/haskell@haskell.org/msg18991.html
http://hackage.haskell.org/trac/ghc/wiki/GhcPackages
http://hackage.haskell.org/trac/ghc/wiki/GhcPackageNamespaces


So we have only two way.

1. The wxcore package needs to be registered locally before
building the wx package's module. It is alredy written above.
2. The wx package needs to build and install separately from
wxcore by Cabal .... But it makes install step more complex,
that is bad for Windows and Mac OS User.

But both ways are big change.


P.S. Don't forgot this change to use wxhaskell with GHC 6.6.
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2005-October/005639.html

-- 
shelarcy <shelarcy    capella.freemail.ne.jp>
http://page.freett.com/shelarcy/


More information about the Glasgow-haskell-users mailing list