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

GHC ghc-devs at haskell.org
Tue Jul 11 02:51:01 UTC 2017


#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


More information about the ghc-tickets mailing list