FS#23247 - [ghc 7.0.2] ghci -package ghc causes panic
Attached to Project:
Arch Linux
Opened by patrick (brisbin33) - Friday, 11 March 2011, 21:34 GMT
Last edited by Thomas Dziedzic (tomd123) - Saturday, 03 March 2012, 17:04 GMT
Opened by patrick (brisbin33) - Friday, 11 March 2011, 21:34 GMT
Last edited by Thomas Dziedzic (tomd123) - Saturday, 03 March 2012, 17:04 GMT
|
Details
Description:
our ghc 7 build seems to be stripped of some symbols or other (maybe debug?) info required for some haskell packages. XMonad and its deps build fine, but I get a compiler panic trying to f.e. `cabal install yesod`. I've reported upstream (http://hackage.haskell.org/trac/ghc/ticket/5004), and other distros have confirmed the bug. I'm reporting here in case there's something we can do when packaging to get around the issue. Thanks, pbrisbin Additional info: ghc 7.0.2 Steps to reproduce: $ pacman -S ghc $ ghci -package ghc GHCi, version 7.0.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.3.0.2 ... linking ... done. Loading package containers-0.4.0.0 ... linking ... done. Loading package filepath-1.2.0.0 ... linking ... done. Loading package old-locale-1.0.0.2 ... linking ... done. Loading package old-time-1.0.0.6 ... linking ... done. Loading package unix-2.4.2.0 ... linking ... done. Loading package directory-1.1.0.0 ... linking ... done. Loading package pretty-1.0.1.2 ... linking ... done. Loading package process-1.0.1.5 ... linking ... done. Loading package Cabal-1.10.1.0 ... linking ... done. Loading package bytestring-0.9.1.10 ... linking ... done. Loading package ghc-binary-0.5.0.2 ... linking ... done. Loading package bin-package-db-0.0.0.0 ... linking ... done. Loading package hpc-0.5.0.6 ... linking ... done. Loading package template-haskell ... linking ... done. Loading package ghc-7.0.2 ... ghc: This ELF file contains no symtab ghc: panic! (the 'impossible' happened) (GHC version 7.0.2 for x86_64-unknown-linux): loadArchive "/usr/lib/ghc-7.0.2/ghc-7.0.2/libHSghc-7.0.2.a": failed Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug |
This task depends upon
Closed by Thomas Dziedzic (tomd123)
Saturday, 03 March 2012, 17:04 GMT
Reason for closing: Works for me
Additional comments about closing: ghc 7.4.1 is now in extra
Saturday, 03 March 2012, 17:04 GMT
Reason for closing: Works for me
Additional comments about closing: ghc 7.4.1 is now in extra
This disables wai-handler-devel (which the author thinks was a bad idea anyway) and makes yesod build work.
-rw-r--r-- 1 nobody nobody 52M Mar 3 23:34 ghc-7.0.2-1-i686.pkg.tar.xz
-rw-r--r-- 1 nobody nobody 54M Mar 3 23:44 ghc-7.0.2-1-x86_64.pkg.tar.xz
-rw-r--r-- 1 nobody nobody 60M Mar 14 00:57 ghc-7.0.2-2-i686.pkg.tar.xz
-rw-r--r-- 1 nobody nobody 62M Mar 14 01:09 ghc-7.0.2-2-x86_64.pkg.tar.xz
But perhaps this is worth it.
I tried to do something similar and found that 'ghci -package ghc' worked but yesod still didn't. It seemed that the "no symtab" linking error was gone, but other sorts of linking problems emerged. I don't have the exact error easily available (different system), but it was something about multiple definitions within libHSghc-7.0.2.a. Then again, I wouldn't be surprised at all if I just compiled things wrong.
Can I help with something?
If you people could test snap & yesod against ghc-7.0.2-2, that'd be great.
GHCi runtime linker: fatal error: I found a duplicate definition for symbol
ghczm7zi0zi2_AsmCodeGen_zdfMonadCmmOptM2_closure
whilst processing object file
/usr/lib/ghc-7.0.2/ghc-7.0.2/libHSghc-7.0.2.a
This could be caused by:
* Loading two different object files which export the same symbol
* Specifying the same object file twice on the GHCi command line
* An incorrect `package.conf' entry, causing some object to be
loaded twice.
GHCi cannot safely continue in this situation. Exiting now. Sorry.
Rémy, I haven't gotten around to seeing if I can make a smaller test case. But the long way around is to:
$ cabal install yesod persistent-sqlite
$ yesod
Your name: test
Project name: test
Directory name: test
Foundation: Test
So, what'll it be? s for sqlite, p for postgresql: s
$ cd test
$ runhaskell devel-server.hs
This gave me the error mentioned above. Please let me know if you need any more info.
$ ghci -package ghc
GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
....
Loading package ghc-7.0.3 ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude>
Leaving GHCi.