There is a bug in fpc ... that causes the checksum issue.
Even if there is an error related to checksum in fpc, the compiler should not raise an error.
That is why it is a bug...
if I click `Recompile Clean` in the package, the package is compiled without errors. This means the compiler sees the paths to the source files.
It sees it when you compile the package. But not when you compile another package or project that depends on that package.
What happens, afaik:
1) The package is compiled.
For that there is the "package unit" that has a uses, using all units in the package. The compiler is called with that file, and loads all the files in the uses, and compiles them all.
It writes the ppu for each such file.
2) Next package is compiled.
If the above package is in the dependency list, then for the above package the compiler will only be given the path to the ppu.
At that time the compiler can not recompile anything of the above package (and it
shouldn't need to)
But in step 1, the compiler made a mistake. One of the files ended up with a wrong checksump
Afaik that happens when there are circular references (but not sure if it happens in other cases too). One of the 2 circular file gets a checksum of the other, before the other has finished. So that checksum then will be outdated immediately.
This is why -Ur helps => compile for release. ppu will be flagged, and checksums wont be checked. But that also means: no recompile even if needed.
And compiling the package twice (not clean, just compiling changed files the 2nd time), will sometimes (but not always) fix the file that had the bad checksum.