Skip to content

9.0.1-rc1 link error

Summary

Linking ghc-stage1 fails, cannot find ghc_GHCziCoreziOptziMonad_zdfxMonadCoreM_closure

Steps to reproduce

git fetch origin --tags
git checkout tags/ghc-9.0.1-rc1
git submodule update --recursive
git log --oneline -n1
> b369c6e6d6 (HEAD, tag: ghc-9.0.1-rc1, origin/wip/keepAlive-ghc-9.0) gitlab-ci: Use gtar on FreeBSD
./boot
HAPPY=~/.cabal/happy19/happy ./configure
make

Lots of work, eventually ending with

===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for 'phase_0_builds'.
===--- building phase 1
make --no-print-directory -f ghc.mk phase=1 phase_1_builds
"/usr/bin/ghc" -o ghc/stage1/build/tmp/ghc-stage1 -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Wall   -package-db libraries/bootstrapping.conf  -hide-all-packages -i -ighc/. -ighc/stage1/build -Ighc/stage1/build -ighc/stage1/build/ghc/autogen -Ighc/stage1/build/ghc/autogen     -optP-include -optPghc/stage1/build/ghc/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.14.1.0 -package-id bytestring-0.10.12.0 -package-id containers-0.6.2.1 -package-id directory-1.3.6.0 -package-id filepath-1.4.2.1 -package-id ghc-9.0.0.20201227 -package-id ghc-boot-9.0.0.20201227 -package-id process-1.6.9.0 -package-id transformers-0.5.6.2 -package-id unix-2.7.2.2 -Wall -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -threaded -XHaskell2010 -XNoImplicitPrelude -XScopedTypeVariables -XBangPatterns  -Wcpp-undef -no-hs-main -threaded -no-user-package-db -rtsopts        -outputdir ghc/stage1/build    -static  -H32m -O -Wall   -package-db libraries/bootstrapping.conf  -hide-all-packages -i -ighc/. -ighc/stage1/build -Ighc/stage1/build -ighc/stage1/build/ghc/autogen -Ighc/stage1/build/ghc/autogen     -optP-include -optPghc/stage1/build/ghc/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.14.1.0 -package-id bytestring-0.10.12.0 -package-id containers-0.6.2.1 -package-id directory-1.3.6.0 -package-id filepath-1.4.2.1 -package-id ghc-9.0.0.20201227 -package-id ghc-boot-9.0.0.20201227 -package-id process-1.6.9.0 -package-id transformers-0.5.6.2 -package-id unix-2.7.2.2 -Wall -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -threaded -XHaskell2010 -XNoImplicitPrelude -XScopedTypeVariables -XBangPatterns  -Wcpp-undef -no-hs-main -threaded -no-user-package-db -rtsopts        ghc/stage1/build/Main.o ghc/stage1/build/hschooks.o
Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.
    Call hs_init_ghc() from your main() function to set these options.
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /home/tsuraan/src/ghc-9/compiler/stage1/build/libHSghc-9.0.0.20201227.a(Plugins.o): in function `ghc_GHCziDriverziPlugins_keepRenamedSource_info':
(.text+0x245c): undefined reference to `ghc_GHCziCoreziOptziMonad_zdfxMonadCoreM_closure'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /home/tsuraan/src/ghc-9/compiler/stage1/build/libHSghc-9.0.0.20201227.a(Plugins.o): in function `ghc_GHCziDriverziPlugins_defaultPluginzux_info':
(.text+0x2494): undefined reference to `ghc_GHCziCoreziOptziMonad_zdfxMonadCoreM_closure'
collect2: error: ld returned 1 exit status
`x86_64-pc-linux-gnu-gcc' failed in phase `Linker'. (Exit code: 1)
make[1]: *** [ghc/ghc.mk:124: ghc/stage1/build/tmp/ghc-stage1] Error 1
make: *** [Makefile:126: all] Error 2

Expected behavior

Lots of work, ending with an exit code of 0, and maybe even a compiler in inplace/bin/ghc-stage2

Environment

  • GHC version used:

currently system GHC is 8.10.3, but the same was also happening under 8.8.4

OS is Linux, amd64. gcc is 9.3.0.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information