Symlink in directory causes Cannot build: file does not exist: ghc-prim/.../Classes.hi
Trying out Linux, now, I once again can't build:
10:54:28 ~/ghc/ghc> hadrian/build --flavour=devel2 --docs=none
Up to date
| Configure package 'libiserv'
| Configure package 'haskeline'
| Configure package 'ghc-compact'
| Configure package 'unix'
| Configure package 'text'
| Configure package 'template-haskell'
| Configure package 'parsec'
| Configure package 'hpc'
| Configure package 'ghci'
| Configure package 'ghc-heap'
| Configure package 'ghc-boot'
| Configure package 'filepath'
| Configure package 'exceptions'
| Configure package 'process'
| Configure package 'directory'
| Configure package 'containers'
| Configure package 'Cabal'
| Configure package 'Cabal-syntax'
| Configure package 'bytestring'
| Configure package 'binary'
| Configure package 'ghc'
Error, file does not exist and no rule available:
/home/reisenberg/ghc/ghc/_build/stage1/libraries/ghc-prim/build/GHC/Classes.hi
I'm bootstrapping from GHC 9.4.3.
After some debugging help from @monoidal (see comments below), I've figured out that the problem is that I have a symlink in the directory in which GHC is being built. When I navigate to the actual directory, with no symlinks, then GHC builds fine.