Skip to content

Can't build GHC with a dynamic only GHC installation

When an installation of GHC doesn't include the vanilla "way", GHC cannot be built from this existing installation of GHC:

make[1]: *** No rule to make target /packages/ghc_x86-7.8.3-10/.self/lib/x86/ghc-7.8.3/base-4.7.0.1/Prelude.hi', needed by utils/hsc2hs/dist/build/Main.o'. Stop.

E.g. using the following mk/build.mk:

    V = 0
    GhcLibWays = dyn
    SRC_HC_OPTS = -O -H64m
    GhcStage1HcOpts = -O -fasm
    GhcStage2HcOpts = -O2 -fasm
    GhcHcOpts = -Rghc-timing
    GhcLibHcOpts = -O2

    DYNAMIC_BY_DEFAULT = YES

    NoFibWays =
    STRIP_CMD = :

Steps to reproduce:

  1. build & install GHC using above configuration
  2. rebuild GHC using above configuration, --with-ghc pointing to the installation created in step 1
Edited by Jessica Hamilton
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information