Sign in Join

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

Mailing lists / lazarus / 2011-11

How to find error from 'Error compiling resources'?

15 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

patspiper

While rebuilding Lazarus to install a converted package from Delphi, I get the following error:

Compiling lazarus.pp
Compiling resource ../units/i386-linux/lazarus.or
/home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Error: Error while compiling resources
/home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Fatal: There were 1 errors compiling module, stopping

Is it possible to get the exact error text/cause?

Thanks,
Stephano

Reply by email

cobines
to patspiper

You need to repeat the last execute of fpc in the console. Look at the build log and find the last "fpc ..." and copy/paste it to the console. You need to do it from the same directory. There should be a line with WorkingDir and then CmdLine will contain whole command line which you need to use.

cobines

Reply by email

Mattias Gaertner
to patspiper: While rebuilding Lazarus to install a converted package from Delphi, I get the following…
Show quoted text 11 lines
While rebuilding Lazarus to install a converted package from Delphi, I get the following error: Compiling lazarus.pp Compiling resource ../units/i386-linux/lazarus.or /home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Error: Error while compiling resources /home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Fatal: There were 1 errors compiling module, stopping Is it possible to get the exact error text/cause?

You can get the whole output by right clicking on the message window "Save all messages to file".

Mattias

Reply by email

patspiper
to Mattias Gaertner
Mattias Gaertner wrote 17 lines
On Sun, 20 Nov 2011 19:48:59 +0200 patspiper wrote: > While rebuilding Lazarus to install a converted package from Delphi, I > get the following error: > > Compiling lazarus.pp > Compiling resource ../units/i386-linux/lazarus.or > /home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Error: Error > while compiling resources > /home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Fatal: There > were 1 errors compiling module, stopping > > Is it possible to get the exact error text/cause? You can get the whole output by right clicking on the message window "Save all messages to file".

I used 'copy all shown and hidden messages to clipboard' which should be equivalent to "Save all messages to file". The output of the resource compilation is not there.

regular compilation messages...
<snip>
Compiling lazarus.pp
Compiling resource ../units/i386-linux/lazarus.or <- no details /home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Error: Error while compiling resources
/home/me/Programs/lazarus/lazarus-svn/ide/lazarus.pp(137,1) Fatal: There were 1 errors compiling module, stopping

Stephano

Reply by email

Paul Ishenin
to Mattias Gaertner: On Sun, 20 Nov 2011 19:48:59 +0200 You can get the whole output by right clicking on the…
Mattias Gaertner wrote
> Is it possible to get the exact error text/cause? You can get the whole output by right clicking on the message window "Save all messages to file".

The problem as I remember is that fpcres output errors into stderr which is not handled by IDE or so.

At the same time when you compile from the console you can read the error message.

Best regards,
Paul Ishenin.

Reply by email

Mattias Gaertner
to Paul Ishenin

Paul Ishenin hat am 21. November 2011 um 13:35 geschrieben:

Show quoted text 8 lines
21.11.11 15:35, Mattias Gaertner wrote: >> Is it possible to get the exact error text/cause? > > You can get the whole output by right clicking on the message window > "Save all messages to file". The problem as I remember is that fpcres output errors into stderr which is not handled by IDE or so.?

poStdErrToOutput is set. AFAIK this flag works on all platforms.? ?

At the same time when you compile from the console you can read the error message.?

Maybe the IDE stops reading the output on error and forgets to read the rest. Maybe the compiler shuts down, before the IDE can read everything. Is it possible to simulate the bug??
?
Mattias
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111121/7486c3f1/attachment.html>

Reply by email

Paul Ishenin
to Mattias Gaertner
Mattias Gaertner wrote 9 lines
> At the same time when you compile from the console you can read the > error message. Maybe the IDE stops reading the output on error and forgets to read the rest. Maybe the compiler shuts down, before the IDE can read everything. Is it possible to simulate the bug?

Add {$R *.res} to the project file twice.

Best regards,
Paul Ishenin.

Reply by email

Mattias Gaertner
to Paul Ishenin
Show quoted text 12 lines
21.11.11 21:38, Mattias Gaertner wrote: > > At the same time when you compile from the console you can read the > > error message. > > Maybe the IDE stops reading the output on error and forgets to read the > rest. > > Maybe the compiler shuts down, before the IDE can read everything. > > Is it possible to simulate the bug? Add {$R *.res} to the project file twice.

It shows

Compiling resource /path/test/lib/x86_64-linux/project1.or
project1.lpr(19,1) Error: Error while compiling resources

Is there some way to get some more information from the resource compiler?

Mattias

Reply by email

Sven Barth
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
On Tue, 22 Nov 2011 06:20:39 +0800 Paul Ishenin wrote: > 21.11.11 21:38, Mattias Gaertner wrote: >> > At the same time when you compile from the console you can read the >> > error message. >> >> Maybe the IDE stops reading the output on error and forgets to read the >> rest. >> >> Maybe the compiler shuts down, before the IDE can read everything. >> >> Is it possible to simulate the bug? > > Add {$R *.res} to the project file twice. It shows Compiling resource /path/test/lib/x86_64-linux/project1.or project1.lpr(19,1) Error: Error while compiling resources Is there some way to get some more information from the resource compiler?

fpcres itself supports a "--verbose" command, but the compiler doesn't pass this to the tool. So you'd need to have a wrapper application/script which passes that parameter as well.

Regards,
Sven

Reply by email

Giulio Bernardi
to Sven Barth

Il 18/04/2012 9.38, Sven Barth ha scritto:

Show quoted text 28 lines
Am 18.04.2012 09:32, schrieb Mattias Gaertner: > On Tue, 22 Nov 2011 06:20:39 +0800 > Paul Ishenin wrote: > >> 21.11.11 21:38, Mattias Gaertner wrote: >>> > At the same time when you compile from the console you can read the >>> > error message. >>> >>> Maybe the IDE stops reading the output on error and forgets to read the >>> rest. >>> >>> Maybe the compiler shuts down, before the IDE can read everything. >>> >>> Is it possible to simulate the bug? >> >> Add {$R *.res} to the project file twice. > > It shows > > Compiling resource /path/test/lib/x86_64-linux/project1.or > project1.lpr(19,1) Error: Error while compiling resources > > Is there some way to get some more information from the resource > compiler? fpcres itself supports a "--verbose" command, but the compiler doesn't pass this to the tool. So you'd need to have a wrapper application/script which passes that parameter as well.

Hello. IIRC, passing -v to the compiler also passes --verbose to fpcres, so a verbose fpc implies that fpcres is verbose too :)

Giulio

Show quoted text 10 lines
Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Sven Barth
to Giulio Bernardi
Giulio Bernardi wrote 36 lines
Il 18/04/2012 9.38, Sven Barth ha scritto: > Am 18.04.2012 09:32, schrieb Mattias Gaertner: >> On Tue, 22 Nov 2011 06:20:39 +0800 >> Paul Ishenin wrote: >> >>> 21.11.11 21:38, Mattias Gaertner wrote: >>>> > At the same time when you compile from the console you can read the >>>> > error message. >>>> >>>> Maybe the IDE stops reading the output on error and forgets to read >>>> the >>>> rest. >>>> >>>> Maybe the compiler shuts down, before the IDE can read everything. >>>> >>>> Is it possible to simulate the bug? >>> >>> Add {$R *.res} to the project file twice. >> >> It shows >> >> Compiling resource /path/test/lib/x86_64-linux/project1.or >> project1.lpr(19,1) Error: Error while compiling resources >> >> Is there some way to get some more information from the resource >> compiler? > > fpcres itself supports a "--verbose" command, but the compiler doesn't > pass this > to the tool. So you'd need to have a wrapper application/script which > passes > that parameter as well. Hello. IIRC, passing -v to the compiler also passes --verbose to fpcres, so a verbose fpc implies that fpcres is verbose too :)

No, it does not. I looked at the source.

Regards,
Sven

Reply by email

Giulio Bernardi
to Sven Barth

Il 18/04/2012 10.26, Sven Barth ha scritto:

Show quoted text 39 lines
Am 18.04.2012 10:14, schrieb Giulio Bernardi: > Il 18/04/2012 9.38, Sven Barth ha scritto: >> Am 18.04.2012 09:32, schrieb Mattias Gaertner: >>> On Tue, 22 Nov 2011 06:20:39 +0800 >>> Paul Ishenin wrote: >>> >>>> 21.11.11 21:38, Mattias Gaertner wrote: >>>>> > At the same time when you compile from the console you can read the >>>>> > error message. >>>>> >>>>> Maybe the IDE stops reading the output on error and forgets to read >>>>> the >>>>> rest. >>>>> >>>>> Maybe the compiler shuts down, before the IDE can read everything. >>>>> >>>>> Is it possible to simulate the bug? >>>> >>>> Add {$R *.res} to the project file twice. >>> >>> It shows >>> >>> Compiling resource /path/test/lib/x86_64-linux/project1.or >>> project1.lpr(19,1) Error: Error while compiling resources >>> >>> Is there some way to get some more information from the resource >>> compiler? >> >> fpcres itself supports a "--verbose" command, but the compiler doesn't >> pass this >> to the tool. So you'd need to have a wrapper application/script which >> passes >> that parameter as well. > > Hello. IIRC, passing -v to the compiler also passes --verbose to fpcres, > so a > verbose fpc implies that fpcres is verbose too :) No, it does not. I looked at the source.

Ops, you're right. I checked now and it is '-vd' (verbose with debug output) that passes -v to fpcres.

Giulio

Reply by email

