Statically linked 9.4.1 alpha 3 GHC is unable to do linking for TH
Steps to reproduce
- Compile a statically linked GHC executable with 9.4.1-alpha3 and create a wrapper for it
cabal get lsp-types-1.4.0.1
cabal build -w ghc-static --allow-newer
This results in the following linker failures:
[ 5 of 52] Compiling Language.LSP.Types.StaticRegistrationOptions ( src/Language/LSP/Types/StaticRegistrationOptions.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/StaticRegistrationOptions.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `_hs_text_measure_off'
ghc: /home/zubin/.cabal/store/ghc-9.4.0.20220623/aeson-2.0.3.0-840985ab1cda79d2b376fa876992cb056ebfc140ab0b12a711a908a2accfc0ce/lib/libHSaeson-2.0.3.0-840985ab1cda79d2b376fa876992cb056ebfc140ab0b12a711a908a2accfc0ce.a: unknown symbol `textzm2zi0_DataziText_zdwzdclift_closure'
ghc: /home/zubin/.cabal/store/ghc-9.4.0.20220623/aeson-2.0.3.0-840985ab1cda79d2b376fa876992cb056ebfc140ab0b12a711a908a2accfc0ce/lib/libHSaeson-2.0.3.0-840985ab1cda79d2b376fa876992cb056ebfc140ab0b12a711a908a2accfc0ce.a: unknown symbol `aesonzm2zi0zi3zi0zm840985ab1cda79d2b376fa876992cb056ebfc140ab0b12a711a908a2accfc0ce_DataziAesonziKey_zdfCoArbitraryKey1_closure'
ghc: /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/Utils.o: unknown symbol `aesonzm2zi0zi3zi0zm840985ab1cda79d2b376fa876992cb056ebfc140ab0b12a711a908a2accfc0ce_DataziAesonziTypesziInternal_Options_con_info'
ghc: Could not load Object Code /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/Utils.o.
<no location info>: error:
[ 6 of 52] Compiling Language.LSP.Types.Progress ( src/Language/LSP/Types/Progress.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/Progress.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
<no location info>: error:
[ 7 of 52] Compiling Language.LSP.Types.Method ( src/Language/LSP/Types/Method.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/Method.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
<no location info>: error:
[10 of 52] Compiling Language.LSP.Types.MarkupContent ( src/Language/LSP/Types/MarkupContent.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/MarkupContent.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
<no location info>: error:
[11 of 52] Compiling Language.LSP.Types.Location ( src/Language/LSP/Types/Location.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/Location.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
<no location info>: error:
[12 of 52] Compiling Language.LSP.Types.DocumentFilter ( src/Language/LSP/Types/DocumentFilter.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/DocumentFilter.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
<no location info>: error:
[30 of 52] Compiling Language.LSP.Types.Configuration ( src/Language/LSP/Types/Configuration.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/Configuration.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
<no location info>: error:
[35 of 52] Compiling Language.LSP.Types.WatchedFiles ( src/Language/LSP/Types/WatchedFiles.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/WatchedFiles.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
<no location info>: error:
[42 of 52] Compiling Language.LSP.Types.WorkspaceFolders ( src/Language/LSP/Types/WorkspaceFolders.hs, /home/zubin/ghcs/unicode-lex/lsp-types-1.4.0.1/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220623/lsp-types-1.4.0.1/build/Language/LSP/Types/WorkspaceFolders.o )
ghc: /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a: unknown symbol `__popcountdi2'
ghc: Could not load Object Code /home/zubin/.ghcup/ghc/9.4.1/lib/ghc-9.4.0.20220623/lib/x86_64-linux-ghc-9.4.0.20220623/text-2.0/libHStext-2.0.a(#3:measure_off.o).
Edited by Zubin