Opened 3 years ago

Closed 3 years ago

#9552 closed bug (fixed)

powerpc64 little endian: dll-split: Reachable modules from DynFlags out of date

Reported by: trommler Owned by:
Priority: normal Milestone: 7.8.4
Component: Compiler Version: 7.8.3
Keywords: Cc: slyfox, bgamari
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Building ghc for powerpc64 little endian (powerpc64le) on Linux fails:

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"

Reachable modules from DynFlags out of date
Please fix compiler/ghc.mk, or building DLLs on Windows may break (#7780)
Redundant modules: Bitmap BlockId ByteCodeAsm ByteCodeInstr ByteCodeItbls CLabel Cmm CmmCallConv CmmExpr CmmInfo CmmMachOp CmmNode CmmUtils 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 FastBool Hoopl Hoopl.Dataflow InteractiveEvalTypes MkGraph PprCmm PprCmmDecl PprCmmExpr Reg RegClass SMRep StgCmmArgRep StgCmmClosure StgCmmEnv StgCmmLayout StgCmmMonad StgCmmProf StgCmmTicky StgCmmUtils StgSyn Stream
compiler/ghc.mk:640: recipe for target 'compiler/stage2/dll-split.stamp' failed

The same build, however, works for big endian powerpc64 which is also an unregisterised build via C code.

Both builds were done with GHC_DYNAMIC_PROGRAMS=YES in mk/build.mk.

Attachments (1)

.depend-v-dyn.haskell.gz (78.6 KB) - added by trommler 3 years ago.
gzipped depend file

Download all attachments as: .zip

Change History (10)

comment:1 Changed 3 years ago by slyfox

Cc: slyfox added

If you still can reproduce it, may I ask you to attach the file

compiler/stage2/build/.depend-v-dyn.haskell

itself?

It should be enough to reproduce the error on other hosts.

Changed 3 years ago by trommler

Attachment: .depend-v-dyn.haskell.gz added

gzipped depend file

comment:2 Changed 3 years ago by slyfox

Did you happen to disable ghci building on that platform or maybe you've noticed it was not enabled there (it should)?

Otherwise make does not generate a few of depends it relies on as required like this one:

compiler/stage2/build/ByteCodeGen.dyn_o : compiler/stage2/build/Bitmap.dyn_hi
compiler/stage2/build/ByteCodeGen.o : compiler/stage2/build/Bitmap.hi

comment:3 Changed 3 years ago by trommler

You are right I had GHCi disabled in mk/build.mk.

Could we get a better error message from the build system or (perhaps better) remove the respective modules from ell-split's list when building without GHCi?

comment:4 Changed 3 years ago by Sergei Trofimovich <slyfox@…>

In 2a8ea4745d6ff79d6ce17961a64d9013243fc3c6/ghc:

ghc.mk: fix list for dll-split on GHCi-less builds

To reproduce build failure it's enough to try
to build GHC on amd64 with the following setup:

    $ cat mk/build.mk
    # for #9552
    GhcWithInterpreter = NO

It gives:

    Reachable modules from DynFlags out of date
    Please fix compiler/ghc.mk, or building DLLs on Windows may break (#7780)
    Redundant modules: Bitmap BlockId ... <list of 42 modules>
    <make error>

dll-split among other things makes sure
all mentioned modules are used by DynFlags.
'#ifdef GHCI' keeps is from happening.

Patch moves those 42 modules under
'GhcWithInterpreter' guard.

Fixes Issue #9552

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

comment:5 Changed 3 years ago by slyfox

Architecture: OtherUnknown/Multiple
Milestone: 7.10.1
Resolution: fixed
Status: newclosed

I've moved all ghci-related modules under 'ifeq(ghci)' in makefile.

I think it will help you as I've got exactly the same list on GHCI-less amd64.

Please reopen if it still fails.

comment:6 Changed 3 years ago by bgamari

Cc: bgamari added

Perhaps it would be a good idea to apply this in 7.8 as well?

comment:7 Changed 3 years ago by slyfox

Yeah, it can easily be re-fixed for stable branch, but GHCi-less setup is usually our real bug :)

Do you have an arch which suffers from it in ghc-7.8?

comment:8 Changed 3 years ago by nomeata

Milestone: 7.10.17.8.4
Status: closedmerge

This patch is required to get 7.8.4 compile on arm in Debian; I hope this makes this eligible for merging into 7.8.

comment:9 Changed 3 years ago by thoughtpolice

Status: mergeclosed

Merged to 7.8.4.

Note: See TracTickets for help on using tickets.