[GHC] #15956: Linker error buidling `runghc`

#15956: Linker error buidling `runghc` -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Build System | Version: 8.6.2 (Hadrian) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I'm on MacOS trying to build `master`. Hadrian fails where `make` succeeds. I'm not doing anything fancy either.. {{{ ghc$ git rev-parse HEAD df570d920fa66db631f936fa377e598fe92bd2a1 ghc$ ./boot && ./configure ghc$ make -j V=0 # succeeds ghc$ ./hadrian/build.sh -c --build-root="_build2" > out.log 2> err.log # fails }}} Hadrian fails when trying to link `runghc`: {{{ Error when running Shake build system: at src/Rules.hs:(34,19)-(47,17): at src/Rules.hs:47:5-17: * Depends on: _build2/stage1/bin/runghc * Raised the exception: user error (Development.Shake.cmd, system command failed Command: _build2/stage0/bin/ghc -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-db _build2/stage1/lib/package.conf.d' '-package-id base-4.12.0.0' '-package- id directory-1.3.3.1' '-package-id filepath-1.4.2.1' '-package-id process-1.6.3.0' '-package-id unix-2.7.2.2' -i -i_build2/stage1/utils/runghc/build -i_build2/stage1/utils/runghc/build/runghc/autogen -iutils/runghc/. -Iincludes -I_build2/generated -I_build2/stage1/utils/runghc/build -I/Users/atheriault/Code/ghc/_build2/stage1/lib/x86_64-osx- ghc-8.7.20181126/process-1.6.3.0/include -I/Users/atheriault/Code/ghc/_build2/stage1/lib/x86_64-osx- ghc-8.7.20181126/unix-2.7.2.2/include -I/Users/atheriault/Code/ghc/_build2/stage1/lib/x86_64-osx- ghc-8.7.20181126/time-1.9.2/include -I/Users/atheriault/Code/ghc/_build2/stage1/lib/x86_64-osx- ghc-8.7.20181126/bytestring-0.10.9.0/include -I/Users/atheriault/Code/ghc/_build2/stage1/lib/x86_64-osx- ghc-8.7.20181126/base-4.12.0.0/include -I/Users/atheriault/Code/ghc/_build2/stage1/lib/x86_64-osx- ghc-8.7.20181126/integer-gmp-1.0.2.0/include -I/Users/atheriault/Code/ghc/_build2/stage1/lib/x86_64-osx- ghc-8.7.20181126/rts-1.0/include -I_build2/generated -optc- I_build2/generated -optP-include -optP_build2/stage1/utils/runghc/build/runghc/autogen/cabal_macros.h -optc-fno-stack-protector -odir _build2/stage1/utils/runghc/build -hidir _build2/stage1/utils/runghc/build -stubdir _build2/stage1/utils/runghc/build -no-auto-link-packages -rtsopts -optl- lgmp -Wnoncanonical-monad-instances -optc-Wno-unknown-pragmas _build2/stage1/utils/runghc/build/Main.o -o _build2/stage1/bin/runghc -O2 -H32m -XHaskell2010 -ghcversion- file=/Users/atheriault/Code/ghc/_build2/generated/ghcversion.h Exit code: 1 Stderr: Undefined symbols for architecture x86_64: "_findPtr", referenced from: -u command line option ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) `gcc' failed in phase `Linker'. (Exit code: 1) ) }}} This must be a recent regression, since I was successfully building with Hadrian as recently as last week. I'll try to bisect, although the failure occurs so late in the compilation pipeline that I expect progress to be quite slow. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15956 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15956: Linker error building `runghc` -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Build System | Version: 8.6.2 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15956#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15956: Linker error building `runghc` -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Build System | Version: 8.6.2 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by harpocrates): Oops, I never reported back! The offending commit is 561748cb507505bd5b7bd76bdc57796d896b62a2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15956#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15956: Linker error building `runghc` -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: harpocrates Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Build System | Version: 8.6.2 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by harpocrates): * owner: (none) => harpocrates Comment: I've got a fix for this coded up. Applied directly on top of 561748cb507505bd5b7bd76bdc57796d896b62a2, it works just fine. Unfortunately, I'm now running into another Hadrian issue which must've been introduced sometime between 561748cb507505bd5b7bd76bdc57796d896b62a2 and current master. Slowly bisecting... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15956#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15956: Linker error building `runghc` -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: harpocrates Type: bug | Status: patch Priority: normal | Milestone: 8.6.3 Component: Build System | Version: 8.6.2 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5404 Wiki Page: | -------------------------------------+------------------------------------- Changes (by harpocrates): * status: new => patch * differential: => Phab:D5404 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15956#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15956: Linker error building `runghc`
-------------------------------------+-------------------------------------
Reporter: harpocrates | Owner: harpocrates
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.3
Component: Build System | Version: 8.6.2
(Hadrian) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5404
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Tamar Christina

#15956: Linker error building `runghc` -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: harpocrates Type: bug | Status: merge Priority: normal | Milestone: 8.6.3 Component: Build System | Version: 8.6.2 (Hadrian) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5404 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15956#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15956: Linker error building `runghc` -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: harpocrates Type: bug | Status: closed Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.6.2 (Hadrian) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5404 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: => 8.8.1 Comment: I'm going to punt on merging this back to `ghc-8.6`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15956#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC