[fpc-pascal] Better compiler error for "Invalid PPU"

Thomas Kurz fpc.2021 at t-net.ruhr
Wed Mar 11 19:29:53 CET 2026


Dear all,

I keep encountering the following compiler error message from time to time:

Fatal: Cannot find system used by fcllaz. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=P:\Lazarus\fpc\3.3.1\units\i386-win32\rtl\system.ppu..

Dividing deeper into that leads to this:

"(SYSTEM) PPU Invalid Header (no PPU at the begin)"

And when looking into the `system.ppu` file I clearly see that it starts with `PPU208`. So this is most confusing error message. Actually, both of them because the file is there and the directory is right.

The problem is almost always a version mismatch. The compiler `ppc386.exe` and the `system.ppu` are from different snapshots.

May I suggest improving these error messages to point more clearly to the actual issue. Maybe one could print "(SYSTEM) PPU Header version mismatch (PPU is ..., compiler is ...)" instead of "Invalid Header (no PPU at the begin)" ‑ which is clearly wrong.

Also the fatal compiler error could indicate the expected PPU version along with the version of the file it found instead of giving the irritating message about the wrong path.

What do others think?

Kind regards,
Thomas



More information about the fpc-pascal mailing list