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

No rule / file: libraries/ghc-boot/stage0/build/GHC/PackageDb.hi #148

Closed
angerman opened this issue Jan 10, 2016 · 9 comments
Closed

No rule / file: libraries/ghc-boot/stage0/build/GHC/PackageDb.hi #148

angerman opened this issue Jan 10, 2016 · 9 comments
Assignees
Labels

Comments

@angerman
Copy link
Collaborator

Here's the lastest issue the build on mac chokes on:

Error when running Shake build system:
* inplace/bin/ghc-pkg
* inplace/lib/bin/ghc-pkg
* .build/stage0/utils/ghc-pkg/build/Main.o
* libraries/ghc-boot/stage0/build/GHC/PackageDb.hi
Error, file does not exist and no rule available:
  libraries/ghc-boot/stage0/build/GHC/PackageDb.hi
@snowleopard
Copy link
Owner

Argh. Sorry for breaking so many things, should have tested the .build stuff more rigorously.

@angerman
Copy link
Collaborator Author

I'll just keep reporting. But this got me thinking, how about you use a branch for something like this next time, so master stays stable? I'm happy to test branches and report issues :) Just let me know which branch you want tested :D (travis and appveyor) builds will happen anyway, I assume.

@snowleopard
Copy link
Owner

@angerman I agree, I'll follow that route next time I'm doing a potentially breaking change.

@snowleopard
Copy link
Owner

I can reproduce this now, but the reason is unclear. Somehow ghc -M still points to .hi files in old build hierarchy. Here is the command line:

C:/msys/mingw64/bin/ghc.exe
-M
-hisuf hi
-osuf o
-hcsuf hc
-static
-hide-all-packages
-no-user-package-db
-package-db C:/msys/home/chEEtah/ghc/libraries/bootstrapping.conf
-package-id Cabal-1.23.0.0
-package-id base-4.8.0.0-38f91a7555d2f575c8807ba48f8f8c74
-package-id binary-0.8.0.0
-package-id bytestring-0.10.6.0-34350dee9a2300dc36aed53f30dfb244
-package-id containers-0.5.6.2-482fb2ad7079ecf2a7`3ae0d36f10634f
-package-id directory-1.2.2.0-3278bdbb50b7d45e81f377801f7fe4f6
-package-id filepath-1.4.0.0-0711b9d620e834224f620b655290b987
-package-id ghc-boot-8.1
-package-id process-1.2.3.0-a90544adc51cf15133cc92f593006f50
-i
-i.build/stage0/utils/ghc-pkg/build
-i.build/stage0/utils/ghc-pkg/build/autogen
-iutils/ghc-pkg
-I.build/stage0/utils/ghc-pkg/build
-I.build/stage0/utils/ghc-pkg/build/autogen
-IC:\msys\mingw64\lib\proce_ATSTvIqg2WXBzBH9rKyLH4\include
-IC:\msys\mingw64\lib\direc_99qvtH9mozB1bmqVxRYjwg\include
-IC:\msys\mingw64\lib\time_JXSg2wM2mStHlWvO55M2Ga\include
-IC:\msys\mingw64\lib\Win32_9y3u0frE63H1E2HTZUjJ63\include
-IC:\msys\mingw64\lib\bytes_6vj5EoliHgNHISHCVCb069\include
-IC:\msys\mingw64\lib\base_I5BErHzyOm07EBNpKBEeUv\include
-IC:\msys\mingw64\lib\integ_2aU3IZNMF9a7mQ0OzsZ0dS\include
-IC:\msys\mingw64\lib/include
-optP-include
-optP.build/stage0/utils/ghc-pkg/build/autogen/cabal_macros.h
-XHaskell2010
-odir .build/stage0/utils/ghc-pkg/build
-hidir .build/stage0/utils/ghc-pkg/build
-stubdir .build/stage0/utils/ghc-pkg/build
-rtsopts
-include-pkg-deps
-dep-makefile .build/stage0/utils/ghc-pkg/build/.hs-dependencies
-dep-suffix  utils/ghc-pkg/Main.hs .build/stage0/utils/ghc-pkg/build/Version.hs

I don't see where I screwed up: all paths seem to point to .build.
Still the produced .hs-dependencies file contains the following:

[...]
.build/stage0/utils/ghc-pkg/build/Main.o : libraries/Cabal/Cabal/stage0/build/Distribution/Simple/PackageIndex.hi
.build/stage0/utils/ghc-pkg/build/Main.o : libraries/ghc-boot/stage0/build/GHC/PackageDb.hi
.build/stage0/utils/ghc-pkg/build/Main.o : .build/stage0/utils/ghc-pkg/build/Version.hi

So, some paths are correct (.build/stage0/utils/ghc-pkg/build/Version.hi) but others are not (libraries/ghc-boot/stage0/build/GHC/PackageDb.hi).

@snowleopard
Copy link
Owner

Within package dependency paths appear to be correct, but those referring to other packages in the system are broken.

@snowleopard
Copy link
Owner

Here are lines from libraries/bootstrapping.conf/Cabal-1.23.0.0.conf that may be responsible:

import-dirs: C:\msys\home\chEEtah\ghc\libraries\Cabal\Cabal\stage0\build
library-dirs: C:\msys\home\chEEtah\ghc\libraries\Cabal\Cabal\stage0\build

@snowleopard
Copy link
Owner

The only workaround I see without fixing ghc-cabal first (#18) is to post-process .conf files fixing the paths. This is ugly, but we already to this with rts.conf.

snowleopard added a commit that referenced this issue Jan 10, 2016
@snowleopard
Copy link
Owner

Right. I pushed the fix. Let's see if this is enough to clean up the mess.

@snowleopard
Copy link
Owner

OK, seems to pass CI.

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

No branches or pull requests

2 participants