Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Can't build ghc-cabal #5

Closed
bgamari opened this issue Dec 20, 2015 · 2 comments
Closed

Can't build ghc-cabal #5

bgamari opened this issue Dec 20, 2015 · 2 comments
Assignees

Comments

@bgamari
Copy link
Collaborator

bgamari commented Dec 20, 2015

The Shake build system is currently unable to build inplace/bin/ghc-cabal and therefore can't bootstrap a fresh source tree,

$ make distclean
$ ./boot
$ ./configure
$ shake-build/build.sh 
Reading shake-build/cfg/system.config...
Reading package dependencies...
Error when running Shake build system:
* ghc/stage1/build/tmp/ghc-stage1
* OracleQ (PackageDataKey ("ghc/stage1/package-data.mk","ghc_stage1_C_SRCS"))
* ghc/stage1/package-data.mk
* ghc/stage1/package-data.mk ghc/stage1/haddock-prologue.txt ghc/stage1/setup-config ghc/stage1/build/autogen/cabal_macros.h
* libraries/transformers/dist-boot/package-data.mk
* libraries/transformers/dist-boot/package-data.mk libraries/transformers/dist-boot/haddock-prologue.txt libraries/transformers/dist-boot/setup-config libraries/transformers/dist-boot/build/autogen/cabal_macros.h
* /opt/exp/ghc/ghc/inplace/bin/ghc-cabal
Error, file does not exist and no rule available:
  /opt/exp/ghc/ghc/inplace/bin/ghc-cabal
@snowleopard
Copy link
Owner

Here is what is going on: I believe the Shake build system can build utils/ghc-cabal/dist*/build/tmp/ghc-cabal, but it just doesn't copy the resulting binary to inplace/bin/ghc-cabal.

At the moment this is a common issue for all program packages. I'll try to fix this today. I think it makes sense to place binaries directly to inplace/bin instead of building them in [...]/build/tmp first and then do the copying. I guess the old system had to do this because of the inability to properly handle dynamic dependencies with make. Please let me know if you know a reason to keep binaries in [...]/build/tmp.

Note, it is still unlikely that the build system will work on a fresh source tree after I do the fix because there are still some missing bits here and there. Currently the best way to hack on the build system is to run make first and then run the new build system on top of it.

@snowleopard snowleopard self-assigned this Dec 20, 2015
@snowleopard snowleopard mentioned this issue Dec 20, 2015
@snowleopard
Copy link
Owner

I've pushed the following fixes:

  • Build some programs directly in inplace/bin: 663ad01.
  • Bootstrap ghc-cabal via a fake package-data.mk file: c98eebc.

Please let me know if this works for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants