[GHC] #8374: `tcIfaceGlobal (local): not found` while compiling

GHC ghc-devs at haskell.org
Thu Feb 27 11:35:28 UTC 2014


#8374: `tcIfaceGlobal (local): not found` while compiling
----------------------------------------+---------------------------
        Reporter:  bgamari              |            Owner:
            Type:  bug                  |           Status:  new
        Priority:  high                 |        Milestone:
       Component:  Build System         |          Version:  7.7
      Resolution:                       |         Keywords:
Operating System:  Unknown/Multiple     |     Architecture:  arm
 Type of failure:  Building GHC failed  |       Difficulty:  Unknown
       Test Case:                       |       Blocked By:
        Blocking:                       |  Related Tickets:
----------------------------------------+---------------------------

Comment (by bernalex):

 Hi guys. I'm a complete newbie to GHC, and even Haskell still, so keep
 that in mind. The best (and certainly most fun) way for me to familiarise
 myself with the GHC code base was to dive right in. So I was hacking on
 base for fun and encountered an odd bug, and christiaanb in #ghc pointed
 me here.

 Replying to [comment:13 nomeata]:
 > I occasionally have that as well; right now in `library/base`:
 > {{{
 >   HC [stage 1] libraries/base/dist-install/build/Control/Applicative.o
 > ghc-stage1: panic! (the 'impossible' happened)
 >   (GHC version 7.9.20140129 for x86_64-unknown-linux):
 >         tcIfaceGlobal (local): not found:
 >     base:Control.Applicative.$fApplicativeWrappedMonad{v ri}
 >     [(0c7, Identifier ‛base:Control.Applicative.<*>{v 0c7}’),
 >      (0c8, Identifier ‛base:Control.Applicative.pure{v 0c8}’),
 >      (0c9, Class ‛base:Control.Applicative.Alternative{tc 0c9}’),
 > ...
 > }}}
 >
 > Thorough cleaning helps. Sorry, no further clues.




 I get this:
 {{{
 ghc-stage1: panic! (the 'impossible' happened)
   (GHC version 7.9.20140225 for x86_64-unknown-linux):
         tcIfaceGlobal (local): not found:
     base:Control.Applicative.$fApplicativeWrappedMonad{v ri}
     [(0c7, Identifier ‘base:Control.Applicative.<*>{v 0c7}’),
      (0c8, Identifier ‘base:Control.Applicative.pure{v 0c8}’),
      (0c9, Class ‘base:Control.Applicative.Alternative{tc 0c9}’),
      (2y, Class ‘base:Control.Applicative.Applicative{tc 2y}’),
      (rE,
       Data constructor ‘base:Control.Applicative.D:Alternative{d rE}’),
      (r1J,
       Coercion axiom ‘base:Control.Applicative.NTCo:ZipList{tc r1J}’),
      (r2K,
       Coercion axiom ‘base:Control.Applicative.NTCo:Const{tc r2K}’),
      (r3c,
       Coercion axiom ‘base:Control.Applicative.NTCo:WrappedMonad{tc
 r3c}’),
      (r3i,
       Coercion axiom ‘base:Control.Applicative.NTCo:WrappedArrow{tc
 r3i}’),
      (r3T,
       Data constructor ‘base:Control.Applicative.D:Applicative{d r3T}’),
      (r45, Identifier ‘base:Control.Applicative.$p1Applicative{v r45}’),
      (r46, Identifier ‘base:Control.Applicative.$p1Alternative{v r46}’),
      (r4a, Identifier ‘base:Control.Applicative.getZipList{v r4a}’),
      (r4b, Data constructor ‘base:Control.Applicative.ZipList{d r4b}’),
      (r4c, Type constructor ‘base:Control.Applicative.ZipList{tc r4c}’),
      (r4d, Identifier ‘base:Control.Applicative.unwrapMonad{v r4d}’),
      (r4e,
       Data constructor ‘base:Control.Applicative.WrapMonad{d r4e}’),
      (r4f,
       Type constructor ‘base:Control.Applicative.WrappedMonad{tc r4f}’),
      (r4g, Identifier ‘base:Control.Applicative.unwrapArrow{v r4g}’),
      (r4h,
       Data constructor ‘base:Control.Applicative.WrapArrow{d r4h}’),
      (r4i,
       Type constructor ‘base:Control.Applicative.WrappedArrow{tc r4i}’),
      (r4j, Identifier ‘base:Control.Applicative.getConst{v r4j}’),
      (r4k, Data constructor ‘base:Control.Applicative.Const{d r4k}’),
      (r4l, Type constructor ‘base:Control.Applicative.Const{tc r4l}’),
      (r4m, Identifier ‘base:Control.Applicative.<*{v r4m}’),
      (r4n, Identifier ‘base:Control.Applicative.*>{v r4n}’),
      (r4o, Identifier ‘base:Control.Applicative.some{v r4o}’),
      (r4p, Identifier ‘base:Control.Applicative.many{v r4p}’),
      (r4q, Identifier ‘base:Control.Applicative.empty{v r4q}’),
      (r4r, Identifier ‘base:Control.Applicative.<|>{v r4r}’),
      (r1BR, Identifier ‘base:Control.Applicative.Const{v r1BR}’),
      (r1Cf, Identifier ‘base:Control.Applicative.WrapArrow{v r1Cf}’),
      (r1CD, Identifier ‘base:Control.Applicative.WrapMonad{v r1CD}’),
      (r1CT, Identifier ‘base:Control.Applicative.ZipList{v r1CT}’),
      (r1Da, Identifier ‘base:Control.Applicative.$dm*>{v r1Da}’),
      (r1DL, Identifier ‘base:Control.Applicative.$dm<*{v r1DL}’),
      (r1DN,
       Identifier ‘base:Control.Applicative.D:Applicative{v r1DN}’),
      (r1DO, Identifier ‘base:Control.Applicative.$dmsome{v r1DO}’),
      (r1EP, Identifier ‘base:Control.Applicative.$dmmany{v r1EP}’),
      (r1ER,
       Identifier ‘base:Control.Applicative.D:Alternative{v r1ER}’)]

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 make[1]: *** [libraries/base/dist-install/build/Control/Applicative.o]
 Error 1
 make: *** [all_libraries/base] Error 2
 }}}

 It's been consistent for me. What I've been doing is applying patches to
 base, and then I want to rebuild it as cheaply as possible. Reading the
 build guides I came up with several things to try. I have tried the
 following (some of them might be entirely equivalent):
 {{{
 make # in the base directory
 make all_libraries/base
 make FAST=YES
 }}}


 Cleaning does, as mentioned, help. Failing to derive a logical solution, I
 went with the "engineer's approach" and simply did:
 {{{
 rm libraries/base/dist-install/build/Control/Applicative.*
 rm libraries/base/dist-install/build/Data/List_* -R
 rm libraries/base/dist-install/build/Prelude* -R
 make FAST=YES
 }}}

 This was an attempt at just throwing out offenders and observing the
 results. This seemed to work nicely (i.e. make FAST=YES succeeded without
 errors), however make install failed with the same error as above. A
 regular make clean && make && make install worked nicely though.

 I would be happy to assist in trying to arrive at a predictable method of
 reproducing this problem.


 Some information on what I am using:
 {{{
 ghc 018676c7f883886b388652c913c99a10d2591b0b
 base eea1b6f5fe254b249acc618ef5a82c3e52a27f8c (+ 2 of my patches --
 rebuilding failed for both)
 Linux hackintosh 3.13.3-gentoo #10 SMP Sat Feb 15 11:17:38 CET 2014 x86_64
 Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz GenuineIntel GNU/Linux
 automake 1.13.4
 autoconf-2.69
 }}}

 If other information would be pertinent, please let me know and I will
 post it.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8374#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list