Sign in Join

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

Mailing lists / lazarus / 2011-06

Problem using packages

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys
to Hans-Peter Diettrich: When I try to run the examples/EasyTree/EasyDocking project, the following messages…

I can add to the list of package problems. Since the new "build modes and macros" was introduced, I often make changes to files in packages; recompile the project, but the package never detected that a file it contains has changed - thus my new binary is not as "new" as I thought. And yes, every one of my packages contains _all_ the files that it is supposed to manage - that includes include (*.inc) files. This has happened quite a lot to me so far. So much so, that I have reverted some of my projects to just use unit paths instead of packages (like what was done in Delphi IDE). The build process is much more reliable then. My other choice is to go back to the previous stable 0.9.28.x Lazarus IDE.

And to make matters worse, this is with the "stable" 0.9.30.1 Lazarus IDE, not the unstable trunk.

I have tried to debug the issue and see if there is some or other reproducable steps to follow... but I am yet to find it. Issues with packages so far are quite random - making the frustration even worse.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich: When I try to run the examples/EasyTree/EasyDocking project, the following messages…
When I try to run the examples/EasyTree/EasyDocking

Maybe you mean examples/dockmanager/easytree/easydocking.lpi ?

It compiles here.

Show quoted text 17 lines
project, the following messages appear (fpc 2.4.2): "Compiling package FCL 1.0.1" completed "Compiling package LCLBase 1.0.1" completed "Compiling package LCL 1.0.1" completed "Compiling package EasyDockMgr 1.0" completed Options changed, recompiling clean with -B PPU Loading D:\git2\lazarus\examples\dockmanager\lib\i386-win32\easydocksite.ppu PPU Source: easydocksite.pas not found PPU Source: zoneheader.inc not found PPU Source: easy_dock_images.lrs time 2010/12/13 14:27:20 * ..\package\easydockmgr.pas(10,5) Fatal: Can't find unit EasyDockSite used by EasyDockMgr What can be wrong, forcing "Options changed..."?

"Options changed" means the compiler parameters of last and current build differ. The IDE writes more details to stdout (--debug-log).

Show quoted text 7 lines
The console output shows (before above messages?): TProject.DoLoadStateFile Statefile not found: D:\git2\lazarus\examples\dockmanager\easytree\easydocking.compiled TMainIDE.CheckIfPackageNeedsCompilation No state file for Project Then the recompile -B is invoked.

The state file contains the last compiler parameters. If there is no state file then the IDE does not know the last params, so it assumes the worst and compiles with -B.

Show quoted text 13 lines
Some more strange messages from the console: PPU Loading D:\git2\lazarus\examples\dockmanager\lib\i386-win32\easydocksite.ppu PPU Source: easydocksite.pas not found PPU Source: zoneheader.inc not found File easy_dock_images.lrs is newer than PPU file D:\git2\lazarus\examples\dockmanager\lib\i386-win32\easydocksite.ppu PPU Source: easy_dock_images.lrs time 2010/12/13 14:27:20 * easydocksite.pas(12,23) Fatal: Can't find unit EasyDockSite used by EasyDockMgr How can a file from 2010 be newer than a just compiled one?

Maybe you are looking at the wrong easy_dock_images.lrs? The IDE does not check/warn for ambiguous include files.

No such problem occurs with a different --pcp (not the one Lazarus was built with), same compiler. I'd understand when problems occur with different options in *different* configs, but different options in the *same* config???

Mattias

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: I can add to the list of package problems. Since the new "build modes and macros" was…
Show quoted text 17 lines
I can add to the list of package problems. Since the new "build modes and macros" was introduced, I often make changes to files in packages; recompile the project, but the package never detected that a file it contains has changed - thus my new binary is not as "new" as I thought. And yes, every one of my packages contains _all_ the files that it is supposed to manage - that includes include (*.inc) files. This has happened quite a lot to me so far. So much so, that I have reverted some of my projects to just use unit paths instead of packages (like what was done in Delphi IDE). The build process is much more reliable then. My other choice is to go back to the previous stable 0.9.28.x Lazarus IDE. And to make matters worse, this is with the "stable" 0.9.30.1 Lazarus IDE, not the unstable trunk. I have tried to debug the issue and see if there is some or other reproducable steps to follow... but I am yet to find it. Issues with packages so far are quite random - making the frustration even worse.

I know bug reports about compiling too much, not too less.

Can you give more details?

The age is checked in
packager/packagesystem.pas at the end of function
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile.
To see what files are checked you can insert the
following line in front of the
"if FileExistsCached(CurFile.Filename)"

debugln(['TLazPackageGraph.CheckIfPackageNeedsCompilation CurFile.Filename="',CurFile.Filename,'"
Exists=',FileExistsUTF8(CurFile.Filename),'
NewerThanStateFile=',StateFileAge<FileAgeCached(CurFile.Filename)]);

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner
Mattias Gaertner wrote
I know bug reports about compiling too much, not too less.

:-) I guess I always have to be different.

Show quoted text 6 lines
The age is checked in packager/packagesystem.pas at the end of function TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile. To see what files are checked you can insert the following line in front of the "if FileExistsCached(CurFile.Filename)"

Thanks for the hints. I'll play around with that area of the IDE and see what I can find.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Hans-Peter Diettrich

When I try to run the examples/EasyTree/EasyDocking project, the following messages appear (fpc 2.4.2):

"Compiling package FCL 1.0.1" completed
"Compiling package LCLBase 1.0.1" completed
"Compiling package LCL 1.0.1" completed
"Compiling package EasyDockMgr 1.0" completed
Options changed, recompiling clean with -B
PPU Loading
D:\git2\lazarus\examples\dockmanager\lib\i386-win32\easydocksite.ppu PPU Source: easydocksite.pas not found
PPU Source: zoneheader.inc not found
PPU Source: easy_dock_images.lrs time 2010/12/13 14:27:20 * ..\package\easydockmgr.pas(10,5) Fatal: Can't find unit EasyDockSite used by EasyDockMgr

What can be wrong, forcing "Options changed..."?

The console output shows (before above messages?):

TProject.DoLoadStateFile Statefile not found:
D:\git2\lazarus\examples\dockmanager\easytree\easydocking.compiled TMainIDE.CheckIfPackageNeedsCompilation No state file for Project

Then the recompile -B is invoked.

Some more strange messages from the console:

PPU Loading
D:\git2\lazarus\examples\dockmanager\lib\i386-win32\easydocksite.ppu PPU Source: easydocksite.pas not found
PPU Source: zoneheader.inc not found
File easy_dock_images.lrs is newer than PPU file
D:\git2\lazarus\examples\dockmanager\lib\i386-win32\easydocksite.ppu PPU Source: easy_dock_images.lrs time 2010/12/13 14:27:20 * easydocksite.pas(12,23) Fatal: Can't find unit EasyDockSite used by EasyDockMgr

How can a file from 2010 be newer than a just compiled one?

No such problem occurs with a different --pcp (not the one Lazarus was built with), same compiler. I'd understand when problems occur with different options in *different* configs, but different options in the *same* config???

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich: That explains the rebuild, but not why it fails. Unlikely, because: with same Lazarus…
Show quoted text 22 lines
Mattias Gaertner schrieb: > The state file contains the last compiler parameters. If there is no > state file then the IDE does not know the last params, so it assumes > the worst and compiles with -B. That explains the rebuild, but not why it fails. >> How can a file from 2010 be newer than a just compiled one? > > Maybe you are looking at the wrong easy_dock_images.lrs? > The IDE does not check/warn for ambiguous include files. Unlikely, because: >> No such problem occurs with a different --pcp (not the one Lazarus was >> built with), same compiler. I'd understand when problems occur with >> different options in *different* configs, but different options in the >> *same* config??? with same Lazarus directory and other pathes.

Yes, but I doubt that the compiler sees ghosts.
If the compiler says it sees a newer include file, then check the include path and compile with -vut.

Mattias

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner: On Mon, 06 Jun 2011 12:28:29 +0200 Maybe you mean…
The state file contains the last compiler parameters. If there is no state file then the IDE does not know the last params, so it assumes the worst and compiles with -B.

That explains the rebuild, but not why it fails.

> How can a file from 2010 be newer than a just compiled one? Maybe you are looking at the wrong easy_dock_images.lrs? The IDE does not check/warn for ambiguous include files.

Unlikely, because:

> No such problem occurs with a different --pcp (not the one Lazarus was > built with), same compiler. I'd understand when problems occur with > different options in *different* configs, but different options in the > *same* config???

with same Lazarus directory and other pathes.

DoDi

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner: On Mon, 06 Jun 2011 13:53:55 +0200 Yes, but I doubt that the compiler sees ghosts. If the…
Show quoted text 9 lines
>>> No such problem occurs with a different --pcp (not the one Lazarus was >>> built with), same compiler. I'd understand when problems occur with >>> different options in *different* configs, but different options in the >>> *same* config??? > with same Lazarus directory and other pathes. Yes, but I doubt that the compiler sees ghosts. If the compiler says it sees a newer include file, then check the include path and compile with -vut.

I gave up and now I'm using the config that happend to work.

DoDi

Reply by email