Я использую стек для некоторых из моих проектов на Haskell. До сих пор у меня не было проблем; но так как lts-13.1 я получаю странную встроенную ошибку.
Когда я настраиваю новый проект с stack new foo && cd foo
, а затем запускаю stack setup --ghc-build standard
, я получаю это огромное повторяющееся сообщение об ошибке:
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Interpreter.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(CheckUnload.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(CheckUnload.thr_o): requires dynamic R_X86_64_32 reloc against 'linker_unloaded_mutex' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Compact.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Compact.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Compact.thr_o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac_thr.thr_o): requires dynamic R_X86_64_32 reloc against 'stg_WHITEHOLE_info' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac_thr.thr_o): requires dynamic R_X86_64_32 reloc against 'stg_WHITEHOLE_info' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(MarkWeak.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(MarkWeak.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(MarkWeak.thr_o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac.thr_o): requires dynamic R_X86_64_32 reloc against 'stg_WHITEHOLE_info' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(ffi64.o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(unix64.o): requires dynamic R_X86_64_PC32 reloc against 'abort' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(ffiw64.o): requires dynamic R_X86_64_32 reloc against 'ffi_closure_win64' which may overflow at runtime; recompile with -fPIC
... еще сотни таких же ...
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(win64.o): requires dynamic R_X86_64_PC32 reloc against 'abort' which may overflow at runtime; recompile with -fPIC
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
`clang' failed in phase `Linker'. (Exit code: 1)
-- While building simple Setup.hs using:
/home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.4.0.1 /home/georg/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/georg/.stack/setup-
exe-src/setup-shim-mPHDZzAJ.hs -o /home/georg/.stack/setup-exe-cache/x86_64-
linux/tmp-Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3
Process exited with code: ExitFailure 1
Я думаю, что это как-то связано с lts-13.1 / 2 или моей установкой Arch Linux / gcc, потому что, когда я изменяю resolver: lts-13.2
на resolver: lts-12.4
в stack.yaml
, он прекрасно собирается.
Я пробовал разные варианты для --ghc-build
безрезультатно; переключился между clang и gcc; все мои стеки и другие локальные пакеты на Haskell обновлены (я нахожусь на Arch Linux).
Я хочу использовать последнюю версию Megaparsec 7.0.4, которая не является частью lt-12.4 (версия 6.5). Я могу обойти эту проблему с помощью опций зависимости в stack / cabal, но мне интересно, почему даже пустой / новый проект не будет собираться с lts-13.2 на моей машине (lts-13.1 также не будет работать). Эта проблема очень похожа на мою, но ни одно из представленных там решений не работает для меня.
Что мне не хватает?