Opened 10 years ago

Closed 9 years ago

Last modified 15 months ago

#3678 closed bug (fixed)

rejig the build system so that dummy-ghc isn't used

Reported by: pejo Owned by:
Priority: high Milestone: 7.4.1
Component: Build System (make) Version: 6.13
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Build.mk:

# My build settings for hacking on stage 2
SRC_HC_OPTS     = -H32m -O -fasm -Rghc-timing
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O0 -DDEBUG -Wall -fexpose-all-unfoldings
GhcLibHcOpts    = -O -fasm -XGenerics
GhcLibWays      = v
SplitObjs       = NO
GhcBootLibs     = YES
HADDOCK_DOCS       = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS   = NO
BUILD_DOCBOOK_PDF  = NO

The build error:

"inplace/bin/ghc-cabal" configure --with-ghc="/Volumes/OSXSSD/ghc/ghc.full-unfoldings/inplace/bin/dummy-ghc" --with-ghc-pkg="/Volumes/OSXSSD/ghc/ghc.full-unfoldings/inplace/bin/ghc-pkg" --with-gcc="/usr/bin/gcc" --configure-option=--with-cc="/usr/bin/gcc"  --flags=stage2 --flags=ncg --flags=ghci --ghc-option=-DGHCI_TABLES_NEXT_TO_CODE --ghc-option=-DSTAGE=2 --ghc-options='-O0 -DDEBUG -Wall -fexpose-all-unfoldings' --configure-option=CFLAGS=" -m32  " --configure-option=LDFLAGS="  " -- stage2 compiler
Configuring ghc-6.13.20091119...
Warning: 'include-dirs: ../libffi/build/include' is a relative path outside of
the source tree. This will not work when generating a tarball with 'sdist'.
Warning: 'include-dirs: ../libraries/base/cbits' is a relative path outside of
the source tree. This will not work when generating a tarball with 'sdist'.
Warning: 'include-dirs: ../libraries/base/include' is a relative path outside
of the source tree. This will not work when generating a tarball with 'sdist'.
Warning: 'hs-source-dirs: cprAnalysis' directory does not exist.
ghc: unrecognised flags: -fexpose-all-unfoldings
Usage: For basic information, try the `--help' option.
make[1]: *** [compiler/stage2/package-data.mk] Error 1
make: *** [all] Error 2

Change History (10)

comment:1 Changed 10 years ago by pejo

Igloo said I should also point to bug #3556.

comment:2 Changed 10 years ago by simonpj

I have no idea what is going on here. Ian do you? -fexpose-all-unfoldings is a brand new flag, and my commit message explicitly said I hadn't tested it. It's certainly an odd thing to do to compile stage2 with that flag. (The libraries, perhaps.)

But I don't know why it should be unrecognised, unless the GHC that's being run here isn't the one in the inplace build tree.

Simon

comment:3 Changed 10 years ago by igloo

Milestone: 6.14.1
Priority: normalhigh

Yes; the problem is that when configuring the package, we use dummy-ghc, which is more-or-less the bootstrapping compiler. I think we should rejig the build system so that dummy-ghc isn't used.

comment:4 Changed 10 years ago by batterseapower

Cc: batterseapower@… added

When might this be fixed? I'm eager to use -fexpose-all-unfoldings, and my build-system fu probably isn't strong enough to do the untangling you refer to...

comment:5 Changed 10 years ago by simonpj

I bet Ian can suggest some hack to get you going. But I'm still unclear why you need compile GHC itself with -fexpose-all-unfoldings. The libraries, yes. But GHC?

Simon

comment:6 Changed 10 years ago by batterseapower

Cc: batterseapower@… removed

Er, yes - you're right. That should be GhcLibHcOpts = -fexpose-all-unfoldings, NOT GhcStage2HcOpts - that will do it for me.

Sorry for the noise!

comment:7 Changed 10 years ago by pejo

Building with GhcLibHcOpts works for me as well now, I'm not sure what I did for that to fail the first time, sorry. The priority could be lowered since this thing should mainly be useful to someone doing whole-program analysis/optimization on ghc itself.

comment:8 Changed 9 years ago by igloo

Milestone: 6.14.16.16.1
Summary: Build fails when adding -fexpose-all-unfoldings to GhcStage2HcOptsrejig the build system so that dummy-ghc isn't used

punting

comment:9 Changed 9 years ago by igloo

Resolution: fixed
Status: newclosed

Fixed, mostly by:

Sat Jan 15 15:19:27 PST 2011  Ian Lynagh <igloo@earth.li>
  * Build system improvements
  We no longer use dummy-ghc; instead we don't configure most packages
  until the stage1 compiler is available.

  We also now use Cabal for building the ghc-bin package.

  There are a couple more sanity checks too.

along with several small patches around the same time.

comment:10 Changed 15 months ago by bgamari

Component: Build SystemBuild System (make)

The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make build system to prevent confusion.

Note: See TracTickets for help on using tickets.