Ghc linking failure for 8.2.1 rc3 on Alpine Linux
Bisected this down to commit 2785ef0e 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 (closed), #13810 (closed), #13883 so I'm just leaving those out of this issue for now.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1-rc3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Linking) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | bgamari |
Operating system | |
Architecture |