[GHC] #10110: Compiling unit fails with Loading temp shared object failed
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: GHCi | Version: 7.10.1-rc2 Keywords: | Operating System: Linux Architecture: | Type of failure: Compile-time Unknown/Multiple | crash Test Case: | Blocked By: Blocking: | Related Tickets: #10058 Differential Revisions: | -------------------------------------+------------------------------------- @goldfire reported in #10058 in comment 1 another failure: {{{ [43 of 55] Compiling Tests.Compile.UnitParser ( Tests/Compile/UnitParser.hs, dist/build/main/main- tmp/Tests/Compile/UnitParser.o ) <no location info>: ghc: panic! (the 'impossible' happened) (GHC version 7.10.0.20150123 for x86_64-unknown-linux): Loading temp shared object failed: /tmp/ghc6444_0/libghc6444_264.so: undefined symbol: DataziMetrologyziSIziUnits_zdfShowHectare_closure Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} While on the surface this looks like a duplicate of #10058 it is not. The issue is only on Linux (travis to be precise), not OSX. Looking at the undefined symbol, here we see a symbol from the current module whereas in #10058 the undefined symbol lives in one of the packages. My theory is that the travis machine is running a modified link editor that defaults to `--as-needed` being set whereas the binutils default is `-no-as-needed`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: GHCi | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by trommler): * owner: => trommler -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: GHCi | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by trommler): Here is the [https://travis-ci.org/goldfirere/units/jobs/49117232 full build log] -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by trommler): * component: GHCi => Template Haskell -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: new Priority: highest | Milestone: 7.10.1 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * priority: normal => highest Comment: If Travis can't test packages, that's pretty bad for GHC. Bumping priority accordingly. I think this should hold up a release. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: new Priority: highest | Milestone: 7.10.1 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by hvr): IIRC Travis still runs Ubuntu 12.04LTS -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: patch Priority: highest | Milestone: 7.10.1 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731 -------------------------------------+------------------------------------- Changes (by trommler): * status: new => patch * differential: => Phab:D731 Comment: I have a patch that does what I described in this ticket. I cannot reproduce the issue though because singletons fails with this {{{ ghc: panic! (the 'impossible' happened) (GHC version 7.11.20150313 for x86_64-unknown-linux): StgCmmEnv: variable not found cobox_a1M03 local binds for: sConst sAsTypeOf sId %:++ sMap sFoldr %$ %$! $WLet_1627806145GoSym3KindInference $WLet_1627806145GoSym2KindInference $WLet_1627806145GoSym1KindInference ... sFlip1 sId1 sSeq1 a_r1Mg8 sF_s1MhC sG_s1MhD sA_1627806040_s1MhE Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} I will create a new ticket for this. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: patch Priority: highest | Milestone: 7.10.1 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731 -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"1b7f59769052fd8193c6acc561216e070d0ca335/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="1b7f59769052fd8193c6acc561216e070d0ca335" Link temporary shared objects with `--no-as-needed` Some ELF link editors default to `--as-needed` and record only those libraries in DT_NEEDED tags that are needed to resolve undefined symbols in the shared object to be created. In Template Haskell we rely on all symbols that were defined in modules compiled so far to be available in the current temporary shared object. To prevent the link editor from dropping the DT_NEEDED tag for the previously linked temporary shared object we need to override the link editors default and specify `--no-as-needed` on the command line. This is for GNU ld and GOLD ld. This addresses #10110 TODO: regression test Reviewed By: hvr Differential Revision: https://phabricator.haskell.org/D731 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: patch Priority: highest | Milestone: 7.10.1 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731 -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:7 Herbert Valerio Riedel <hvr@…>]:
In changeset:"1b7f59769052fd8193c6acc561216e070d0ca335/ghc"
...merged to ghc-7.10 via 3ea349220c3b72c97530c32c767e278570d497e4 So the only thing missing to close this ticket is a regression-test... -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: patch Priority: highest | Milestone: 7.10.1 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731 -------------------------------------+------------------------------------- Comment (by trommler): Removing patch state. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: patch Priority: highest | Milestone: 7.10.2 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731 -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"13a0d5ac95a80e8b3604e084ae189da405a47270/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="13a0d5ac95a80e8b3604e084ae189da405a47270" clarify --no-as-needed is only needed on ELF From the code it was not clear that `--no-as-needed` was not necessary on Windows. Add this fact and describe the fix for #10110 in a separate note. See audit for rGHC1b7f59769052fd8193c6acc561216e070d0ca335 raised by @thomie. Reviewed By: thomie Differential Revision: https://phabricator.haskell.org/D791 GHC Trac Issues: #10110 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.2 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731, | Phab:D791 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * owner: trommler => * priority: highest => high * differential: Phab:D731 => Phab:D731, Phab:D791 * status: patch => new -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: new Priority: high | Milestone: 7.10.2 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731, | Phab:D791 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * owner: => trommler -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:13> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: trommler Type: bug | Status: patch Priority: high | Milestone: 7.10.2 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731, | Phab:D791, Phab:D895 -------------------------------------+------------------------------------- Changes (by trommler): * status: new => patch * differential: Phab:D731, Phab:D791 => Phab:D731, Phab:D791, Phab:D895 Comment: Added regression test in Phab:D895 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.2 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731, | Phab:D791, Phab:D895 -------------------------------------+------------------------------------- Changes (by trommler): * owner: trommler => -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:15> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.2 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731, | Phab:D791, Phab:D895 -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"85bf9e49f5ab4e0681eeda2549dbd4b5faf3ef7f/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="85bf9e49f5ab4e0681eeda2549dbd4b5faf3ef7f" Add regression test for #10110. Module C imports a from Module A and b from module B. B does not import anything from A. So if ld is configured to drop DT_NEEDED tags for libraries it does not depend on no DT_NEEDED tag for the temporary shared object containing module A is recorded in the temp SO containing module B. This leads to an undefined symbol when linking the temp SO for module C. Fixes #10110. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D895 GHC Trac Issues: #10110 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:16> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10110: Compiling unit fails with Loading temp shared object failed -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.10.2 Component: Template Haskell | Version: 7.10.1-rc2 Resolution: fixed | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #10058 | Differential Revisions: Phab:D731, | Phab:D791, Phab:D895 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Merged to `ghc-7.10`! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10110#comment:17> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC