Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,351
    • Issues 5,351
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 573
    • Merge requests 573
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #15105
Closed
Open
Issue created Apr 30, 2018 by Alec Theriault@harpocratesDeveloper

`typecheckModule` from GHC API crashes on MacOS for files with TH

I believe this is the same issue that is causing manually built haddock and doctest to crash on MacOS when fed TH (originally reported https://github.com/haskell/haddock/issues/767 and https://github.com/sol/doctest/issues/199).

I've attached a minimal program that uses the GHC API and exhibits the same problem.

$ ghc-8.4.2 -package ghc -package containers -package ghc-paths Prog.hs
[1 of 1] Compiling Main             ( Prog.hs, Prog.o )
Linking Prog ...
$ ./Prog Main-no-TH.hs -package template-haskell
$ ./Prog Main-TH.hs -package template-haskell
Prog:
lookupSymbol failed in relocateSection (RELOC_GOT)
/usr/local/lib/ghc-8.4.2/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o: unknown symbol `___gmp_rands'
Prog: Prog: unable to load package `integer-gmp-1.0.2.0'

In case it isn't clear, I do not expect Main-TH.hs to crash Prog.

Trac metadata
Trac field Value
Version 8.4.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHC API
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking