Sign in Join

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

Mailing lists / lazarus / 2010-05

Broken cross compile build.

22 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Brad Campbell

G'day all,

For several years now I've been building alternative architectures of Lazarus and the lcl as follows:

make LCL_PLATFORM=gtk2 OPT="-gl -CX" all
make OS_TARGET=darwin CPU_TARGET=powerpc LCL_PLATFORM=carbon OPT="-gl -CX -Xd -Fl/opt/cross/MacOSX10.4u.sdk/usr/lib" all

This has recently (where recent is some time in the last 2 weeks as I only updated svn last night) stopped working and things come to a grinding halt thusly :

make[2]: Entering directory `/home/brad/devel/fpc/lazarus/ide' /opt/cross/bin/ppcrossppc -Tdarwin -Ppowerpc -XPpowerpc-darwin- -Xr -gl -dlclcarbon -Fu../lcl/units/powerpc-darwin -Fu../lcl/units/powerpc-darwin/carbon -Fu../components/codetools/units/powerpc-darwin -Fu../components/synedit/units/powerpc-darwin -Fu../components/custom -Fu../components/mpaslex -Fu../ideintf/units/powerpc-darwin -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../packager/units/powerpc-darwin -Fu../units/powerpc-darwin -Fuframes -Fu. -Fiinclude -Fiinclude/darwin -Fi../images -FE.. -FU../units/powerpc-darwin -Flinclude -Fl/etc/ld.so.conf.d/*.conf -gl -CX -Xd -Fl/opt/cross/MacOSX10.4u.sdk/usr/lib -dpowerpc lazarus.pp Warning: Option "-Xr" is ignored for the current target platform. Free Pascal Compiler version 2.4.1 [2010/02/13] for powerpc Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Darwin for PowerPC
Compiling lazarus.pp
Assembling lazarus
Compiling resource ../units/powerpc-darwin/lazarus.or Error: Can't open file '../units/powerpc-darwin/keymapshortcutdlg.lfm' Error: Error while compiling resources
Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory `/home/brad/devel/fpc/lazarus/ide' make[1]: *** [ide] Error 2
make[1]: Leaving directory `/home/brad/devel/fpc/lazarus/ide' make: *** [ide] Error 2

For whatever reason, it appears to be searching for the *.lfm files in the unit directories.

Often a simple "make all" also fails unless I do a distclean first.

Before I go digging deeply into the build-foo and doing svn bisections I thought I'd ask here in case it sets of a light bulb somewhere.

Regards,
Brad

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Mattias Gaertner
to cobines
Show quoted text 7 lines
It's reported in Mantis. http://bugs.freepascal.org/view.php?id=16389 http://bugs.freepascal.org/view.php?id=15699 The solution is to copy the needed .lfm files manually to the units directory, where FPC can find them.

That is a workaround.

Both bug reports are in the category Lazarus, but they are FPC issues. We need create to a FPC bug report otherwise they will never be fixed.

As far as I know it is side effect of Lazarus switching to using FPC resources for .lfms. You just only experienced it now. Some people, like me, have never experienced this for example.

I never saw it too.
Brad, can you compile with -va and maybe find out what is happening? Maybe you have to do a strace as well.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 16 lines
On Mon, 17 May 2010 06:41:48 +0200 cobines wrote: > It's reported in Mantis. > > http://bugs.freepascal.org/view.php?id=16389 > http://bugs.freepascal.org/view.php?id=15699 > > The solution is to copy the needed .lfm files manually to the units > directory, where FPC can find them. That is a workaround. Both bug reports are in the category Lazarus, but they are FPC issues. We need create to a FPC bug report otherwise they will never be fixed.

Why ? The .lfm files are source files, not compiled files.

You must do the same in Delphi: copy all needed .res and .dcu files to the search path.

So I don't think that this is a bug; It's a consequence of using different paths for sources and compiled files.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 28 lines
On Mon, 17 May 2010, Mattias Gaertner wrote: > On Mon, 17 May 2010 06:41:48 +0200 > cobines wrote: > >> It's reported in Mantis. >> >> http://bugs.freepascal.org/view.php?id=16389 >> http://bugs.freepascal.org/view.php?id=15699 >> >> The solution is to copy the needed .lfm files manually to the units >> directory, where FPC can find them. > > That is a workaround. > > Both bug reports are in the category Lazarus, but they are FPC > issues. We need create to a FPC bug report otherwise they will never > be fixed. Why ? The .lfm files are source files, not compiled files. You must do the same in Delphi: copy all needed .res and .dcu files to the search path. So I don't think that this is a bug; It's a consequence of using different paths for sources and compiled files.

I can't follow. Above you say the lfm is a source and now you say we should add it to the path of the compiled files.

Does that mean, that we must pass the -Fu paths as -Fo paths again?

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 37 lines
On Mon, 17 May 2010 11:14:31 +0200 (CEST) Michael Van Canneyt wrote: > > > On Mon, 17 May 2010, Mattias Gaertner wrote: > >> On Mon, 17 May 2010 06:41:48 +0200 >> cobines wrote: >> >>> It's reported in Mantis. >>> >>> http://bugs.freepascal.org/view.php?id=16389 >>> http://bugs.freepascal.org/view.php?id=15699 >>> >>> The solution is to copy the needed .lfm files manually to the units >>> directory, where FPC can find them. >> >> That is a workaround. >> >> Both bug reports are in the category Lazarus, but they are FPC >> issues. We need create to a FPC bug report otherwise they will never >> be fixed. > > Why ? The .lfm files are source files, not compiled files. > > You must do the same in Delphi: copy all needed .res and .dcu files to > the search path. > > So I don't think that this is a bug; It's a consequence of using different > paths for sources and compiled files. I can't follow. Above you say the lfm is a source and now you say we should add it to the path of the compiled files. Does that mean, that we must pass the -Fu paths as -Fo paths again?

No, I'm just saying that I don't think this is a bug in the compiler.

The compiler must be able to find the files it needs to create an executable. It's the job of the user/IDE to put the files where the compiler can find them.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 47 lines
On Mon, 17 May 2010, Mattias Gaertner wrote: > On Mon, 17 May 2010 11:14:31 +0200 (CEST) > Michael Van Canneyt wrote: > >> >> >> On Mon, 17 May 2010, Mattias Gaertner wrote: >> >>> On Mon, 17 May 2010 06:41:48 +0200 >>> cobines wrote: >>> >>>> It's reported in Mantis. >>>> >>>> http://bugs.freepascal.org/view.php?id=16389 >>>> http://bugs.freepascal.org/view.php?id=15699 >>>> >>>> The solution is to copy the needed .lfm files manually to the units >>>> directory, where FPC can find them. >>> >>> That is a workaround. >>> >>> Both bug reports are in the category Lazarus, but they are FPC >>> issues. We need create to a FPC bug report otherwise they will never >>> be fixed. >> >> Why ? The .lfm files are source files, not compiled files. >> >> You must do the same in Delphi: copy all needed .res and .dcu files to >> the search path. >> >> So I don't think that this is a bug; It's a consequence of using different >> paths for sources and compiled files. > > I can't follow. Above you say the lfm is a source and now > you say we should add it to the path of the compiled files. > > Does that mean, that we must pass the -Fu paths as -Fo paths > again? No, I'm just saying that I don't think this is a bug in the compiler. The compiler must be able to find the files it needs to create an executable. It's the job of the user/IDE to put the files where the compiler can find them.

The compiler can find them and normally puts the lfm files into the output directory.
Apparently sometimes it does not.
Maybe it has to do with the sub directory in the $R directive.

{$R forms/finddlgunit.lfm}
{$R forms/replacedlgunit.lfm}

I don't see what the IDE can do.

Mattias

Reply by email

Brad Campbell
to Mattias Gaertner: On Mon, 17 May 2010 06:41:48 +0200 That is a workaround. Both bug reports are in the…
Mattias Gaertner wrote 36 lines
On Mon, 17 May 2010 06:41:48 +0200 cobines wrote: > It's reported in Mantis. > > http://bugs.freepascal.org/view.php?id=16389 > http://bugs.freepascal.org/view.php?id=15699 > > The solution is to copy the needed .lfm files manually to the units > directory, where FPC can find them. That is a workaround. Both bug reports are in the category Lazarus, but they are FPC issues. We need create to a FPC bug report otherwise they will never be fixed. > As far as I know it is side effect of Lazarus switching to using FPC > resources for .lfms. You just only experienced it now. Some people, > like me, have never experienced this for example. I never saw it too. Brad, can you compile with -va and maybe find out what is happening? Maybe you have to do a strace as well. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

The build falls over on the first lfm file with a relative path.

[29.463] Searching file /sbin/FPCRES... not found
[29.463] Searching file /bin/fpcres... not found
[29.463] Searching file /bin/FPCRES... not found
[29.463] Searching file /usr/games/fpcres... not found [29.463] Searching file /usr/games/FPCRES... not found [29.463] Searching file /opt/cross/bin/fpcres... found [29.463] Compiling resource ../units/powerpc-darwin/lazarus.or [29.463] Calling resource compiler "/opt/cross/bin/fpcres" with "-o ../units/powerpc-darwin/lazarus.or -a powerpc -of mach-o -v "@../units/powerpc-darwin/lazarus.reslst"" as command line Debug: parsing command line parameters
Debug: parsing parameter '-o'
Debug: parsing parameter '-a'
Debug: parsing parameter '-of'
Debug: parsing parameter '-v'
Debug: parsing parameter '@../units/powerpc-darwin/lazarus.reslst' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/lcl/units/powerpc-darwin/finddlgunit.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/lcl/units/powerpc-darwin/replacedlgunit.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/lcl/units/powerpc-darwin/calendarpopup.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/frmselectprops.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/stringspropeditdlg.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/collectionpropeditform.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/graphicpropedit.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/lazstringgridedit.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/checklistboxeditordlg.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/checkgroupeditordlg.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/listviewpropedit.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/imagelisteditor.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/objectinspector.lfm' Debug: parsing parameter '../units/powerpc-darwin/keymapshortcutdlg.lfm' Debug: parsing parameter '../units/powerpc-darwin/editmsgscannersdlg.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/lcl/units/powerpc-darwin/ldockctrledit.lfm' Debug: parsing parameter '../units/powerpc-darwin/infobuild.lfm' Debug: parsing parameter '../units/powerpc-darwin/idecontexthelpedit.lfm' Debug: parsing parameter '../units/powerpc-darwin/exttooleditdlg.lfm' Debug: parsing parameter '../units/powerpc-darwin/exttooldialog.lfm' Debug: parsing parameter '../units/powerpc-darwin/aboutfrm.lfm'

<snip>

Debug: Resource information read
Debug: Trying to open file
/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/imagelisteditor.lfm... Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file
/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/objectinspector.lfm... Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file ../units/powerpc-dError: Can't open file '../units/powerpc-darwin/keymapshortcutdlg.lfm'
[30.622] Error while compiling resources
[30.622] Searching file ../units/powerpc-darwin/../units/powerpc-darwin/lazarus.o... not found

Regards,
Brad

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Mattias Gärtner
to Brad Campbell

Zitat von Brad Campbell :

Show quoted text 17 lines
[...] The build falls over on the first lfm file with a relative path. [...] [29.463] Compiling resource ../units/powerpc-darwin/lazarus.or [29.463] Calling resource compiler "/opt/cross/bin/fpcres" with "-o ../units/powerpc-darwin/lazarus.or -a powerpc -of mach-o -v "@../units/powerpc-darwin/lazarus.reslst"" as command line [...] Debug: parsing parameter '@../units/powerpc-darwin/lazarus.reslst' [...] Debug: parsing parameter '../units/powerpc-darwin/keymapshortcutdlg.lfm' [...] Debug: Trying to open file ../units/powerpc-dError: Can't open file '../units/powerpc-darwin/keymapshortcutdlg.lfm' [30.622] Error while compiling resources [...]

The paths are correct.
Just to make sure: The file units/powerpc-darwin/keymapshortcutdlg.lfm does not exist, right?

The lfm file is copied by the compiler when it compiles the keymapshortcutdlg.ppu.
Maybe the ppu file was already there, but the lfm was missing? Can you check what happens when you delete keymapshortcutdlg.ppu and then compile? Does it copy the lfm to
units/powerpc-darwin/keymapshortcutdlg.lfm?
If not you found a bug in the compiler.

Mattias

Reply by email

patspiper
to Mattias Gärtner
Mattias G?rtner wrote 11 lines
The paths are correct. Just to make sure: The file units/powerpc-darwin/keymapshortcutdlg.lfm does not exist, right? The lfm file is copied by the compiler when it compiles the keymapshortcutdlg.ppu. Maybe the ppu file was already there, but the lfm was missing? Can you check what happens when you delete keymapshortcutdlg.ppu and then compile? Does it copy the lfm to units/powerpc-darwin/keymapshortcutdlg.lfm? If not you found a bug in the compiler.

Project Inspector in Lazarus SVN has no minimize button. Its Bordericons is set to [biSystemMenu]. I added biMaximize and biMinimize and rebuilt (build+clean from IDE) to have that minimize button visible. I then reverted my changes back and rebuilt. The minimize button was still there. make all clean did not help. I fiddled a bit with the sources and reverted again. I rebuilt, and the button finally disappeared!

This could be related to the lfm being not always copied to the output folder.

Reply by email

Brad Campbell
to Mattias Gärtner: Zitat von Brad Campbell : The paths are correct. Just to make sure: The file…
Mattias G?rtner wrote
The paths are correct. Just to make sure: The file units/powerpc-darwin/keymapshortcutdlg.lfm does not exist, right?

Right

Show quoted text 7 lines
The lfm file is copied by the compiler when it compiles the keymapshortcutdlg.ppu. Maybe the ppu file was already there, but the lfm was missing? Can you check what happens when you delete keymapshortcutdlg.ppu and then compile? Does it copy the lfm to units/powerpc-darwin/keymapshortcutdlg.lfm? If not you found a bug in the compiler.

It does copy the lfm to units/powerpc-darwin/keymapshortcutdlg.lfm

It then just chokes on the next one.

Debug: parsing parameter '/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/graphicpropedit.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/lazstringgridedit.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/checklistboxeditordlg.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/checkgroupeditordlg.lfm' Debug: parsing parameter
'/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/listviewpropedit.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/imagelisteditor.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/objectinspector.lfm' Debug: parsing parameter 'keymapshortcutdlg.lfm'
Debug: parsing parameter '../units/powerpc-darwin/editmsgscannersdlg.lfm' Debug: parsing parameter '/home/brad/devel/fpc/lazarus/lcl/units/powerpc-darwin/ldockctrledit.lfm' Debug: parsing parameter '../units/powerpc-darwin/infobuild.lfm' Debug: parsing parameter '../units/powerpc-darwin/idecontexthelpedit.lfm' Debug: parsing parameter '../units/powerpc-darwin/exttooleditdlg.lfm'

<snip>

Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file
/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/listviewpropedit.lfm... Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file
/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/imagelisteditor.lfm... Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file
/home/brad/devel/fpc/lazarus/ideintf/units/powerpc-darwin/objectinspector.lfm... Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file keymapshortcutdlg.lfm... Debug: Chosen reaError: Can't open file '../units/powerpc-darwin/editmsgscannersdlg.lfm' [30.343] Error while compiling resources
[30.343] Searching file ../units/powerpc-darwin/../units/powerpc-darwin/lazarus.o... not found [30.343] Searching file ../units/powerpc-darwin/../UNITS/POWERPC-DARWIN/LAZARUS.O... not found [30.343] Searching file ../units/powerpc-darwin/lazarus.o... found [30.343] Searching file ../units/powerpc-darwin/system.o... not found [30.344] Searching file ../units/powerpc-darwin/SYSTEM.O... not found

Hrm.. it seems make distclean is leaving .ppu's in the powerpc-darwin directory. I can work around this bug by using :

find . -name *.ppu -exec rm {} +

..prior to the build.

Unfortunately when I execute :

make LCL_PLATFORM=gtk2 OPT="-gl -CX" all idepkg

I get this :

make[2]: Entering directory `/home/brad/devel/fpc/lazarus/ide' /opt/cross/bin/ppc386 -gl -dlclgtk2 -Fu../lcl/units/i386-linux -Fu../lcl/units/i386-linux/gtk2 -Fu../components/codetools/units/i386-linux -Fu../components/synedit/units/i386-linux -Fu../components/custom -Fu../components/mpaslex -Fu../ideintf/units/i386-linux -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../packager/units/i386-linux -Fu../units/i386-linux -Fuframes -Fu. -Fiinclude -Fiinclude/linux -Fi../images -FE.. -FU../units/i386-linux -Fl/usr/lib/gcc/i486-linux-gnu/4.2.4 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -gl -CX @/home/brad/.lazarus/idemake.cfg -di386 lazarus.pp Free Pascal Compiler version 2.4.1 [2010/02/13] for i386 Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for i386
Compiling lazarus.pp
Compiling /home/brad/devel/fpc/lazarus/TreeView/tv.pas Compiling /home/brad/devel/fpc/lazarus/TreeView/directorytreeview.pas directorytreeview.pas(408,4) Note: Local variable "I" not used directorytreeview.pas(49,5) Note: Private field "TDirectoryTreeview.OldNode" is never used Fatal: Can't find unit codetools used by Lazarus
Fatal: Compilation aborted
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory `/home/brad/devel/fpc/lazarus/ide' make[1]: *** [idepkg] Error 2
make[1]: Leaving directory `/home/brad/devel/fpc/lazarus/ide'

