Skip to content

Undefined symbol for stage3 compiler

Summary

A stage3 build succeeds, however, the compiler throws immediately an error when executed.

Using the LLVM backend

$ cat mk/build.mk
include mk/flavours/quick-llvm.mk

the following error occurs

$ inplace/bin/ghc-stage3 --info
inplace/lib/bin/ghc-stage3: symbol lookup error: inplace/lib/bin/ghc-stage3: undefined symbol: ghc_DynFlags_mkBuildTag7_closure

while using the native code generator

$ cat mk/build.mk
include mk/flavours/quick.mk

a slightly different error occurs, but still an error

$ inplace/bin/ghc-stage3 --info
inplace/lib/bin/ghc-stage3: symbol lookup error: inplace/lib/bin/ghc-stage3: undefined symbol: ghc_GHC_zdwmodInfoIsExportedName_info

Any idea what could be wrong?

Environment

  • GHC version stageN, N>0: 8.8.1
  • GHC version stage0: 8.6.5

Optional:

  • Operating System: Fedora 30
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information