[Lazarus] LCL recompilation

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Feb 3 14:16:43 CET 2011


Mattias Gaertner schrieb:

> The LCL is only recompiled if needed, that means:
> If the project defines another target (widget/os/cpu) and the LCL was
> not yet compiled for that target, the LCL will be recompiled.
> Or if you change the compiler, e.g. you switch from 2.4.2 to 2.5.1.
> Or if you change the source of the LCL.
> Or if you change the IDEBuildOptions.

How can I find out the reason for the rebuild, in detail when different 
build options are involved? When the former procedure missed to find 
applicable compiled units, it simply rejected to proceed, and I could 
rebuild the LCL manually with known settings. Nowadays I'm somewhat 
lost, and most rebuilds don't complete so that I have to restart from 
"make clean all" :-(

Most recompilations stop with "file not found" errors, with different 
files. Since the files exist, and are found by the IDE, I assume that 
search path options are involved.

> If you spot a recompile without need please report the bug.

What information should I include, so that a bug report makes sense?


>> Is it possible to "fix" the LCL compilation (i.e. no implied rebuild)?
> 
> Since the LCL is a normal package, you can open it and set the
> automatic rebuild to manually.
> This setting is stored in the lpk.

Fine, I'll test that immediately :-)


>> Is it possible to use the Lazarus.lpi project for testing changes to the 
>> LCL or IDE interface? Since this project does *not* recompile the LCL, 
>> how can the LCL be rebuilt for such testing, without recompilation of 
>> the current IDE?
> 
> The lazarus.lpi has disabled compile in its compiler options. You can
> compile via the Tools / Build Lazarus.

How do I build a new IDE, without overwriting the old (working) one?

> To test changes to the LCL/IDEIntf without recompiling the IDE, create
> a project and add IDEIntf as requirement to the project.

Thanks, this might help to spot above "file not found" errors.


>> Is it possible to have different LCL versions, for the IDE and other 
>> projects? Rebuilding the IDE, e.g. to add or remove packages, should be 
>> possible without adding eventual modifications to the LCL. I'd like to 
>> have a single stable IDE on my system, that is never affected by 
>> exploring different SVN branches or other local changes to the codebase.
> 
> Use two different lazarus source directories and the --pcp switch.

This is what I do, but I feel lost in finding the involved config files.

Currently I have an compiler in an PP directory, and more in several FPC 
subdirectories. And one in the Lazarus directory, containing all the 
needed build tools, and this one also is in the system Path. It's hard 
to make such an compiler work, because "make install" does not install 
all the build tools nor the source files, and also doesn't create an 
usable fpc.cfg file. All this requires much manual reconfiguration, and 
that's why I suspect some problems in my configuration.

I already tried to set up another user, but this didn't eliminate all 
dependencies on other parts of the common installation (0.9.28?). That's 
why I would like to use a complete installation of some FPC version 
(>2.2.4), that is usable with the Lazarus trunk and 0.30 branch.


>> Is it possible to have different debug settings, for projects and the 
>> LCL? 
> 
> The LCL is compiled separately from the project and uses its own
> compiler settings. Therefore the debug and optimization settings of the
> project are not applied to the LCL.

Hmm, then I wonder why after "make clean all" the LCL is recompiled 
later. I already checked the environment options, to match the "make" 
options, but I'm not really sure. It would be nice to have some 
indication, which config files etc. are used by "make", so that the IDE 
can be configured to use the same settings.

IOW I'm happy to have got Lazarus and LCL compile and work, somehow, but 
I'm not sure how this really is achieved, and whether the same settings 
are used in my various Lazarus directories.


>> Code navigation (goto declaration...) and stepping through LCL 
>> code, down to the widgetset level, seems to require a debug version of 
>> the LCL.
> 
> Code navigation ignores all debug settings.

But what's missing then, when I cannot go to lower level source code in 
the IDE? Currently I cannot follow the call chain (go to declaration) 
into the win32 (target) specific source files.

DoDi





More information about the Lazarus mailing list