Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-05

Why does Lazarus insist on rebuilding the LCL?

15 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

Every time I update Lazarus, I rebuild it from commandline:

make clean all OPT='-gl'

Then when I open the start Lazarus and want to build the last project I was working on, it immediately rebuilds the enitre LCL (I thought I had just done so by using make clean all)

Free Pascal Compiler version 2.4.2 [2010/11/08] for i386 Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for i386
...
"Compiling package LCLBase 1.0.1" completed
...
Compiling lcl.pas
...
"Compiling package LCL 1.0.1" completed
Options changed, recompiling clean with -B
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.4.2 [2010/11/08] for i386 Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for i386
Compiling maskedittest.lpr
...
Linking maskedittest
457 lines compiled, 11.0 sec
3 warning(s) issued
21 hint(s) issued
5 note(s) issued
Project "maskedittest" successfully built

On numerous occasions Lazarus tends to repeat this process of rebuilding LCL base, even when I did not update and did not change any file of the LCL myself.

Why does Lazarus do this.
It seems unnecessary to me and it's driving me insane. (Rebuilding LCL takes > 1,5 min. on my ancient system)

Bart

Reply by email

Henry Vermaak
to Bart
Bart wrote 7 lines
Every time I update Lazarus, I rebuild it from commandline: make clean all OPT='-gl' Then when I open the start Lazarus and want to build the last project I was working on, it immediately rebuilds the enitre LCL (I thought I had just done so by using make clean all)

I've noticed this, too. It's quite annoying on my slow laptop.

On numerous occasions Lazarus tends to repeat this process of rebuilding LCL base, even when I did not update and did not change any file of the LCL myself.

I was wondering if this happens because compiler settings of your project are different from the ones you passed on the make command line. It would be great to have a setting to stop this behaviour, perhaps one exists already.

Henry

Reply by email

Martin
to Hans-Peter Diettrich: It may help to set all the packages to "explicit compilation". It really would be nice to…
Hans-Peter Diettrich wrote 17 lines
Bart schrieb: > Every time I update Lazarus, I rebuild it from commandline: > > make clean all OPT='-gl' > > Then when I open the start Lazarus and want to build the last project > I was working on, it immediately rebuilds the enitre LCL > (I thought I had just done so by using make clean all) It may help to set all the packages to "explicit compilation". It really would be nice to allow for rebuilding *all* packages only explicitly, without marking every single package accordingly. I had some problems myself in building Lazarus from the IDE, when at sudden some options were passed to the "normal" IDE packages, but not to e.g. the EasyDockMgr package. Is this a known issue?

Maybe packages with "$(IDEBuildOptions)" (options, tab "other"? They are given the options from "configure build Lazarus"

Reply by email

Hans-Peter Diettrich
to Bart: Every time I update Lazarus, I rebuild it from commandline: make clean all OPT='-gl' Then…
Show quoted text 7 lines
Every time I update Lazarus, I rebuild it from commandline: make clean all OPT='-gl' Then when I open the start Lazarus and want to build the last project I was working on, it immediately rebuilds the enitre LCL (I thought I had just done so by using make clean all)

It may help to set all the packages to "explicit compilation". It really would be nice to allow for rebuilding *all* packages only explicitly, without marking every single package accordingly.

I had some problems myself in building Lazarus from the IDE, when at sudden some options were passed to the "normal" IDE packages, but not to e.g. the EasyDockMgr package. Is this a known issue?

DoDi

Reply by email

Martin
to Hans-Peter Diettrich: Can you be a bit more specific? Adding $(IDEBuildOptions) to Custom options seems not to…
Hans-Peter Diettrich wrote 10 lines
Martin schrieb: > Maybe packages with "$(IDEBuildOptions)" (options, tab "other"? They > are given the options from "configure build Lazarus" Can you be a bit more specific? Adding $(IDEBuildOptions) to Custom options seems not to work, at least Show Options doesn't show the -dDoDi option I specified for the IDE.

Hm, it should...

Look for example at the SynEdit package => it has this in it's custom options.

and it I press the test button (or recompile the package / recompilation only tested as part of rebuilding the entire IDE, via the tools menu), then all the defines and options I have in "configure build lazarus" are all there for SynEdit.

Reply by email

Mattias Gaertner
to Bart: Every time I update Lazarus, I rebuild it from commandline: make clean all OPT='-gl' Then…
Show quoted text 7 lines
Every time I update Lazarus, I rebuild it from commandline: make clean all OPT='-gl' Then when I open the start Lazarus and want to build the last project I was working on, it immediately rebuilds the enitre LCL (I thought I had just done so by using make clean all)

The IDE writes to stdout why it compiles a package. Watch for lines beginning with TLazPackageGraph.

Show quoted text 10 lines
Free Pascal Compiler version 2.4.2 [2010/11/08] for i386 Copyright (c) 1993-2010 by Florian Klaempfl Target OS: Linux for i386 ... "Compiling package LCLBase 1.0.1" completed ... Compiling lcl.pas ... "Compiling package LCL 1.0.1" completed Options changed, recompiling clean with -B

Some options changed.
The "..." lines should contain more details.

Show quoted text 8 lines
[...] On numerous occasions Lazarus tends to repeat this process of rebuilding LCL base, even when I did not update and did not change any file of the LCL myself. Why does Lazarus do this. It seems unnecessary to me and it's driving me insane. (Rebuilding LCL takes > 1,5 min. on my ancient system)

Using "make clean all" compiles with standard options. Using the IDE (or lazbuild) to compile might use different options (i.e. the options in the configure build Lazarus dialog). When the IDE spots a difference between the options used last time and the current options the IDE automatically rebuilds a package. The options are stored in the packagename.compiled files. The Makefiles creates them as well.

But there is one issue:
The Makefiles do not store the OPT parameters in the .compiled files. This means if you compile with "make" the IDE does not know this and assumes the package was compiled with standard options. The result is that if you pass any extra option in the "configure build Lazarus dialog" the IDE will always recompile a package after you compiled it with make. It does that only once, because then the .compiled file is correct.

Mattias

Reply by email

Bart
to Mattias Gaertner: On Sun, 22 May 2011 14:37:34 +0200 The IDE writes to stdout why it compiles a package.…
Mattias Gaertner wrote
The IDE writes to stdout why it compiles a package. Watch for lines beginning with TLazPackageGraph.

I'll do that next time.

The "..." lines should contain more details.

It contains only the filenames that are compiled

Show quoted text 5 lines
The result is that if you pass any extra option in the "configure build Lazarus dialog" the IDE will always recompile a package after you compiled it with make. It does that only once, because then the .compiled file is correct.

I have not specified any option at all in the Lazarus "configure build dialiog"

Also I noticed that in this dialog, when I select (from advanced button) build LCL, then press build, it does exactly is after I changed one of the LCL's source files...

In the old dialog, I could do build LCL clean, but this option no longer seems to exist?

Bart

Reply by email

Mattias Gaertner
to Bart
Show quoted text 7 lines
[...] Also I noticed that in this dialog, when I select (from advanced button) build LCL, then press build, it does exactly nothing at all. This is after I changed one of the LCL's source files... In the old dialog, I could do build LCL clean, but this option no longer seems to exist?

Correct.
These are leftovers from older Lazarus versions.
You can delete them.

Mattias

Reply by email

Bart
to Mattias Gaertner

Mattias,

Show quoted text 13 lines
> Also I noticed that in this dialog, when I select (from advanced > button) build LCL, then press build, it does exactly nothing at all. > This is after I changed one of the LCL's source files... > > In the old dialog, I could do build LCL clean, but this option no > longer seems to exist? Correct. These are leftovers from older Lazarus versions. You can delete them. Mattias

I'm not sure I understand you on this.
What should I delete?

I used to be able to do a "build (clean) lcl" from within the IDE, now I cannot anymore.
I made changes to maskedit.pp (for debugging purposes) and wanted to rebuild the LCL, but after selecting the buildprofile LCL and pressing Build, nothing happend.
When I rebuilt the application, it also did not rebuild the LCL.

Obviously I'm missing something here...

So, what now?

Bart

Reply by email

Mattias Gaertner
to Bart
Show quoted text 18 lines
Mattias, >> Also I noticed that in this dialog, when I select (from advanced >> button) build LCL, then press build, it does exactly nothing at all. >> This is after I changed one of the LCL's source files... >> >> In the old dialog, I could do build LCL clean, but this option no >> longer seems to exist? > > Correct. > These are leftovers from older Lazarus versions. > You can delete them. > > Mattias > I'm not sure I understand you on this. What should I delete?

The entries about packages like LCL and IDEIntf.
Only IDE and Examples are left.
You can get the defaults by:
Close IDE, remove ~/.lazarus/miscellaneousoptions.xml.

I used to be able to do a "build (clean) lcl" from within the IDE, now I cannot anymore.

The LCL is now a normal package. It will be compiled automatically or you can open the package and click "Compile".

I made changes to maskedit.pp (for debugging purposes) and wanted to rebuild the LCL, but after selecting the buildprofile LCL and pressing Build, nothing happend.

Yes, it would be nice, if the IDE would automatically clean up the profiles.
Maybe Juha can give some clues how to do that.

When I rebuilt the application, it also did not rebuild the LCL.

When I touch maskedit the IDE recompiles the LCL.

Obviously I'm missing something here... So, what now?

Make sure you have the recent svn version and no local modifications.

Mattias

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich: I just found a reason, why this feature is problematic. When I use specific modifications…
Show quoted text 14 lines
Mattias Gaertner schrieb: >> I used to be able to do a "build (clean) lcl" from within the IDE, now >> I cannot anymore. > > The LCL is now a normal package. It will be compiled automatically or > you can open the package and click "Compile". I just found a reason, why this feature is problematic. When I use specific modifications for building the IDE, in both the IDE and LCL code, these modifications are not always appropriate for other applications. Should I nowadays use different installations, for building the IDE and applications, with different build settings for all packages?

The LCL still has only one output directory per target platform (OS+CPU+WidgetSet).
If you want to compile the LCL with various settings, you had and you still have to
a) recompile it
b) use another copy of Lazarus

Nothing has changed about this.

Show quoted text 5 lines
> Make sure you have the recent svn version and no local modifications. This is an option only for reporting bugs. Currently e.g. (Delphi compatible) docking is broken in the LCL, so that modifications are required for building the IDE and other applications.

Have you attached a test program to a bug report?

Mattias

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner: On Mon, 23 May 2011 12:22:39 +0200 The entries about packages like LCL and IDEIntf. Only…
Show quoted text 5 lines
> I used to be able to do a "build (clean) lcl" from within the IDE, now > I cannot anymore. The LCL is now a normal package. It will be compiled automatically or you can open the package and click "Compile".

I just found a reason, why this feature is problematic. When I use specific modifications for building the IDE, in both the IDE and LCL code, these modifications are not always appropriate for other applications. Should I nowadays use different installations, for building the IDE and applications, with different build settings for all packages?

Make sure you have the recent svn version and no local modifications.

This is an option only for reporting bugs. Currently e.g. (Delphi compatible) docking is broken in the LCL, so that modifications are required for building the IDE and other applications.

DoDi

Reply by email

Bart
to Mattias Gaertner: On Mon, 23 May 2011 12:22:39 +0200 The entries about packages like LCL and IDEIntf. Only…
Mattias Gaertner wrote 7 lines
> I'm not sure I understand you on this. > What should I delete? The entries about packages like LCL and IDEIntf. Only IDE and Examples are left. You can get the defaults by: Close IDE, remove ~/.lazarus/miscellaneousoptions.xml.

I will do that.

Show quoted text 5 lines
> I used to be able to do a "build (clean) lcl" from within the IDE, now > I cannot anymore. The LCL is now a normal package. It will be compiled automatically or you can open the package and click "Compile".

Will try that.

Show quoted text 7 lines
> I made changes to maskedit.pp (for debugging purposes) and wanted to > rebuild the LCL, but after selecting the buildprofile LCL and pressing > Build, nothing happend. > When I rebuilt the application, it also did not rebuild the LCL. When I touch maskedit the IDE recompiles the LCL. Make sure you have the recent svn version and no local modifications.

I did this just after updating (svn update), then make clean all, then alter lcl/maskedit.pp

Probably a glitch on my system then...

I'll try again when I have my Linux box running.

Thanks for the help/suggestions.

Bart

Reply by email

Terry A. Haimann
Bart wrote 44 lines
On 5/23/11, Mattias Gaertner wrote: >> I'm not sure I understand you on this. >> What should I delete? > > The entries about packages like LCL and IDEIntf. > Only IDE and Examples are left. > You can get the defaults by: > Close IDE, remove ~/.lazarus/miscellaneousoptions.xml. I will do that. >> I used to be able to do a "build (clean) lcl" from within the IDE, now >> I cannot anymore. > > The LCL is now a normal package. It will be compiled automatically or > you can open the package and click "Compile". Will try that. >> I made changes to maskedit.pp (for debugging purposes) and wanted to >> rebuild the LCL, but after selecting the buildprofile LCL and pressing >> Build, nothing happend. >> When I rebuilt the application, it also did not rebuild the LCL. > When I touch maskedit the IDE recompiles the LCL. > Make sure you have the recent svn version and no local modifications. I did this just after updating (svn update), then make clean all, then alter lcl/maskedit.pp Probably a glitch on my system then... I'll try again when I have my Linux box running. Thanks for the help/suggestions. Bart -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email