Last time this happened I worked around it by deleting ~/.lazarus and reinstalling my packages from scratch, but that's so ugly I don't even consider it a workaround.

I did a -va on this one, but after over 2000 lines of it searching every path for codetools.pp except the one it's actually in I gave up trying to trim it and post it.

The annoying thing is up until very recently (certainly well after I migrated to fpc 2.4.1) this all used to work fine.

Regards,
Brad

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Brad Campbell
to Mattias Gärtner: Zitat von Brad Campbell : The paths are correct. Just to make sure: The file…
Mattias G?rtner wrote 7 lines
The lfm file is copied by the compiler when it compiles the keymapshortcutdlg.ppu. Maybe the ppu file was already there, but the lfm was missing? Can you check what happens when you delete keymapshortcutdlg.ppu and then compile? Does it copy the lfm to units/powerpc-darwin/keymapshortcutdlg.lfm? If not you found a bug in the compiler.

Ok, the bug for this one is in my tools. I have an rsync script that updates my lazarus tree from a pristine svn checkout, and that was removing all the .lfm files from the unit paths, but leaving all the object code. (Of course this used to work prior to the change to $R). No issues, I need to fix my stuff there.

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Mattias Gärtner
to Brad Campbell: Right It does copy the lfm to units/powerpc-darwin/keymapshortcutdlg.lfm It then just…

