[Lazarus] Strange problem compiling IDE

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Mar 26 23:57:21 CEST 2017

On Sun, 26 Mar 2017 22:11:11 +0100
C Western via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> Warning: Recompiling Expr, checksum changed for spe {impl}
> Expr.pas(78,12) Fatal: Can't find unit Expr used by FormGrid
> It was triggered by adding spe from numlib in the fpc rtl to one of the 
> units in a component that is in a package I added to the IDE (FormGrid). 
> My application using the same set of component components compiles fine. 
> If I remove the dependence on spe the IDE compiles fine. With spe in, 
> both the Expr.pas and FormGrid.pas are compiled fine as part of the 
> build process when the packages they are associated with are compiled.
> Running the IDE compilation with -vt to try and diagnose the problem is 
> not that helpful because of the volume of output, but I can see that 
> spu.ppu is only looked for in a few places, not the standard place for 
> all the fpc packages (which certainly do feature in many other searches.)
> Any hints as to how to diagnose this? Why is it trying to re-compile 
> stuff that has already been compiled earlier in the build process for 
> the IDE?

The first thing is indeed to check with -vt that the right files are
used. For example check for unit and include files with same names.

Second: To avoid the duplicate-include-file problem the fpc units must
be compiled with -Ur. Did you compile fpc on your own?

You could try adding -Ur to the Lazarus package. If this fixes your
problem you definitely have somewhere a duplicate include file.

And last you may found have a compiler bug, triggered by uses cycles
between units. This can often be remedied by compiling a package twice.


More information about the Lazarus mailing list