Today, I upgraded my repo to GHC 9.2.4. As part of it, cabal tried to build hspec-2.9.7, which requires ghc library. So, it builds ghc-9.2.4, and there was a problem.
First, it says:
Error: cabal-3.8.1.0: The program 'alex' is required but it could not be
found
so I did cabal install alex and retry.
Then, it says:
Error: cabal-3.8.1.0: The program 'happy' is required but it could not be
found
Something was fishy, but anyway I did cabal install happy and proceeded. Note that I never needed to install either alex or happy before when building hspec.
The next build gave off tons of errors like:
GHC/Builtin/Names.hs:2073:2: error:
fatal error: primop-vector-uniques.hs-incl: No such file or directory
2073 |
| ^
|
2073 |
| ^
compilation terminated.
GHC/Builtin/PrimOps.hs:67:2: error:
fatal error: primop-data-decl.hs-incl: No such file or directory
67 |
| ^
|
67 |
| ^
compilation terminated.
(...continues like this)
After hours of debug later, I found some clue: version bounds on process package (process >= 1.6.14) is causing the problem. Apparently, default ghc cannot be used with other versions of process.
Now I am wondering why
ghcpackage cannot be built manuallyghcpackage requires the specific version of boot libraries
Why is it so picky to deal with?