Zitat von Brad Campbell :

Show quoted text 21 lines
Mattias G?rtner wrote: > > The paths are correct. > Just to make sure: The file > units/powerpc-darwin/keymapshortcutdlg.lfm does not exist, right? [...] > Can you check what happens when you delete keymapshortcutdlg.ppu > and then compile? Does it copy the lfm to > units/powerpc-darwin/keymapshortcutdlg.lfm? > If not you found a bug in the compiler. It does copy the lfm to units/powerpc-darwin/keymapshortcutdlg.lfm It then just chokes on the next one. [...] Hrm.. it seems make distclean is leaving .ppu's in the powerpc-darwin directory. I can work around this bug by using : find . -name *.ppu -exec rm {} + ..prior to the build.

aha!

Unfortunately when I execute : make LCL_PLATFORM=gtk2 OPT="-gl -CX" all idepkg

make LCL_PLATFORM=gtk2 OPT="-gl -CX" all idepkg

Show quoted text 22 lines
I get this : make[2]: Entering directory `/home/brad/devel/fpc/lazarus/ide' /opt/cross/bin/ppc386 -gl -dlclgtk2 -Fu../lcl/units/i386-linux -Fu../lcl/units/i386-linux/gtk2 -Fu../components/codetools/units/i386-linux -Fu../components/synedit/units/i386-linux -Fu../components/custom -Fu../components/mpaslex -Fu../ideintf/units/i386-linux -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../packager/units/i386-linux -Fu../units/i386-linux -Fuframes -Fu. -Fiinclude -Fiinclude/linux -Fi../images -FE.. -FU../units/i386-linux -Fl/usr/lib/gcc/i486-linux-gnu/4.2.4 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -gl -CX @/home/brad/.lazarus/idemake.cfg -di386 lazarus.pp Free Pascal Compiler version 2.4.1 [2010/02/13] for i386 Copyright (c) 1993-2009 by Florian Klaempfl Target OS: Linux for i386 Compiling lazarus.pp Compiling /home/brad/devel/fpc/lazarus/TreeView/tv.pas Compiling /home/brad/devel/fpc/lazarus/TreeView/directorytreeview.pas

There is no directory TreeView in the lazarus sources. I guess you added it. And I guess, you have a misconfigured package there, which adds a source path to the IDE. A package should only inherit compiled unit paths. Please check the package there. See for example a new package or the package
components/externhelp/externhelp.lpk.

(Note to myself: the search path checker should be done before 0.9.30)

Show quoted text 13 lines
directorytreeview.pas(408,4) Note: Local variable "I" not used directorytreeview.pas(49,5) Note: Private field "TDirectoryTreeview.OldNode" is never used Fatal: Can't find unit codetools used by Lazarus Fatal: Compilation aborted make[2]: *** [lazarus] Error 1 make[2]: Leaving directory `/home/brad/devel/fpc/lazarus/ide' make[1]: *** [idepkg] Error 2 make[1]: Leaving directory `/home/brad/devel/fpc/lazarus/ide' Last time this happened I worked around it by deleting ~/.lazarus and reinstalling my packages from scratch, but that's so ugly I don't even consider it a workaround.

No, no. You have probably just some wrong source paths (too many) which created duplicate ppu files.

Mattias

Reply by email

Mattias Gärtner
to Brad Campbell: Ok, the bug for this one is in my tools. I have an rsync script that updates my lazarus…

Zitat von Brad Campbell :

Show quoted text 15 lines
Mattias G?rtner wrote: > The lfm file is copied by the compiler when it compiles the > keymapshortcutdlg.ppu. > Maybe the ppu file was already there, but the lfm was missing? > Can you check what happens when you delete keymapshortcutdlg.ppu > and then compile? Does it copy the lfm to > units/powerpc-darwin/keymapshortcutdlg.lfm? > If not you found a bug in the compiler. Ok, the bug for this one is in my tools. I have an rsync script that updates my lazarus tree from a pristine svn checkout, and that was removing all the .lfm files from the unit paths, but leaving all the object code. (Of course this used to work prior to the change to $R). No issues, I need to fix my stuff there.

Hmm, this might explain the two bug reports too.

Michael, maybe we are both right: it's not a bug in fpc and not in lazarus.

Mattias

Reply by email

Brad Campbell
to Mattias Gärtner
Mattias G?rtner wrote 8 lines
> Ok, the bug for this one is in my tools. I have an rsync script that > updates my lazarus tree from a pristine svn checkout, and that was > removing all the .lfm files from the unit paths, but leaving all the > object code. (Of course this used to work prior to the change to $R). > No issues, I need to fix my stuff there. Hmm, this might explain the two bug reports too.

I guess I'm used to makefiles actually checking dependencies and creating them as required if something went missing. If any of the object files are missing, the fpc compiler re-creates them. If the resource components are missing, it throws its toys out of the pram. Is that because it does not know where the source file is so it can't re-copy the *.lfm file?

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Mattias Gärtner
to Brad Campbell

Zitat von Brad Campbell :

Show quoted text 17 lines
Mattias G?rtner wrote: >> Ok, the bug for this one is in my tools. I have an rsync script >> that updates my lazarus tree from a pristine svn checkout, and >> that was removing all the .lfm files from the unit paths, but >> leaving all the object code. (Of course this used to work prior to >> the change to $R). No issues, I need to fix my stuff there. > > Hmm, this might explain the two bug reports too. > I guess I'm used to makefiles actually checking dependencies and creating them as required if something went missing. If any of the object files are missing, the fpc compiler re-creates them. If the resource components are missing, it throws its toys out of the pram. Is that because it does not know where the source file is so it can't re-copy the *.lfm file?

AFAIK: No. It knows where they are. But it does not check the resource files. It only checks the ppu and the date of the pascal sources (unit
+ include files). This is more than was Delphi does, but maybe it could also check the resources.
You could create a feature request on the fpc bug tracker.

Mattias

Reply by email

Brad Campbell
to Mattias Gärtner: Zitat von Brad Campbell : aha! make LCL_PLATFORM=gtk2 OPT="-gl -CX" all idepkg There is…
Mattias G?rtner wrote 15 lines
There is no directory TreeView in the lazarus sources. I guess you added it. And I guess, you have a misconfigured package there, which adds a source path to the IDE. A package should only inherit compiled unit paths. Please check the package there. See for example a new package or the package components/externhelp/externhelp.lpk. (Note to myself: the search path checker should be done before 0.9.30) > Last time this happened I worked around it by deleting ~/.lazarus and > reinstalling my packages from scratch, but that's so ugly I don't even > consider it a workaround. No, no. You have probably just some wrong source paths (too many) which created duplicate ppu files.

Well, yes I copy the TreeView folder into my lazarus source tree before I compile it. It is the _only_ package I have installed manually after a completely clean lazarus install (including completely removing ~/.lazarus)

I've attached the tv.lpk here. If I've done something wrong I'd love a pointer on what it is please.

<?xml version="1.0"?>
<CONFIG>
<Package Version="3">
<Name Value="tv"/>
<CompilerOptions>
<Version Value="8"/>
<SearchPaths>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> </SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Files Count="1">
<Item1>
<Filename Value="directorytreeview.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="DirectoryTreeview"/>
</Item1>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="1">
<Item1>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)/"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

brad at bkmac:~$ cat /home/brad/.lazarus/packagefiles.xml <?xml version="1.0"?>
<CONFIG>
<UserPkgLinks Version="2" Count="2">
<Item1>
<Name Value="CodeTools"/>
<Version Major="1" Release="1"/>
<Filename Value="components/codetools/codetools.lpk"/> </Item1>
<Item2>
<Name Value="tv"/>
<Filename Value="TreeView/tv.lpk"/>
</Item2>
</UserPkgLinks>
</CONFIG>
brad at bkmac:~$

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

patspiper
to Mattias Gärtner: Zitat von Brad Campbell : AFAIK: No. It knows where they are. But it does not check the…
Mattias G?rtner wrote 5 lines
AFAIK: No. It knows where they are. But it does not check the resource files. It only checks the ppu and the date of the pascal sources (unit + include files). This is more than was Delphi does, but maybe it could also check the resources. You could create a feature request on the fpc bug tracker.

