I probably wont be able to give you a definite answer. But...
It is normal that there are sources for different OS. But only one would have been build and installed as ppu. And it is ppu that matters. At that time the compiler should not have access to the sources of the rtl.
=> Yet strangely, in your error it says "recompiling" and does not give an error that it did not find the source.
Either the error is just filtered out, or there is a further issue...
If you have any setup that compiles fpc units from within the Lazarus IDE => you will have trouble (there are cases / stuff that can be done, but it needs some more understanding, so lets just say: don't compile fpc sources from lazarus)
If you can get the error with a small(er) project (e.g. maybe just "uses clocale") and you compile it with
-va
If inside the IDE, the IDE will hide many messages, and you need to do "copy all".
So maybe do that from outside the IDE.
It will tell you every file the compiler tried to access, and if it found it or not.
So,
if you know
- what fpc you are using,
- and where that fpc should have its ppu,
- and that the source files should not be found by fpc
then you can go through that list, and check for what happens for clocale.* (and units right before).
Its a lot of work (and I wont be able to do it for you, even if you upload the entire log / sorry limited time).
You will also see what fpc.cfg it accesses, and you can check inside of them what search path are used, and if they match where that fpc should be installed.
The upside, after that, you have a better understanding how all of this works.