[fpc-devel] first results of using fpc resources instead of lazarus resources
Michael Van Canneyt
michael at freepascal.org
Mon Nov 30 11:18:32 CET 2009
On Mon, 30 Nov 2009, Paul Ishenin wrote:
> Michael Van Canneyt wrote:
>> Are you doing this on windows or on linux ? Can you provide a small test
>> program, so I can test ?
>
> On windows. Small test is in the attachment.
I found a hint.
When Lazbuild is used to build the project, fpcres doesn't write any output to
the console, (I verified this with strace) but exits with exit code 2:
gru:>~/lazarus/lazbuild project1.lpi
TCompiler.Compile WorkingDir="/home/michael/Documents/source/testres/"
CompilerFilename="/usr/local/bin/ppcx64" CompilerParams=" -MObjFPC -Scgi -O1
-gl -WG -vewnhi -l -Filib/x86_64-linux/
-Fu../../../fpc/lazarus/lcl/units/x86_64-linux/
-Fu../../../fpc/lazarus/lcl/units/x86_64-linux/gtk2/
-Fu../../../fpc/lazarus/packager/units/x86_64-linux/ -Fu.
-FUlib/x86_64-linux/ -oproject1 -dLCL -dLCLgtk2 project1.lpr"
[TCompiler.Compile] CmdLine="/usr/local/bin/ppcx64 -MObjFPC -Scgi -O1 -gl
-WG -vewnhi -l -Filib/x86_64-linux/
-Fu../../../fpc/lazarus/lcl/units/x86_64-linux/
-Fu../../../fpc/lazarus/lcl/units/x86_64-linux/gtk2/
-Fu../../../fpc/lazarus/packager/units/x86_64-linux/ -Fu.
-FUlib/x86_64-linux/ -oproject1 -dLCL -dLCLgtk2 project1.lpr"
Hint: Start of reading config file /home/michael/.fpc.cfg
Hint: End of reading config file /home/michael/.fpc.cfg
Free Pascal Compiler version 2.3.1 [2009/07/03] for x86_64
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling project1.lpr
Compiling resource lib/x86_64-linux/project1.or
project1.lpr(16,1) Error: Error while compiling resources
project1.lpr(16,1) Fatal: There were 1 errors compiling module, stopping
ERROR: failed compiling of project
/home/michael/Documents/source/testres/project1.lpi
gru: >
When the compiler command-line is executed directly, fpcres does output a message:
gru: >/usr/local/bin/ppcx64 -MObjFPC -Scgi -O1 -gl -WG -vewnhi -l -Filib/x86_64-linux/ -Fu../../../fpc/lazarus/lcl/units/x86_64-linux/ -Fu../../../fpc/lazarus/lcl/units/x86_64-linux/gtk2/ -Fu../../../fpc/lazarus/packager/units/x86_64-linux/ -Fu. -FUlib/x86_64-linux/ -oproject1 -dLCL -dLCLgtk2 project1.lpr
Hint: Start of reading config file /home/michael/.fpc.cfg
Hint: End of reading config file /home/michael/.fpc.cfg
Free Pascal Compiler version 2.3.1 [2009/07/03] for x86_64
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling project1.lpr
Compiling resource lib/x86_64-linux/project1.or
Error: No known file format detected for file 'lib/x86_64-linux/unit1.lfm'
project1.lpr(16,1) Error: Error while compiling resources
project1.lpr(16,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
gru: >
So it is lazarus/lazbuild (probably the TProcess class) that causes
the message to be "eaten" by somehow not treating the standard error
file descriptor correctly.
I verified that the FPC compiler does not change any of the file descriptors
when executing fpcres.
Michael.
More information about the fpc-devel
mailing list