[GHC] #9074: GHC 7.8.2's ghci does not track missing symbols when loading non-Haskell object files

GHC ghc-devs at haskell.org
Tue Apr 17 16:27:45 UTC 2018


#9074: GHC 7.8.2's ghci does not track missing symbols when loading non-Haskell
object files
-------------------------------------+-------------------------------------
        Reporter:  massysett         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.2
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by bgamari:

Old description:

> I have a package that bundles in C library sources.  I never had a
> problem with this when using GHC 7.6.
>
> In GHC 7.8, the order of the c-sources in the cabal file now matters.
> Sources must be listed earlier if they have symbols that subsequently
> loaded object files will need.  If the c-sources are in the wrong order,
> when running "cabal repl" I get
>
> Loading object (static) dist/build/decnumber/src/decQuad.o ... ghc:
> panic! (the 'impossible' happened)
>   (GHC version 7.8.2 for x86_64-unknown-linux):
>         Loading temp shared object failed: /tmp/ghc14294_0/ghc14294_1.so:
> undefined symbol: DECSTICKYTAB
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>
> When using the same code and cabal file with GHC 7.6, "cabal repl" works
> fine: GHCi loads each static object (regardless of ordering in the cabal
> file), links up the necessary symbols, and launches successfully.
>
> Haskell Cafe discussion here:
>
> http://www.haskell.org/pipermail/haskell-cafe/2014-May/114041.html

New description:

 I have a package that bundles in C library sources.  I never had a problem
 with this when using GHC 7.6.

 In GHC 7.8, the order of the c-sources in the cabal file now matters.
 Sources must be listed earlier if they have symbols that subsequently
 loaded object files will need.  If the c-sources are in the wrong order,
 when running "cabal repl" I get
 {{{
 Loading object (static) dist/build/decnumber/src/decQuad.o ... ghc: panic!
 (the 'impossible' happened)
   (GHC version 7.8.2 for x86_64-unknown-linux):
         Loading temp shared object failed: /tmp/ghc14294_0/ghc14294_1.so:
 undefined symbol: DECSTICKYTAB

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}
 When using the same code and cabal file with GHC 7.6, "cabal repl" works
 fine: GHCi loads each static object (regardless of ordering in the cabal
 file), links up the necessary symbols, and launches successfully.

 Haskell Cafe discussion here:

 http://www.haskell.org/pipermail/haskell-cafe/2014-May/114041.html

--

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


More information about the ghc-tickets mailing list