Opened 3 years ago

Closed 3 years ago

#9372 closed bug (duplicate)

dll-split during stage 2 compiling ghc v7.8.3 for arm_linux

Reported by: chrisfgl Owned by:
Priority: normal Milestone: 7.10.1
Component: Compiler Version: 7.8.3
Keywords: Cc: erikd
Operating System: Linux Architecture: arm
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: #8976 Differential Rev(s):
Wiki Page:

Description (last modified by rwbarton)

Trying to compile GHC 7.8.3 for ubuntu/arm. Was in Stage 1 for 8 hours before exiting with following message:

dll-split: internal error: evacuate(static): strange closure type 0
    (GHC version 7.8.3 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 (core dumped)
make: *** [all] Error 2

Change History (12)

comment:1 Changed 3 years ago by boo

Milestone: 7.8.4

comment:2 Changed 3 years ago by boo

I confirm this bug. Trying to compile GHC-7.8.3 on Raspberry Pi and get this error:

===--- building phase 0
make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for 'phase_0_builds'.
===--- building phase 1
make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for 'phase_1_builds'.
===--- building final phase
make -r --no-print-directory -f ghc.mk phase=final all
inplace/bin/dll-split compiler/stage2/build/.depend-v-p-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.3 for arm_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
compiler/ghc.mk:640: recipe for target 'compiler/stage2/dll-split.stamp' failed
make[1]: *** [compiler/stage2/dll-split.stamp] Aborted
Makefile:64: recipe for target 'all' failed
make: *** [all] Error 2

comment:3 Changed 3 years ago by rwbarton

Description: modified (diff)

Probably the same issue as #8976. Are you using gold or bfd ld?

We have a patch in preparation right now that might address this, stay tuned! But check the comments on #8976 first.

comment:4 Changed 3 years ago by boo

It seems, that I use bfd ld, but after changing link from /usr/bin/ld to ld.gold I get the same error.

comment:5 Changed 3 years ago by rwbarton

Can you try building the latest HEAD? You will probably need to use 7.6.3 as your bootstrapping compiler.

comment:6 Changed 3 years ago by boo

I started to build HEAD by GHC-7.6.3, but I have RPi with only 256 MB of RAM. It will take some time, I think 2 or 3 days...

comment:7 Changed 3 years ago by boo

Unfortunately, I got the following error:

===--- building phase 0
make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for 'phase_0_builds'.
===--- building phase 1
make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
utils/unlit/ghc.mk:19: utils/unlit/dist/build/.depend.c_asm: No such file or directory
utils/hp2ps/ghc.mk:25: utils/hp2ps/dist/build/.depend.c_asm: No such file or directory
utils/genapply/ghc.mk:27: utils/genapply/dist/build/.depend.haskell: No such file or directory
utils/genapply/ghc.mk:27: utils/genapply/dist/build/.depend.c_asm: No such file or directory
libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/build/.depend-v.haskell: No such file or directory
libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/build/.depend-v.c_asm: No such file or directory
libraries/Cabal/Cabal/ghc.mk:3: libraries/Cabal/Cabal/dist-boot/build/.depend-v.haskell: No such file or directory
libraries/Cabal/Cabal/ghc.mk:3: libraries/Cabal/Cabal/dist-boot/build/.depend-v.c_asm: No such file or directory
libraries/bin-package-db/ghc.mk:3: libraries/bin-package-db/dist-boot/build/.depend-v.haskell: No such file or directory
libraries/bin-package-db/ghc.mk:3: libraries/bin-package-db/dist-boot/build/.depend-v.c_asm: No such file or directory
libraries/hoopl/ghc.mk:3: libraries/hoopl/dist-boot/build/.depend-v.haskell: No such file or directory
libraries/hoopl/ghc.mk:3: libraries/hoopl/dist-boot/build/.depend-v.c_asm: No such file or directory
libraries/transformers/ghc.mk:3: libraries/transformers/dist-boot/build/.depend-v.haskell: No such file or directory
libraries/transformers/ghc.mk:3: libraries/transformers/dist-boot/build/.depend-v.c_asm: No such file or directory
libraries/terminfo/ghc.mk:3: libraries/terminfo/dist-boot/build/.depend-v.haskell: No such file or directory
libraries/terminfo/ghc.mk:3: libraries/terminfo/dist-boot/build/.depend-v.c_asm: No such file or directory
compiler/ghc.mk:645: compiler/stage1/build/.depend-v.haskell: No such file or directory
inplace/bin/deriveConstants --gen-header -o includes/dist-derivedconstants/header/DerivedConstants.h --tmpdir includes/dist-derivedconstants/header/ --gcc-program "/usr/bin/gcc" --gcc-flag -fno-stack-protector --gcc-flag -Iincludes --gcc-flag -Iincludes/dist --gcc-flag -Iincludes/dist-derivedconstants/header --gcc-flag -Iincludes/dist-ghcconstants/header --gcc-flag -Irts --gcc-flag -fcommon --nm-program "/usr/bin/nm"
In file included from includes/Stg.h:272:0,
                 from includes/Rts.h:30,
                 from includes/dist-derivedconstants/header/tmp.c:13:
includes/stg/SMP.h: In function ‘store_load_barrier’:
includes/stg/SMP.h:338:2: error: #error memory barriers unimplemented on this architecture
includes/stg/SMP.h: In function ‘load_load_barrier’:
includes/stg/SMP.h:358:2: error: #error memory barriers unimplemented on this architecture
Executing "/usr/bin/gcc" failed
includes/ghc.mk:167: recipe for target 'includes/dist-derivedconstants/header/DerivedConstants.h' failed
make[1]: *** [includes/dist-derivedconstants/header/DerivedConstants.h] Error 1
Makefile:64: recipe for target 'all' failed
make: *** [all] Error 2

comment:8 Changed 3 years ago by rwbarton

Thanks for testing. Hmm, how odd. This happens before dll-split gets build, so it seems that it must be due to an unrelated change in HEAD; but I can't find what that change could be.

Hopefully the LLVM mangler patch will be backported to 7.8 soon, and then you can try with that.

comment:9 Changed 3 years ago by rwbarton

The patch for #9439 isn't on the ghc-7.8 branch yet, but it seems to apply cleanly, so you can try making a clone of ghc-7.8, git cherry-pick 5895f2b8ffba72a8393e9f712461e6e5ed7ceced and then build as usual.

Last edited 3 years ago by rwbarton (previous) (diff)

comment:10 Changed 3 years ago by thoughtpolice

Milestone: 7.8.47.10.1

Moving (in bulk) to 7.10.4

comment:11 Changed 3 years ago by erikd

Cc: erikd added

comment:12 Changed 3 years ago by nomeata

Resolution: duplicate
Status: newclosed

I don’t think this is more than a duplicate of #8976, closing as such.

Note: See TracTickets for help on using tickets.