Package version mismatch during Hadrian build

Hello!

I’m hacking around custom GHC builds and ran into the following problem. While running ./hadrian/build, I get this error:

Error, rule finished running but did not produce file:
  _build/stage0/inplace/package.conf.d/filepath-1.4.2.2.conf
Build failed.

The aforementioned directory contains a .conf for a different version of this package, in this case it’s filepath-1.4.100.1.conf, the same version that is located in ./libraries directory. How do I fix this and make Hadrian expect the right package version? So far, only filepath and bytestring seem to be affected.

For context: I’m trying to build GHC-9.6.1 with a few custom patches of mine, none of which change anything related to this package or package versions in general.

Finally got back to this project.

Turns out, hadrian looks for the library version that comes from ghc-pkg latest <library> and not the one bundled with GHC. How do I fix this?

Probably just delete your build tree (_build) and start again (./boot && ./configure && ./hadrian/build)?

Probably just delete your build tree (_build) and start again (./boot && ./configure && ./hadrian/build)?

Did this several times. Doesn’t help, unfortunately.

Definitely took me a while to dig this. Anyhow, this seems like a Hadrian bug.

1 Like