1) I tried -gw, nothing changed.
2) I use "/etc/fpc.cfg". (I suppose this is the system default?)
Yes I am pointing to the right units, I guess:
# searchpath for units and other system dependent things
-Fu/home/ondrej/lazarus/fpc_exp/lib/fpc/3.1.1/units/
-Fu/home/ondrej/lazarus/fpc_exp/lib/fpc/3.1.1/units/$fpctarget/*
-Fu/home/ondrej/lazarus/fpc_exp/lib/fpc/3.1.1/units/$fpctarget/rtl
-gw does not change your issue that is right. It was meant an additional observation.
Anyway, yes /etc/fpc.cfg is the default. You can see that it appears in the output.
if you add the -va option to the actual compilation of your project, then you can see what files the compiler uses to build your project.
1) If the compiler is called by Lazarus, if this runs on a diff user account an fpc.cfg may exist in the user dir.
2) when -va is active compiling your project, it will show all the location it looks for the ppu, and where they are found.
So that can help ruling out that the wrong ppu are used.
I assume that the debug info for the project code works. So we can rule out that the exe was accidentally stripped, and we also know the debugger works.
I do not know if there is anything that can go wrong when specifying the OPT to make. So i do not know if the build really worked, or how to check that. That would be next, if the correct ppu have been used.