[Haskell-cafe] ghc 6.8.2 issue
duncan.coutts at worc.ox.ac.uk
Mon Jun 2 06:38:20 EDT 2008
On Mon, 2008-06-02 at 00:07 -0500, Galchin, Vasili wrote:
> I have been developing new code for the "unix" package. I have
> run into what I think are ghc 6.8.2 anomalies but couldn't see a
> pattern. Possibly now I do. I have been using the 32-bit x86 ghc
> binary that I downloaded from http://www.haskell.org and running on
> Ubuntu Linux. I am pretty I can repeat now. Everything is ok until I
> do "sudo runhaskell Setup.hs install" which installs a new "unix"
> package that I just built. Of course the "intall" installs
> into /usr/local/lib/unix-18.104.22.168/ghc-6.8.2. The "install" seems to
> destroy some ghc compiler state under /usr/local ...
That sounds right. You're replacing the unix-22.214.171.124 library that comes
with ghc-6.8.2 with your own version. It is highly unlikely to be ABI
compatible with the one you are replacing and so all the other packages
that already depends on the existing unix-126.96.36.199 library end up broken.
You'd expect this kind of breakage to be exposed as link errors and
I suggest you do not replace any of the libraries that come with ghc. To
be more precise, it is perfectly ok to *add new versions* but it is not
ok to *replace existing versions* without rebuilding all the other libs
that depend on it.
So if you really want to make changes to the unix lib, make sure you
change the version number too. I also suggest not installing the
packages as root, just install them locally. That way you can guarantee
you never mess up your ghc install. You would be able to revert to a
clean ghc install just by removing your
~/.ghc/$arch/ghc-6.8.2/package.conf file which will unregister *all*
locally registered packages. To unregister individual packages use
ghc-pkg --user unregister $pkgname
More information about the Haskell-Cafe