Sven Barth
to Giulio Bernardi
Giulio Bernardi wrote 45 lines
Il 18/04/2012 10.26, Sven Barth ha scritto: > Am 18.04.2012 10:14, schrieb Giulio Bernardi: >> Il 18/04/2012 9.38, Sven Barth ha scritto: >>> Am 18.04.2012 09:32, schrieb Mattias Gaertner: >>>> On Tue, 22 Nov 2011 06:20:39 +0800 >>>> Paul Ishenin wrote: >>>> >>>>> 21.11.11 21:38, Mattias Gaertner wrote: >>>>>> > At the same time when you compile from the console you can read >>>>>> the >>>>>> > error message. >>>>>> >>>>>> Maybe the IDE stops reading the output on error and forgets to read >>>>>> the >>>>>> rest. >>>>>> >>>>>> Maybe the compiler shuts down, before the IDE can read everything. >>>>>> >>>>>> Is it possible to simulate the bug? >>>>> >>>>> Add {$R *.res} to the project file twice. >>>> >>>> It shows >>>> >>>> Compiling resource /path/test/lib/x86_64-linux/project1.or >>>> project1.lpr(19,1) Error: Error while compiling resources >>>> >>>> Is there some way to get some more information from the resource >>>> compiler? >>> >>> fpcres itself supports a "--verbose" command, but the compiler doesn't >>> pass this >>> to the tool. So you'd need to have a wrapper application/script which >>> passes >>> that parameter as well. >> >> Hello. IIRC, passing -v to the compiler also passes --verbose to fpcres, >> so a >> verbose fpc implies that fpcres is verbose too :) > > No, it does not. I looked at the source. Ops, you're right. I checked now and it is '-vd' (verbose with debug output) that passes -v to fpcres.

I also checked again. You are basically right, but only for those systems were winlike resource files are used (which are basically all systems natively supported by Lazarus, exceptions are for example DOS, OS/2, NativeNT, Haiku, BeOS and embedded targets (including NDS, GBA and Wii)).

Regards,
Sven

Reply by email

Giulio Bernardi
to Sven Barth

Il 18/04/2012 11.26, Sven Barth ha scritto:

Show quoted text 51 lines
Am 18.04.2012 11:17, schrieb Giulio Bernardi: > Il 18/04/2012 10.26, Sven Barth ha scritto: >> Am 18.04.2012 10:14, schrieb Giulio Bernardi: >>> Il 18/04/2012 9.38, Sven Barth ha scritto: >>>> Am 18.04.2012 09:32, schrieb Mattias Gaertner: >>>>> On Tue, 22 Nov 2011 06:20:39 +0800 >>>>> Paul Ishenin wrote: >>>>> >>>>>> 21.11.11 21:38, Mattias Gaertner wrote: >>>>>>> > At the same time when you compile from the console you can read >>>>>>> the >>>>>>> > error message. >>>>>>> >>>>>>> Maybe the IDE stops reading the output on error and forgets to read >>>>>>> the >>>>>>> rest. >>>>>>> >>>>>>> Maybe the compiler shuts down, before the IDE can read everything. >>>>>>> >>>>>>> Is it possible to simulate the bug? >>>>>> >>>>>> Add {$R *.res} to the project file twice. >>>>> >>>>> It shows >>>>> >>>>> Compiling resource /path/test/lib/x86_64-linux/project1.or >>>>> project1.lpr(19,1) Error: Error while compiling resources >>>>> >>>>> Is there some way to get some more information from the resource >>>>> compiler? >>>> >>>> fpcres itself supports a "--verbose" command, but the compiler doesn't >>>> pass this >>>> to the tool. So you'd need to have a wrapper application/script which >>>> passes >>>> that parameter as well. >>> >>> Hello. IIRC, passing -v to the compiler also passes --verbose to fpcres, >>> so a >>> verbose fpc implies that fpcres is verbose too :) >> >> No, it does not. I looked at the source. > > Ops, you're right. I checked now and it is '-vd' (verbose with debug > output) > that passes -v to fpcres. I also checked again. You are basically right, but only for those systems were winlike resource files are used (which are basically all systems natively supported by Lazarus, exceptions are for example DOS, OS/2, NativeNT, Haiku, BeOS and embedded targets (including NDS, GBA and Wii)).

Yes :) . But "winlike resource files" means "use fpcres". Other systems might use different resource compilers (even if they don't) , that's why there is the distinction.

Giulio

Reply by email

Mattias Gaertner
to Giulio Bernardi: Il 18/04/2012 10.26, Sven Barth ha scritto: Ops, you're right. I checked now and it is…

Giulio Bernardi hat am 18. April 2012 um 11:17 geschrieben:

[...] Ops, you're right. I checked now and it is '-vd' (verbose with debug output) that passes -v to fpcres.

Thanks for the hint.

I added a quickfix item to add that hint to the message and changed the filter to pass the lines.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120418/5b53f370/attachment.html>

Reply by email