Sign in Join

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

Mailing lists / fpc-devel / 2004-08

FPC CVS breaks Lazarus build within IDE

10 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

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

Tony Maro

I just updated my FPC cvs today.
My last update was 3 or 4 days ago.
I haven't updated Lazarus in a week or so.

The latest FPC update breaks building Lazarus from inside the IDE. For those familiar, if you try to install a package, Lazarus will optionally rebuild itself. Now it will either freeze or crash when you try to do this.

I tried to get a crash, but lately only got the freeze. Here's the last console out from Lazarus when it stops responding:

TPascalParserTool.BuildTree B OnlyIntf=False project1.lpr TMainIDE.DoNewEditorFile end unit1.pas
TMainIDE.DoNewProject end
[TExternalToolList.Run] /usr/bin/make ide OPT="-Cn" Xlib: sequence lost (0x10200 > 0x5c9a) in reply type 0x10! Xlib: sequence lost (0x10000 > 0x5c9a) in reply type 0x10!

I know this isn't a Lazarus list, but like I said, I haven't changed Lazarus code that worked on the CVS from a few days ago, so I assume it's an FPC issue.

Building from the console with make works fine. There was some recent discussion about this regarding Win32 building, but this is in Linux that I'm experiencing it.

Thanks,
Tony

Reply by email

Michael Van Canneyt
to Tony Maro
Tony Maro wrote 25 lines
I just updated my FPC cvs today. My last update was 3 or 4 days ago. I haven't updated Lazarus in a week or so. The latest FPC update breaks building Lazarus from inside the IDE. For those familiar, if you try to install a package, Lazarus will optionally rebuild itself. Now it will either freeze or crash when you try to do this. I tried to get a crash, but lately only got the freeze. Here's the last console out from Lazarus when it stops responding: TPascalParserTool.BuildTree B OnlyIntf=False project1.lpr TMainIDE.DoNewEditorFile end unit1.pas TMainIDE.DoNewProject end [TExternalToolList.Run] /usr/bin/make ide OPT="-Cn" Xlib: sequence lost (0x10200 > 0x5c9a) in reply type 0x10! Xlib: sequence lost (0x10000 > 0x5c9a) in reply type 0x10! I know this isn't a Lazarus list, but like I said, I haven't changed Lazarus code that worked on the CVS from a few days ago, so I assume it's an FPC issue. Building from the console with make works fine. There was some recent discussion about this regarding Win32 building, but this is in Linux that I'm experiencing it.

The culprit is probably TProcess. I split out TProcess in Win32/unix parts, and did some major rewriting under Linux. However, all test programs ran fine, so I assumed it was OK to commit. I didn't test lazarus, however.

Can you do the following:

1. Start lazarus under strace:

strace -f -o laz.log lazarus

2. Let the IDE rebuild itself. If it freezes, kill it.

3. Send me the output of strace. Preferably only the part that appears around the Fork() call used to call 'make'. (the log may be HUGE)

Michael.

Reply by email

Mattias Gaertner
to Tony Maro: I just updated my FPC cvs today. My last update was 3 or 4 days ago. I haven't updated…
Show quoted text 8 lines
I just updated my FPC cvs today. My last update was 3 or 4 days ago. I haven't updated Lazarus in a week or so. The latest FPC update breaks building Lazarus from inside the IDE. For those familiar, if you try to install a package, Lazarus will optionally rebuild itself. Now it will either freeze or crash when you try to do this.

I spotted some things, that maybe related and may help someone to fix the bug:
If you change something in one of the interfaces of the low level LCL units like graphics.pp, the current fpc 1.9.5 then gives an internal error lcl/graphics.pp(378,1) Fatal: Internal error 200306067 or hangs up (consuming mem till dead), preferable in intfgraphics.pas or gtkwidgetset.pas.
Rebuilding the LCL clean compiles normally, so apparently fpc does not like some of its ppu files.
I was not able to reproduce this in a smaller example.

