[GHC] #13958: Ghc linking failure for 8.2.1 rc3 on Alpine Linux

#13958: Ghc linking failure for 8.2.1 rc3 on Alpine Linux -------------------------------------+------------------------------------- Reporter: mitchty | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc3 (Linking) | Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Building GHC (amd64) | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Bisected this down to commit 2785ef0e31a123400da950ffafebe6cb1ce3f4eb between rc2 and rc3. rc2 builds fine. This is on Alpine Linux which uses musl libc primarily and gcc/binutils patched for it as well (mostly PIE related), if wanted I can provide a Dockerfile to reproduce the issue more easily. Note that the switch provided by that commit, --disable-ld-override allows rc3 to link stage 2 properly again. But the error encountered with no override and when specifying the ld to use via configure, in this case ld.gold is this: {{{ "inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -Wall -hide-all-packages -i -iutils/haddock/driver -iutils/haddock/haddock-api/src -iutils/haddock/haddock- library/vendor/attoparsec-0.13.1.0 -iutils/haddock/haddock-library/sr c -iutils/haddock/dist/build -Iutils/haddock/dist/build -iutils/haddock/dist/build/haddock/autogen -Iutils/haddock/dist/build/haddock/autogen -optP-DIN_GHC_TREE -optP- include -optPutils/haddock/dist/build/haddock/autogen/cabal_macros.h -package-id base-4.10.0.0 -packag e-id filepath-1.4.1.2 -package-id directory-1.3.0.2 -package-id containers-0.5.10.2 -package-id deepseq-1.4.3.0 -package-id array-0.5.2.0 -package-id xhtml-3000.2.2 -package-id Cabal-2.0.0.0 -package-id ghc- boot-8.2.0.20170704 -package-id ghc-8.2.0.20170704 -package-id bytestring-0.10.8.2 -package-id transformers-0.5.2.0 -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded -XHaskell2010 -no-user-package-db -rtsopts -Wno-unused-imports -Wno-deprecations -Wnoncanonical-monad- instances -odir utils/haddock/dist/build -hidir utils/haddo ck/dist/build -stubdir utils/haddock/dist/build -c utils/haddock/driver/ResponseFile.hs -o utils/haddock/dist/build/ResponseFile.dyn_o "inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -Wall -hide-all-packages -i -iutils/haddock/driver -iutils/haddock/haddock-api/src -iutils/haddock/haddock- library/vendor/attoparsec-0.13.1.0 -iutils/haddock/haddock-library/sr c -iutils/haddock/dist/build -Iutils/haddock/dist/build -iutils/haddock/dist/build/haddock/autogen -Iutils/haddock/dist/build/haddock/autogen -optP-DIN_GHC_TREE -optP- include -optPutils/haddock/dist/build/haddock/autogen/cabal_macros.h -package-id base-4.10.0.0 -packag e-id filepath-1.4.1.2 -package-id directory-1.3.0.2 -package-id containers-0.5.10.2 -package-id deepseq-1.4.3.0 -package-id array-0.5.2.0 -package-id xhtml-3000.2.2 -package-id Cabal-2.0.0.0 -package-id ghc- boot-8.2.0.20170704 -package-id ghc-8.2.0.20170704 -package-id by testring-0.10.8.2 -package-id transformers-0.5.2.0 -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded -XHaskell2010 -no-user-package-db -rtsopts -Wno-unused-imports -Wno-deprecations -Wnoncanonical-monad- instances -odir utils/haddock/dist/build -hidir utils/haddock/dist/build -stubdir utils/haddock/dist/build -c utils/haddock/haddock- api/src/Haddock/GhcUtils.hs -o utils/haddock/dist/build/Haddock/GhcUtils.dyn_o "inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -Wall -hide-all-packages -i -iutils/haddock/driver -iutils/haddock/haddock-api/src -iutils/haddock/haddock- library/vendor/attoparsec-0.13.1.0 -iutils/haddock/haddock-library/sr c -iutils/haddock/dist/build -Iutils/haddock/dist/build -iutils/haddock/dist/build/haddock/autogen -Iutils/haddock/dist/build/haddock/autogen -optP-DIN_GHC_TREE -optP- include -optPutils/haddock/dist/build/haddock/autogen/cabal_macros.h -package-id base-4.10.0.0 -package-id filepath-1.4.1.2 -package-id directory-1.3.0.2 -package-id containers-0.5.10.2 -package-id deepseq-1.4.3.0 -package-id array-0.5.2.0 -package-id xhtml-3000.2.2 -package-id Cabal-2.0.0.0 -package-id ghc-boot-8.2.0.20170704 -package-id ghc-8.2.0.20170704 -package-id by testring-0.10.8.2 -package-id transformers-0.5.2.0 -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded -XHaskell2010 -no-user-package-db -rtsopts -Wno-unused-imports -Wno-deprecations -Wnoncanonical-monad- instances -odir utils/haddock/dist/build -hidir utils/haddo ck/dist/build -stubdir utils/haddock/dist/build -c utils/haddock /haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs -o utils/haddock/dist/build/Haddock/Backends/Hyperlinker/Types.dyn_o "inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -Wall -hide-all-packages -i -iutils/haddock/driver -iutils/haddock/haddock-api/src -iutils/haddock/haddock- library/vendor/attoparsec-0.13.1.0 -iutils/haddock/haddock-library/sr c -iutils/haddock/dist/build -Iutils/haddock/dist/build -iutils/haddock/dist/build/haddock/autogen -Iutils/haddock/dist/build/haddock/autogen -optP-DIN_GHC_TREE -optP- include -optPutils/haddock/dist/build/haddock/autogen/cabal_macros.h -package-id base-4.10.0.0 -packag e-id filepath-1.4.1.2 -package-id directory-1.3.0.2 -package-id containers-0.5.10.2 -package-id deepseq-1.4.3.0 -package-id array-0.5.2.0 -package-id xhtml-3000.2.2 -package-id Cabal-2.0.0.0 -package-id ghc- boot-8.2.0.20170704 -package-id ghc-8.2.0.20170704 -package-id by testring-0.10.8.2 -package-id transformers-0.5.2.0 -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded -XHaskell2010 -no-user-package-db -rtsopts -Wno-unused-imports -Wno-deprecations -Wnoncanonical-monad- instances -odir utils/haddock/dist/build -hidir utils/haddo ck/dist/build -stubdir utils/haddock/dist/build -c utils/haddock /haddock-library/src/Documentation/Haddock/Types.hs -o utils/haddock/dist/build/Documentation/Haddock/Types.dyn_o "inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -Wall -hide-all-packages -i -iutils/haddock/driver -iutils/haddock/haddock-api/src -iutils/haddock/haddock- library/vendor/attoparsec-0.13.1.0 -iutils/haddock/haddock-library/sr c -iutils/haddock/dist/build -Iutils/haddock/dist/build -iutils/haddock/dist/build/haddock/autogen -Iutils/haddock/dist/build/haddock/autogen -optP-DIN_GHC_TREE -optP- include -optPutils/haddock/dist/build/haddock/autogen/cabal_macros.h -package-id base-4.10.0.0 -packag e-id filepath-1.4.1.2 -package-id directory-1.3.0.2 -package-id containers-0.5.10.2 -package-id deepseq-1.4.3.0 -package-id array-0.5.2.0 -package-id xhtml-3000.2.2 -package-id Cabal-2.0.0.0 -package-id ghc- boot-8.2.0.20170704 -package-id ghc-8.2.0.20170704 -package-id by testring-0.10.8.2 -package-id transformers-0.5.2.0 -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded -XHaskell2010 -no-user-package-db -rtsopts -Wno-unused-imports -Wno-deprecations -Wnoncanonical-monad- instances -odir utils/haddock/dist/build -hidir utils/haddo ck/dist/build -stubdir utils/haddock/dist/build -c utils/haddock/dist/build/haddock/autogen/Paths_haddock.hs -o utils/haddock/dist/build/Paths_haddock.dyn_o "inplace/bin/ghc-stage2" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -Wall -hide-all-packages -i -iutils/haddock/driver -iutils/haddock/haddock-api/src -iutils/haddock/haddock- library/vendor/attoparsec-0.13.1.0 -iutils/haddock/haddock-library/sr c -iutils/haddock/dist/build -Iutils/haddock/dist/build -iutils/haddock/dist/build/haddock/autogen -Iutils/haddock/dist/build/haddock/autogen -optP-DIN_GHC_TREE -optP- include -optPutils/haddock/dist/build/haddock/autogen/cabal_macros.h -package-id base-4.10.0.0 -packag e-id filepath-1.4.1.2 -package-id directory-1.3.0.2 -package-id containers-0.5.10.2 -package-id deepseq-1.4.3.0 -package-id array-0.5.2.0 -package-id xhtml-3000.2.2 -package-id Cabal-2.0.0.0 -package-id ghc- boot-8.2.0.20170704 -package-id ghc-8.2.0.20170704 -package-id by testring-0.10.8.2 -package-id transformers-0.5.2.0 -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded -XHaskell2010 -no-user-package-db -rtsopts -Wno-unused-imports -Wno-deprecations -Wnoncanonical-monad- instances -odir utils/haddock/dist/build -hidir utils/haddo ck/dist/build -stubdir utils/haddock/dist/build -c utils/haddock /haddock-library/src/Documentation/Haddock/Utf8.hs -o utils/haddock/dist/build/Documentation/Haddock/Utf8.dyn_o Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.soError relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.soError relocating /home/build/aport s/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build/libHSrts_thr- ghc8.2.0.20170704.soError relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not found: my_task: symbol not found : my_task: symbol not found Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not found Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not found: my_task: symbol not found Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not foundError relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so : my_task: symbol not found Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not found Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not found Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not found Error relocating /home/build/aports/testing/ghc/src/ghc-8.2.0.20170704/rts/dist/build /libHSrts_thr-ghc8.2.0.20170704.so: my_task: symbol not found make[1]: *** [utils/haddock/ghc.mk:21: utils/haddock/dist/build/Haddock/GhcUtils.dyn_o] Error 127 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [utils/haddock/ghc.mk:21: utils/haddock/dist/build/ResponseFile.dyn_o] Error 127 make[1]: *** [utils/haddock/ghc.mk:21: utils/haddock/dist/build/Haddock/Backends/Hyperlinker/Types.dyn_o] Error 127 make[1]: *** [utils/haddock/ghc.mk:21: utils/haddock/dist/build/Documentation/Haddock/Utf8.dyn_o] Error 127 make[1]: *** [utils/haddock/ghc.mk:21: utils/haddock/dist/build/Documentation/Haddock/Types.dyn_o] Error 127 make[1]: *** [utils/haddock/ghc.mk:21: utils/haddock/dist/build/Paths_haddock.dyn_o] Error 127 make: *** [Makefile:127: all] Error 2
ERROR: ghc: all failed ghc: Uninstalling dependencies... }}}
I can attach the log file that comes from or just give a Dockerfile one can use to replicate things and debug directly. But there is a workaround so probably not a super critical bug from my perspective. I'm not sure how well this relates to the issues listed in that commit: #13541, #13810, #13883 so I'm just leaving those out of this issue for now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13958 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13958: Ghc linking failure for 8.2.1 rc3 on Alpine Linux -------------------------------------+------------------------------------- Reporter: mitchty | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc3 (Linking) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Building GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by domenkozar): This one is easy to reproduce using Nix: {{{ git clone https://github.com/NixOS/nixpkgs.git cd nixpkgs git checkout e71c44160ba7d2b73c668a53f5600dbc1901cbc2 nix-build -A ghc --arg localSystem '{config="x86_64-unknown-linux-musl";}' }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13958#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC