[GHC] #15105: `typecheckModule` from GHC API crashes on MacOS for files with TH

GHC ghc-devs at haskell.org
Wed May 2 15:53:13 UTC 2018


#15105: `typecheckModule` from GHC API crashes on MacOS for files with TH
----------------------------------+----------------------------------------
        Reporter:  harpocrates    |                Owner:  (none)
            Type:  bug            |               Status:  new
        Priority:  normal         |            Milestone:  8.6.1
       Component:  GHC API        |              Version:  8.4.2
      Resolution:                 |             Keywords:
Operating System:  MacOS X        |         Architecture:  Unknown/Multiple
 Type of failure:  Runtime crash  |            Test Case:
      Blocked By:                 |             Blocking:
 Related Tickets:                 |  Differential Rev(s):
       Wiki Page:                 |
----------------------------------+----------------------------------------

Comment (by harpocrates):

 Replying to [comment:2 darchon]:
 > We have some code in the Clash compiler to do with dynamic linking,
 which I expect is TH-related: https://github.com/clash-lang/clash-
 compiler/blame/d7dfef9d89b30d096370887899be24b9027914ac/clash-ghc/src-
 ghc/Clash/GHC/LoadModules.hs#L174-L179
 >
 > {{{
 >     let ghcDynamic = case lookup "GHC Dynamic" (DynFlags.compilerInfo
 dflags) of
 >                       Just "YES" -> True
 >                       _          -> False
 >     let dflags3 = if ghcDynamic then DynFlags.gopt_set dflags2
 DynFlags.Opt_BuildDynamicToo
 >                                 else dflags2
 >     _ <- GHC.setSessionDynFlags dflags3
 > }}}
 >
 > I don't have access to an OS X machine, so could you check if setting
 the {{{Opt_BuildDynamicToo}}} flag fixes the TH issue?



 I just tried this on OS X and it unfortunately makes no difference: in
 either case, `lookup "GHC Dynamic" (DynFlags.compilerInfo dynflags')`
 produced `Just "NO"` (and then manually enabling
 `DynFlags.Opt_BuildDynamicToo` also didn't change anything).

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


More information about the ghc-tickets mailing list