Show quoted text 17 lines
I tried to get a crash, but lately only got the freeze. Here's the last console out from Lazarus when it stops responding: TPascalParserTool.BuildTree B OnlyIntf=False project1.lpr TMainIDE.DoNewEditorFile end unit1.pas TMainIDE.DoNewProject end [TExternalToolList.Run] /usr/bin/make ide OPT="-Cn" Xlib: sequence lost (0x10200 > 0x5c9a) in reply type 0x10! Xlib: sequence lost (0x10000 > 0x5c9a) in reply type 0x10! I know this isn't a Lazarus list, but like I said, I haven't changed Lazarus code that worked on the CVS from a few days ago, so I assume it's an FPC issue. Building from the console with make works fine. There was some recent discussion about this regarding Win32 building, but this is in Linux that I'm experiencing it.

Mattias

Reply by email

Vincent Snijders
to Michael Van Canneyt: The culprit is probably TProcess. I split out TProcess in Win32/unix parts, and did some…
Show quoted text 47 lines
On Fri, 13 Aug 2004, Tony Maro wrote: > I just updated my FPC cvs today. > My last update was 3 or 4 days ago. > I haven't updated Lazarus in a week or so. > > The latest FPC update breaks building Lazarus from inside the IDE. For > those familiar, if you try to install a package, Lazarus will optionally > rebuild itself. Now it will either freeze or crash when you try to do this. > > I tried to get a crash, but lately only got the freeze. Here's the last > console out from Lazarus when it stops responding: > > TPascalParserTool.BuildTree B OnlyIntf=False project1.lpr > TMainIDE.DoNewEditorFile end unit1.pas > TMainIDE.DoNewProject end > [TExternalToolList.Run] /usr/bin/make ide OPT="-Cn" > Xlib: sequence lost (0x10200 > 0x5c9a) in reply type 0x10! > Xlib: sequence lost (0x10000 > 0x5c9a) in reply type 0x10! > > I know this isn't a Lazarus list, but like I said, I haven't changed > Lazarus code that worked on the CVS from a few days ago, so I assume > it's an FPC issue. > > Building from the console with make works fine. There was some recent > discussion about this regarding Win32 building, but this is in Linux > that I'm experiencing it. The culprit is probably TProcess. I split out TProcess in Win32/unix parts, and did some major rewriting under Linux. However, all test programs ran fine, so I assumed it was OK to commit. I didn't test lazarus, however. Can you do the following: 1. Start lazarus under strace: strace -f -o laz.log lazarus 2. Let the IDE rebuild itself. If it freezes, kill it. 3. Send me the output of strace. Preferably only the part that appears around the Fork() call used to call 'make'. (the log may be HUGE) Michael.

I will send you the log in private: it is 140K zipped.

Vincent.

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 51 lines
On Fri, 13 Aug 2004 10:10:46 +0200 (W. Europe Daylight Time) Michael Van Canneyt wrote: > > > On Fri, 13 Aug 2004, Tony Maro wrote: > > > I just updated my FPC cvs today. > > My last update was 3 or 4 days ago. > > I haven't updated Lazarus in a week or so. > > > > The latest FPC update breaks building Lazarus from inside the IDE. For > > those familiar, if you try to install a package, Lazarus will optionally > > rebuild itself. Now it will either freeze or crash when you try to do this. > > > > I tried to get a crash, but lately only got the freeze. Here's the last > > console out from Lazarus when it stops responding: > > > > TPascalParserTool.BuildTree B OnlyIntf=False project1.lpr > > TMainIDE.DoNewEditorFile end unit1.pas > > TMainIDE.DoNewProject end > > [TExternalToolList.Run] /usr/bin/make ide OPT="-Cn" > > Xlib: sequence lost (0x10200 > 0x5c9a) in reply type 0x10! > > Xlib: sequence lost (0x10000 > 0x5c9a) in reply type 0x10! > > > > I know this isn't a Lazarus list, but like I said, I haven't changed > > Lazarus code that worked on the CVS from a few days ago, so I assume > > it's an FPC issue. > > > > Building from the console with make works fine. There was some recent > > discussion about this regarding Win32 building, but this is in Linux > > that I'm experiencing it. > > The culprit is probably TProcess. I split out TProcess in Win32/unix > parts, and did some major rewriting under Linux. However, all test > programs ran fine, so I assumed it was OK to commit. I didn't test > lazarus, however. > > Can you do the following: > > 1. Start lazarus under strace: > > strace -f -o laz.log lazarus > > 2. Let the IDE rebuild itself. If it freezes, kill it. > > 3. Send me the output of strace. Preferably only the part that appears > around the Fork() call used to call 'make'. (the log may be HUGE) > > Michael. I will send you the log in private: it is 140K zipped.

OK. I found the problem:

3688 execve("/usr/bin/make cleanall", ["/usr/bin/make", "cleanall"], [/* 36 vars */] <unfinished ...> 3680 <... gettimeofday resumed> {1092386057, 829845}, NULL) = 0 3688 <... execve resumed> ) = -1 ENOENT (No such file or directory)

It is, as I assumed, an error in TProcess. I will look for a fix.

Vincent, the problem is that the ExecVE call gets the complete TProcess.CommandLine property as the first argument, when it should only get the binary name. The error is probably in the MakeCommand() line in process.inc.

Michael.

Reply by email

Joost van der Sluis
to Michael Van Canneyt
Vincent, the problem is that the ExecVE call gets the complete TProcess.CommandLine property as the first argument, when it should only get the binary name. The error is probably in the MakeCommand() line in process.inc.

I don't know if you already know this or if you can use it, but there are other commands on linux like ExecVE wich can handle the complete commandline. (ExecXX)

Joost.

Reply by email

Marco van de Voort
to Joost van der Sluis
Show quoted text 7 lines
> TProcess.CommandLine property as the first argument, when it should only get the > binary name. The error is probably in the MakeCommand() line in > process.inc. I don't know if you already know this or if you can use it, but there are other commands on linux like ExecVE wich can handle the complete commandline. (ExecXX)

Actually, Linux (the kernel) only has ExecVE.

GNU libc has some more variants, but FPC does't use libc directly. FPC rolls its own set based on kernel.execve with native strings, see fpexec* in baseunix/unix

However these only became usable with 1.9.4+, and FCL has to work with 1.0.x too which is probably the reason for TProcess to use execve (avoid the shortstring versions of 1.0.x)

Reply by email

Michael Van Canneyt
to Joost van der Sluis: I don't know if you already know this or if you can use it, but there are other commands…
Joost van der Sluis wrote 8 lines
> Vincent, the problem is that the ExecVE call gets the complete > TProcess.CommandLine property as the first argument, when it should only get the > binary name. The error is probably in the MakeCommand() line in > process.inc. I don't know if you already know this or if you can use it, but there are other commands on linux like ExecVE wich can handle the complete commandline. (ExecXX)

I know this: execl and friends :-)

Meanwhile, it has been fixed and committed. Lazarus recompiles itself again. Now still the Win32 version. Vincent Snijders is testing this, he still needs to apply a patch regarding pipes.

Michael.

Reply by email

Vincent Snijders
to Michael Van Canneyt
Show quoted text 6 lines
Namens Michael Van Canneyt Verzonden: vrijdag 13 augustus 2004 12:02 Meanwhile, it has been fixed and committed. Lazarus recompiles itself again. Now still the Win32 version. Vincent Snijders is testing this, he still needs to apply a patch regarding pipes.

Even without the patch Lazarus recompiles itself on win32 too. I think the error is not triggered with the new version anymore, because of a different way and sequence of opening the pipes.

Michael do you still want me to write the patch or shall we leave it as is, remembering that is such an error pops up again, we have to look at duplicating the pipe handles.

Vincent.

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 9 lines
> Namens Michael Van Canneyt > Verzonden: vrijdag 13 augustus 2004 12:02 > > Meanwhile, it has been fixed and committed. Lazarus recompiles itself > again. Now still the Win32 version. Vincent Snijders is testing this, he > still needs to apply a patch regarding pipes. Even without the patch Lazarus recompiles itself on win32 too. I think the error is not triggered with the new version anymore, because of a different way and sequence of opening the pipes.

I did some redesigning, probably this has fixed the original problem.

Michael do you still want me to write the patch or shall we leave it as is, remembering that is such an error pops up again, we have to look at duplicating the pipe handles.

No problem, fine with me.

Michael.

Reply by email