What happens in the following case:
Change lfm and build
revert the change (the lfm and pas files are now older than the ppu) and build

Reply by email

Mattias Gärtner
to patspiper

Zitat von patspiper :

Show quoted text 9 lines
On 05/17/2010 07:19 PM, Mattias G?rtner wrote: > AFAIK: No. It knows where they are. But it does not check the > resource files. It only checks the ppu and the date of the pascal > sources (unit + include files). This is more than was Delphi does, > but maybe it could also check the resources. > You could create a feature request on the fpc bug tracker. What happens in the following case: Change lfm and build

lfm is not copied. :(

Maybe it is a fpc bug after all.

revert the change (the lfm and pas files are now older than the ppu) and build

not copied.

Mattias

Reply by email

Brad Campbell
to Brad Campbell: Well, yes I copy the TreeView folder into my lazarus source tree before I compile it. It…
Mattias G?rtner wrote: > No, no. You have probably just some wrong source paths (too many) > which created duplicate ppu files.

Ok, I'm pretty sure there is a bug here.
Steps to reproduce.

rm ~/.lazarus
cp -a lazarus.clean lazarus.a
cd lazarus.a
make
lazarus
<here I simply set the ide build options to all and re-build the IDE from within lazarus. I need to do this so lazarus will create an ~/.lazarus/idemake.cfg file> cd ..
cp -a lazarus.clean lazarus.b
cd lazarus.b
make all idepkg
<snip>
make[2]: Entering directory `/home/brad/devel/fpc/lazarus.b/ide' /opt/cross/bin/ppc386 -gl -dlclgtk2 -Fu../lcl/units/i386-linux -Fu../lcl/units/i386-linux/gtk2 -Fu../components/codetools/units/i386-linux -Fu../components/synedit/units/i386-linux -Fu../components/custom -Fu../components/mpaslex -Fu../ideintf/units/i386-linux -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../packager/units/i386-linux -Fu../units/i386-linux -Fuframes -Fu. -Fiinclude -Fiinclude/linux -Fi../images -FE.. -FU../units/i386-linux -Fl/usr/lib/gcc/i486-linux-gnu/4.2.4 -Flinclude -Fl/etc/ld.so.conf.d/*.conf @/home/brad/.lazarus/idemake.cfg -di386 lazarus.pp Free Pascal Compiler version 2.4.1 [2010/02/13] for i386 Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for i386
Compiling lazarus.pp
Fatal: Can't find unit codetools used by Lazarus
Fatal: Compilation aborted
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory `/home/brad/devel/fpc/lazarus.b/ide' make[1]: *** [idepkg] Error 2
make[1]: Leaving directory `/home/brad/devel/fpc/lazarus.b/ide' make: *** [idepkg] Error 2

lazarus.clean is a pristine svn checkout.

I have to do the lazarus.a build / run to recreate my ~/.lazarus directory. No packages installed, no pre-existing configuration.

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Mattias Gaertner
to Brad Campbell
Show quoted text 14 lines
> Mattias G?rtner wrote: >> No, no. You have probably just some wrong source paths (too many) >> which created duplicate ppu files. Ok, I'm pretty sure there is a bug here. Steps to reproduce. rm ~/.lazarus cp -a lazarus.clean lazarus.a cd lazarus.a make lazarus <here I simply set the ide build options to all and re-build the IDE from within lazarus. I need to do this so lazarus will create an ~/.lazarus/idemake.cfg file>

lazbuild can create that.

./lazbuild -B --build-ide=

idemake.cfg contains the search paths to your packages. A "make clean" in the lazarus directory does *not* clean up your packages. And a "make all" in the lazarus directory does *not* compile your packages.
You have to do that yourself.
Or use lazbuild.

Show quoted text 26 lines
cd .. cp -a lazarus.clean lazarus.b cd lazarus.b make all idepkg <snip> make[2]: Entering directory `/home/brad/devel/fpc/lazarus.b/ide' /opt/cross/bin/ppc386 -gl -dlclgtk2 -Fu../lcl/units/i386-linux -Fu../lcl/units/i386-linux/gtk2 -Fu../components/codetools/units/i386-linux -Fu../components/synedit/units/i386-linux -Fu../components/custom -Fu../components/mpaslex -Fu../ideintf/units/i386-linux -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../packager/units/i386-linux -Fu../units/i386-linux -Fuframes -Fu. -Fiinclude -Fiinclude/linux -Fi../images -FE.. -FU../units/i386-linux -Fl/usr/lib/gcc/i486-linux-gnu/4.2.4 -Flinclude -Fl/etc/ld.so.conf.d/*.conf @/home/brad/.lazarus/idemake.cfg -di386 lazarus.pp Free Pascal Compiler version 2.4.1 [2010/02/13] for i386 Copyright (c) 1993-2009 by Florian Klaempfl Target OS: Linux for i386 Compiling lazarus.pp Fatal: Can't find unit codetools used by Lazarus Fatal: Compilation aborted make[2]: *** [lazarus] Error 1 make[2]: Leaving directory `/home/brad/devel/fpc/lazarus.b/ide' make[1]: *** [idepkg] Error 2 make[1]: Leaving directory `/home/brad/devel/fpc/lazarus.b/ide' make: *** [idepkg] Error 2 lazarus.clean is a pristine svn checkout.

Check if idemake.cfg points to search paths outside lazarus.clean.

I have to do the lazarus.a build / run to recreate my ~/.lazarus directory. No packages installed, no pre-existing configuration.

Mattias

Reply by email

Mattias Gaertner
to Brad Campbell: Well, yes I copy the TreeView folder into my lazarus source tree before I compile it. It…
Show quoted text 84 lines
Mattias G?rtner wrote: > There is no directory TreeView in the lazarus sources. > I guess you added it. And I guess, you have a misconfigured package > there, which adds a source path to the IDE. A package should only > inherit compiled unit paths. Please check the package there. See for > example a new package or the package components/externhelp/externhelp.lpk. > > (Note to myself: the search path checker should be done before 0.9.30) >> Last time this happened I worked around it by deleting ~/.lazarus and >> reinstalling my packages from scratch, but that's so ugly I don't even >> consider it a workaround. > > No, no. You have probably just some wrong source paths (too many) which > created duplicate ppu files. > Well, yes I copy the TreeView folder into my lazarus source tree before I compile it. It is the _only_ package I have installed manually after a completely clean lazarus install (including completely removing ~/.lazarus) I've attached the tv.lpk here. If I've done something wrong I'd love a pointer on what it is please. <?xml version="1.0"?> <CONFIG> <Package Version="3"> <Name Value="tv"/> <CompilerOptions> <Version Value="8"/> <SearchPaths> <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Parsing> <SyntaxOptions> <CStyleOperator Value="False"/> </SyntaxOptions> </Parsing> <CodeGeneration> <SmartLinkUnit Value="True"/> </CodeGeneration> <Other> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> <Files Count="1"> <Item1> <Filename Value="directorytreeview.pas"/> <HasRegisterProc Value="True"/> <UnitName Value="DirectoryTreeview"/> </Item1> </Files> <Type Value="RunAndDesignTime"/> <RequiredPkgs Count="1"> <Item1> <PackageName Value="FCL"/> <MinVersion Major="1" Valid="True"/> </Item1> </RequiredPkgs> <UsageOptions> <UnitPath Value="$(PkgOutDir)/"/> </UsageOptions> <PublishOptions> <Version Value="2"/> <IgnoreBinaries Value="False"/> </PublishOptions> </Package> </CONFIG> brad at bkmac:~$ cat /home/brad/.lazarus/packagefiles.xml <?xml version="1.0"?> <CONFIG> <UserPkgLinks Version="2" Count="2"> <Item1> <Name Value="CodeTools"/> <Version Major="1" Release="1"/> <Filename Value="components/codetools/codetools.lpk"/> </Item1> <Item2> <Name Value="tv"/> <Filename Value="TreeView/tv.lpk"/> </Item2> </UserPkgLinks> </CONFIG> brad at bkmac:~$

Looking good.

Your idemake.cfg should contain
/home/brad/devel/fpc/lazarus/TreeView/lib/i386-linux and not
/home/brad/devel/fpc/lazarus/TreeView

But according to your previous mails this seems to be not the case.

Mattias

Reply by email