[GHC] #8976: dll-split: internal error: evacuate(static): strange closure type 0
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------+---------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1 Keywords: | Operating System: Linux Architecture: arm | Type of failure: Building GHC failed Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------+---------------------------------------- ghc-7.8.1 fails to build on Fedora ARM. This appears to be a regression compared to 7.8.1 RC2. {{{ : chmod +x inplace/bin/runghc inplace/bin/dll-split compiler/stage2/build/.depend-v-dyn.haskell "DynFlags" "Annotations Avail Bag BasicTypes BinIface Binary Bitmap BlockId BooleanFormula BreakArray BufWrite BuildTyCl ByteCodeAsm ByteCodeInstr ByteCodeItbls CLabel Class CmdLineParser Cmm CmmCallConv CmmExpr CmmInfo CmmMachOp CmmNode CmmType CmmUtils CoAxiom ConLike CodeGen.Platform CodeGen.Platform.ARM CodeGen.Platform.NoRegs CodeGen.Platform.PPC CodeGen.Platform.PPC_Darwin CodeGen.Platform.SPARC CodeGen.Platform.X86 CodeGen.Platform.X86_64 Coercion Config Constants CoreArity CoreFVs CoreLint CoreSubst CoreSyn CoreTidy CoreUnfold CoreUtils CostCentre DataCon Demand Digraph DriverPhases DsMonad DynFlags Encoding ErrUtils Exception ExtsCompat46 FamInstEnv FastBool FastFunctions FastMutInt FastString FastTypes Finder Fingerprint FiniteMap ForeignCall Hooks Hoopl Hoopl.Dataflow HsBinds HsDecls HsDoc HsExpr HsImpExp HsLit HsPat HsSyn HsTypes HsUtils HscTypes IOEnv Id IdInfo IfaceEnv IfaceSyn IfaceType InstEnv InteractiveEvalTypes Kind ListSetOps Literal LoadIface Maybes MkCore MkGraph MkId Module MonadUtils Name NameEnv NameSet OccName OccurAnal OptCoercion OrdList Outputable PackageConfig Packages Pair Panic PatSyn PipelineMonad Platform PlatformConstants PprCmm PprCmmDecl PprCmmExpr PprCore PrelInfo PrelNames PrelRules Pretty PrimOp RdrName Reg RegClass Rules SMRep Serialized SrcLoc StaticFlags StgCmmArgRep StgCmmClosure StgCmmEnv StgCmmLayout StgCmmMonad StgCmmProf StgCmmTicky StgCmmUtils StgSyn Stream StringBuffer TcEvidence TcIface TcRnMonad TcRnTypes TcType TcTypeNats TrieMap TyCon Type TypeRep TysPrim TysWiredIn Unify UniqFM UniqSet UniqSupply Unique Util Var VarEnv VarSet" dll-split: internal error: evacuate(static): strange closure type 0 (GHC version 7.8.1 for arm_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug make[1]: *** [compiler/stage2/dll-split.stamp] Aborted }}} This is the bug report! This happens on both Fedora 20 (current latest stable release) and 21 (in development). The build is against ghc-7.6.3 and llvm 3.3 and 3.4 respectively. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.2 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------------+--------------------------- Changes (by juhpetersen): * component: Compiler => Driver * milestone: => 7.8.2 Comment: Karel pointed out this post by Ben on this topic: http://bgamari.github.io/posts/2014-03-06-compiling-ghc-7.8-on-arm.html (the short version being to use the gold linker). Austin suspects it started happening after RC2 because of https://github.com/ghc/ghc/commit/abb86adf7f749b3d44887d28bc96b43c5a1e0631 which presumably started the ARM build using dynamic linking. I guess it would be good to force the ARM build to use the gold linker for dyn linking, at least when the bfd linker is "broken". -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.3 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------------+--------------------------- Changes (by nomeata): * cc: mail@… (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.3 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------------+--------------------------- Comment (by nomeata): Having this fixed in 7.8.3 would be greatly appreciated by Debian as well. Is Karel aware of this bug? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: | Owner: juhpetersen | Status: new Type: bug | Milestone: 7.8.4 Priority: normal | Version: 7.8.1 Component: Driver | Keywords: Resolution: | Operating System: Linux Differential Revisions: | Type of failure: Building GHC Architecture: arm | failed Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- Comment (by slomo): For allowing to build with gold, ticket #7452 has to be fixed too (includes patch) After that it seems to be possible to build 7.8.3 with gold by setting CONF_GCC_LINKER_OPTS_STAGE1="-fuse-ld=gold" CONF_GCC_LINKER_OPTS_STAGE2="-fuse-ld=gold" and calling configure with --with-ld=ld.gold This assumes that stage0 ghc works out of the box with its configured linker (e.g. the default system linker is still bfd, as is on Debian). And this also requires the patch from ticket #9336 I'm not 100% sure yet if the build will succeed, it's still running. But this brings us one step closer at least. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.4 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Comment (by slomo): It didn't work btw, still resulting in the same dll-split error. So although ld.gold was configured and gcc was told to use gold for stage1/stage2, and the "settings" file for everything contained these settings, something was still using bfd in the end. However whenever I checked which processes are running, it was something that would use gold. Any ideas where to look? When changing /usr/bin/ld to ld.gold it should work, but that's not an option here. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.4 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #9268 Differential Revisions: | ----------------------------------------------+--------------------------- Changes (by rwbarton): * related: => #9268 Comment: Maybe the same issue as #9268. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.4 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #9268 Differential Revisions: | ----------------------------------------------+--------------------------- Comment (by rwbarton): #9268 is fixed in HEAD, can you try building that? You will probably need to use 7.6.3 as your bootstrapping compiler. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #9268 Differential Revisions: | ----------------------------------------------+--------------------------- Changes (by erikd): * cc: erikd (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------------+--------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #9268 Differential Revisions: | ----------------------------------------------+--------------------------- Comment (by nomeata): I managed to build 7.8.4-rc1 by telling GHC to use gold as the linker. Unfortunately, this was not straight forward, as setting CONF_GCC_LINKER_OPTS_STAGE2 using this patch had knock-on-effects: {{{ Index: ghc-7.8.3.20141119/aclocal.m4 =================================================================== --- ghc-7.8.3.20141119.orig/aclocal.m4 2014-12-08 18:49:28.207171714 +0100 +++ ghc-7.8.3.20141119/aclocal.m4 2014-12-08 19:03:06.815522917 +0100 @@ -553,6 +553,10 @@ $3="$$3 -D_HPUX_SOURCE" $5="$$5 -D_HPUX_SOURCE" ;; + arm*) + # On arm, link using gold + $3="$$3 -fuse-ld=gold" + ;; esac # If gcc knows about the stack protector, turn it off. }}} See #9873 for these problems and my (work-around-quality) patch.
I guess it would be good to force the ARM build to use the gold linker for dyn linking, at least when the bfd linker is "broken".
Probably yes. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------+--------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: #9268 | Differential Revisions: ----------------------------------------+--------------------------------- Comment (by erikd): I've attached an updated version of the patch that I have tested on my own personal armhf build box. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 ----------------------------------------+--------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: #9268 | Differential Revisions: ----------------------------------------+--------------------------------- Comment (by erikd): As @rwbarton pointed out in D715, ghc does not call ld directly, but cabal might (via the ld fields in the ghc settings file). Instead of setting `ld command` to `/usr/bin/ld` it should probably be set to `/usr/bin/ld.gold` and the cross compile issue has to be looked at as well. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:15> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC | Test Case: failed | Blocking: Blocked By: | Differential Revisions: Phab:D715 Related Tickets: #9268 | -------------------------------------+------------------------------------- Changes (by thomie): * differential: => Phab:D715 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:16> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC | Test Case: failed | Blocking: Blocked By: | Differential Revisions: Phab:D715 Related Tickets: #9268 | -------------------------------------+------------------------------------- Comment (by erikd): The `ld.gold` linker seems to be the right thing to use when targeting Linux and android, but what about iOS? Should that just be left to use plain `ld`? Maybe @rwbarton knows. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:17> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC | Test Case: failed | Blocking: Blocked By: | Differential Revisions: Phab:D715 Related Tickets: #9268 | -------------------------------------+------------------------------------- Comment (by erikd): When target iOS, Apple has its own linker. `ld.gold` should only be used when targeting arm/linux and arm/android. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:18> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC | Test Case: failed | Blocking: Blocked By: | Differential Revisions: Phab:D715 Related Tickets: #9268 | -------------------------------------+------------------------------------- Comment (by Erik de Castro Lopo <erikd@…>): In [changeset:"71fcc4c096ec0b575522e4c2d0104ef7a71a13c5/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="71fcc4c096ec0b575522e4c2d0104ef7a71a13c5" Use the gold linker for linux/ARM and android/ARM targets. Fixes #8976 and #9873 by making use of the Binutils ld.gold linker explicit whenever the target is linux/ARM or android/ARM. This does not affect iOS where Apple provides its own linker. In order to achieve this, we need to add `-fuse-ld=gold` to the SettingsCCompilerLinkFlags setting and set SettingsLdCommand to `ld.gold` (or `${target}-ld.gold` when cross-compiling). In addition, simplifying the use of `$(CONF_GCC_LINKER_OPTS_STAGEn)`. This patch was tested by ensuring that the following worked as expected: * Native builds on linux/x86_64 (nothing changed). * Native builds on linux/arm (and uses the gold linker). * Linux to linux/arm cross compiles (and uses the cross gold linker). Contributions by Ben Gamari, Joachim Breitner and Reid Barton. Reviewers: nomeata, bgamari, austin, rwbarton Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D715 GHC Trac Issues: #8976 #9873 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:19> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC | Test Case: failed | Blocking: Blocked By: | Differential Revisions: Phab:D715 Related Tickets: #9268 | -------------------------------------+------------------------------------- Changes (by erikd): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:20> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.12.1 Component: Driver | Version: 7.8.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC | Test Case: failed | Blocking: Blocked By: | Differential Revisions: Phab:D715 Related Tickets: #9268 | -------------------------------------+------------------------------------- Changes (by erikd): * status: closed => merge -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:21> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8976: dll-split: internal error: evacuate(static): strange closure type 0 -------------------------------------+------------------------------------- Reporter: juhpetersen | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Driver | Version: 7.8.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: arm Type of failure: Building GHC | Test Case: failed | Blocking: Blocked By: | Differential Revisions: Phab:D715 Related Tickets: #9268 | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * milestone: 7.12.1 => 7.10.1 Comment: These were merged into `ghc-7.10`, thanks Erik! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8976#comment:22> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC