Sign in Join

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

Mailing lists / lazarus / 2001-01

Compilation problem Using FPC 1.0.4, Mandrake Linux 7.2 and last Lazarus Sources

19 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Shane Miller

Actually that is the error I was getting when I compiled with 1.0.4. I still get that error if I don't do a build all. So, what I do is this:

ppc386 -B lazarus.pp

The -B tells the compiler to BUILD ALL. IF you use the makefile I think you may be able to do

make -B lazarus

Try that. I know that's your problem because that's exactly what I was getting.

Shane

Earlier message 34 lines
-----Original Message----- From: Philippe Rigaux To: Date: Sunday, January 07, 2001 10:26 AM Subject: [lazarus] Compilation problem Using FPC 1.0.4, Mandrake Linux 7.2 and last Lazarus Sources >Hello folks :) > >I'm trying to test Lazarus but the compilation run fine (no Errors) but when >I launch lazarus, I get this error : > > >$ ./lazarus >LM_SCREENINIT called --> should go to GTKObject.Init >TODO: check this >[TCustomForm.Create] Resource 'TSPLASHFORM' not found >[TCustomForm.Create] Resource 'TMAINIDE' not found >calling drawframecontrol >Erreur de segmentation (core dumped) > > >Any Idea ? > >Thanks > >Philippe > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Philippe Rigaux
to Marc Weustink: Recently we introduced a method to "store" resources in an executable. In the last few…

OK,

Thanks a lot, I will try again in a few days.

Philippe

Le Dimanche 07 Janvier 2001 17:53, Marc Weustink a �crit :

Show quoted text 29 lines
At 17:16 07-01-01 +0100, Philippe Rigaux wrote: >Hello folks :) > >I'm trying to test Lazarus but the compilation run fine (no Errors) but > when I launch lazarus, I get this error : > > >$ ./lazarus >LM_SCREENINIT called --> should go to GTKObject.Init >TODO: check this >[TCustomForm.Create] Resource 'TSPLASHFORM' not found >[TCustomForm.Create] Resource 'TMAINIDE' not found >calling drawframecontrol >Erreur de segmentation (core dumped) > > >Any Idea ? Recently we introduced a method to "store" resources in an executable. In the last few days a lot of code is rewritten/changed to use those stored resources and not all is completed, seen the error that the MAINIDE could not be found Marc _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Shane Miller

Yes, the resources not found error are correct. It checks for every form it creates and most of them won't yet be found.

Shane

Earlier message 19 lines
-----Original Message----- From: Marc Weustink To: Date: Sunday, January 07, 2001 1:20 PM Subject: Re: [lazarus] Compilation problem Using FPC 1.0.4, Mandrake Linux 7.2 and last Lazarus Sources >Shane, > >if everything works, you also get the resource not found warnings ? > >Marc > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Philippe Rigaux
to Shane Miller: Actually that is the error I was getting when I compiled with 1.0.4. I still get that…

That's still not OK, it compiles with the -B but it still does a 'Core Dump', Splash screen comes and then it fails.... with the same message as before.

Here is the output of the compilation :

 lazarus]# ppc386 -Fu. -Fulcl/units -Fucomponents/units
-Fu./designer -Fu/usr/lib/fpc/1.0.4/units/linux/rtl
-Fu/usr/lib/fpc/1.0.4/units/linux/fcl -Fu/usr/lib/fpc/1.0.4/units/linux -Fi.
-Fi./include -Fi./include/linux -FE. -B -di386 lazarus.pp
Free Pascal Compiler version 1.0.4 [2000/12/18] for i386
Copyright (c) 1993-2000 by Florian Klaempfl
Target OS: Linux for i386
Compiling lazarus.pp
Compiling splash.pp
Assembling splash
Compiling compiler.pp
Compiling compileroptions.pp
Compiling lazconf.pp
Assembling lazconf
compileroptions.pp(281,5) Note: Private field TFRMCOMPILEROPTIONS.FPATH is
never used
Assembling compileroptions
Compiling project.pp
Compiling global.pp
global.inc(25,3) Note: Local variable I not used
global.inc(26,3) Note: Local variable TEXTS not used
global.inc(27,3) Note: Local variable TEMPNUM not used
global.inc(28,3) Note: Local variable REPLACE not used
global.inc(29,3) Note: Local variable TEMPEDIT not used
global.inc(70,3) Note: Local variable TEMPEDIT not used
global.inc(71,3) Note: Local variable NUM not used
global.inc(71,7) Note: Local variable I not used
global.inc(78,3) Note: Local variable TEMPEDIT not used
global.inc(79,3) Note: Local variable I not used
global.inc(80,3) Note: Local variable TEXTS not used
global.inc(81,3) Note: Local variable SPACECOUNT not used
global.inc(82,3) Note: Local variable NUM not used
global.inc(83,3) Note: Local variable END_FOUND not used
global.inc(83,13) Note: Local variable PROC_FOUND not used
global.inc(83,25) Note: Local variable PUBLIC_FOUND not used
global.inc(83,39) Note: Local variable PRIVATE_FOUND not used
Assembling global
Compiling dlgmessage.pp
Assembling dlgmessage
Compiling compiler.pp
compiler.pp(89,3) Note: Local variable NUM not used
compiler.pp(204,3) Note: Local variable TEXTS is assigned but never used
compiler.pp(205,3) Note: Local variable NUM not used
compiler.pp(206,3) Note: Local variable TEMP not used
compiler.pp(223,3) Note: Local variable TEXTS not used
compiler.pp(224,3) Note: Local variable NUM not used
compiler.pp(225,3) Note: Local variable TEMP not used
compiler.pp(40,5) Note: Private field TCOMPILER.FPROJECTFILE is never used
compiler.pp(41,5) Note: Private field TCOMPILER.FOUTPUTFILE is never used
Assembling compiler
Compiling compreg.pp
compreg.pp(42,5) Note: Private field TREGISTEREDCOMPONENTPAGE.FCOUNT is never
used
Assembling compreg
Compiling find_dlg.pp
Assembling find_dlg
Compiling formeditor.pp
Compiling customformeditor.pp
Compiling ./designer/abstractformeditor.pp
Assembling abstractformeditor
Compiling ./designer/propedits.pp
propedits.pp(1048,3) Note: Local variable ANSIRESULT is assigned but never
used
propedits.pp(1136,3) Note: Local variable S is assigned but never used
Assembling propedits
Compiling ./designer/objectinspector.pp
Assembling objectinspector
customformeditor.pp(303,1) Note: Local variable NUM not used
customformeditor.pp(322,1) Note: Local variable NUM not used
customformeditor.pp(417,1) Warning: Function result does not seem to be set
customformeditor.pp(423,1) Warning: Function result does not seem to be set
customformeditor.pp(429,1) Warning: Function result does not seem to be set
customformeditor.pp(435,1) Warning: Function result does not seem to be set
customformeditor.pp(441,1) Warning: Function result does not seem to be set
customformeditor.pp(447,1) Warning: Function result does not seem to be set
customformeditor.pp(453,1) Warning: Function result does not seem to be set
customformeditor.pp(527,3) Note: Local variable TEMPINTERFACE not used
customformeditor.pp(528,3) Note: Local variable TEMPCLASS not used
customformeditor.pp(657,1) Warning: Function result does not seem to be set
Assembling customformeditor
Assembling formeditor
Compiling ./designer/controlselection.pp
controlselection.pp(165,3) Note: Local variable DX not used
controlselection.pp(165,7) Note: Local variable DY not used
controlselection.pp(180,3) Note: Local variable DX not used
controlselection.pp(180,7) Note: Local variable DY not used
Assembling controlselection
Compiling uniteditor.pp
uniteditor.pp(353,3) Note: Local variable MENUITEM is assigned but never used
uniteditor.pp(412,3) Note: Local variable PT not used
uniteditor.pp(543,3) Note: Local variable I not used
uniteditor.pp(588,3) Note: Local variable I not used
uniteditor.pp(724,3) Note: Local variable PAGEINDEX not used
uniteditor.pp(970,6) Note: Local variable X not used
uniteditor.pp(61,5) Note: Private field TSOURCEEDITOR.FCURRENTCURSORXLINE is
never used
uniteditor.pp(63,5) Note: Private field TSOURCEEDITOR.FCURRENTCURSORYLINE is
never used
uniteditor.pp(137,5) Note: Private field TSOURCENOTEBOOK.FEMPTY is never used
Assembling uniteditor
Compiling testform.pp
testform.pp(216,3) Note: Local variable F not used
testform.pp(48,5) Note: Private field TTESTFORM.FB is never used
Assembling testform
Compiling viewunit_dlg.pp
Assembling viewunit_dlg
Compiling viewform_dlg.pp
Assembling viewform_dlg
Compiling ./designer/designer.pp
designer.pp(90,3) Note: Local variable NMUNIT not used
designer.pp(91,3) Note: Local variable I not used
designer.pp(142,3) Note: Local variable CURDESIGNER not used
designer.pp(350,3) Note: Local variable BUTTON is assigned but never used
designer.pp(482,1) Warning: Function result does not seem to be set
Assembling designer
project.pp(71,3) Note: Local variable TEXTS not used
project.pp(73,5) Note: Local variable X not used
project.pp(74,3) Note: Local variable TEMPEDITOR not used
project.pp(248,5) Warning: Local variable TEMPEDITOR does not seem to be
initialized
Assembling project
Assembling lazarus
Linking ./lazarus
13125 Lines compiled, 3.0 sec
 lazarus]#

Thanks a lot

Reply by email

Philippe Rigaux

Hello folks :)

I'm trying to test Lazarus but the compilation run fine (no Errors) but when I launch lazarus, I get this error :

$ ./lazarus
LM_SCREENINIT called --> should go to GTKObject.Init TODO: check this
[TCustomForm.Create] Resource 'TSPLASHFORM' not found [TCustomForm.Create] Resource 'TMAINIDE' not found calling drawframecontrol
Erreur de segmentation (core dumped)

Any Idea ?

Thanks

Philippe

Reply by email

Philippe Rigaux
to Shane Miller: Actually that is the error I was getting when I compiled with 1.0.4. I still get that…

It's seems that some files are missing !!!!
When I try the '-B' option I get this :

$ ppc386 -B lazarus.pp
Free Pascal Compiler version 1.0.4 [2000/12/18] for i386 Copyright (c) 1993-2000 by Florian Klaempfl
Target OS: Linux for i386
Compiling lazarus.pp
Compiling splash.pp
splash.pp(30,20) Fatal: Can't find unit CONTROLS

What is this file ? Where can I find it ?

Thanks a lot.

Philippe

Le Dimanche 07 Janvier 2001 19:23, Shane Miller a �crit :

Show quoted text 55 lines
Actually that is the error I was getting when I compiled with 1.0.4. I still get that error if I don't do a build all. So, what I do is this: ppc386 -B lazarus.pp The -B tells the compiler to BUILD ALL. IF you use the makefile I think you may be able to do make -B lazarus Try that. I know that's your problem because that's exactly what I was getting. Shane -----Original Message----- From: Philippe Rigaux To: Date: Sunday, January 07, 2001 10:26 AM Subject: [lazarus] Compilation problem Using FPC 1.0.4, Mandrake Linux 7.2 and last Lazarus Sources >Hello folks :) > >I'm trying to test Lazarus but the compilation run fine (no Errors) but when >I launch lazarus, I get this error : > > >$ ./lazarus >LM_SCREENINIT called --> should go to GTKObject.Init >TODO: check this >[TCustomForm.Create] Resource 'TSPLASHFORM' not found >[TCustomForm.Create] Resource 'TMAINIDE' not found >calling drawframecontrol >Erreur de segmentation (core dumped) > > >Any Idea ? > >Thanks > >Philippe > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Marc Weustink
to Philippe Rigaux: Hello folks :) I'm trying to test Lazarus but the compilation run fine (no Errors) but…
Philippe Rigaux wrote 16 lines
Hello folks :) I'm trying to test Lazarus but the compilation run fine (no Errors) but when I launch lazarus, I get this error : $ ./lazarus LM_SCREENINIT called --> should go to GTKObject.Init TODO: check this [TCustomForm.Create] Resource 'TSPLASHFORM' not found [TCustomForm.Create] Resource 'TMAINIDE' not found calling drawframecontrol Erreur de segmentation (core dumped) Any Idea ?

Recently we introduced a method to "store" resources in an executable. In the last few days a lot of code is rewritten/changed to use those stored resources and not all is completed, seen the error that the MAINIDE could not be found

Marc

Reply by email

Peter Vreman
Show quoted text 62 lines
Hi, While debugging the recent problems I found somthing wierd. The Segmentation fouls in Lazarus is generated in the following piece of code: procedure SelectGDKPenProps(const DC: HDC); begin with PDeviceContext(DC)^, CurrentPen^ do begin gdk_gc_set_foreground(GC, @GDIPenColor); . . . If you look at the disassembly you notice that about 1.9 GB of stack is used for local vars 0x8074950 <SELECTGDKPENPROPS>: push %ebp 0x8074951 <SELECTGDKPENPROPS+1>: mov %esp,%ebp 0x8074953 <SELECTGDKPENPROPS+3>: sub $0x72f7000c,%esp ^^^^^^^^^^^^^^^^ A bit to much I quess to hold with1 and with2 0x8074959 <SELECTGDKPENPROPS+9>: mov 0x8(%ebp),%eax 0x807495c <SELECTGDKPENPROPS+12>: mov %eax,0xfffffffc(%ebp) 0x807495f <SELECTGDKPENPROPS+15>: mov 0xfffffffc(%ebp),%eax 0x8074962 <SELECTGDKPENPROPS+18>: mov 0x1c(%eax),%eax 0x8074965 <SELECTGDKPENPROPS+21>: mov %eax,0xfffffff8(%ebp) 0x8074968 <SELECTGDKPENPROPS+24>: mov 0xfffffff8(%ebp),%eax 0x807496b <SELECTGDKPENPROPS+27>: lea 0x4(%eax),%eax 0x807496e <SELECTGDKPENPROPS+30>: push %eax ^^^^^^^^^^^^^ Causes segfault since stack is invalid. 0x807496f <SELECTGDKPENPROPS+31>: mov 0xfffffffc(%ebp),%eax 0x8074972 <SELECTGDKPENPROPS+34>: pushl 0x4(%eax) 0x8074975 <SELECTGDKPENPROPS+37>: call 0x804e484 <gdk_gc_set_foreground> To check if this was compiler related I put all needed structs in one program, called the same piece of code and this version disassembed to: 0x80542f0 <SELECTGDKPENPROPS>: push %ebp 0x80542f1 <SELECTGDKPENPROPS+1>: mov %esp,%ebp 0x80542f3 <SELECTGDKPENPROPS+3>: sub $0x8,%esp ^^^^^^^^^ Seems reasonable hold with1 and with2 0x80542f6 <SELECTGDKPENPROPS+6>: mov 0x8(%ebp),%eax 0x80542f9 <SELECTGDKPENPROPS+9>: mov %eax,0xfffffffc(%ebp) 0x80542fc <SELECTGDKPENPROPS+12>: mov 0xfffffffc(%ebp),%eax 0x80542ff <SELECTGDKPENPROPS+15>: mov 0x1c(%eax),%eax 0x8054302 <SELECTGDKPENPROPS+18>: mov %eax,0xfffffff8(%ebp) 0x8054305 <SELECTGDKPENPROPS+21>: mov 0xfffffff8(%ebp),%eax 0x8054308 <SELECTGDKPENPROPS+24>: lea 0x4(%eax),%eax 0x805430b <SELECTGDKPENPROPS+27>: push %eax 0x805430c <SELECTGDKPENPROPS+28>: mov 0xfffffffc(%ebp),%eax 0x805430f <SELECTGDKPENPROPS+31>: pushl 0x4(%eax) 0x8054312 <SELECTGDKPENPROPS+34>: call 0x8048af8 <gdk_gc_set_foreground> And that was something you would expect. So my question... what to do about it.

1. If compiling with optimization, try to turn it off (-O- on the commandline)

2. Try to remove the 'with' construct

Reply by email

Marc Weustink
to Marc Weustink: if everything works, you also get the resource not found warnings ? Marc

Hi,

While debugging the recent problems I found somthing wierd. The Segmentation fouls in Lazarus is generated in the following piece of code:

procedure SelectGDKPenProps(const DC: HDC);
begin
   with PDeviceContext(DC)^, CurrentPen^ do
   begin
     gdk_gc_set_foreground(GC, @GDIPenColor);
     .
     .
     .

If you look at the disassembly you notice that about 1.9 GB of stack is used for local vars

0x8074950 <SELECTGDKPENPROPS>: push %ebp
0x8074951 <SELECTGDKPENPROPS+1>: mov %esp,%ebp
0x8074953 <SELECTGDKPENPROPS+3>: sub $0x72f7000c,%esp ^^^^^^^^^^^^^^^^
A bit to much I quess to hold with1 and with2

0x8074959 <SELECTGDKPENPROPS+9>: mov 0x8(%ebp),%eax 0x807495c <SELECTGDKPENPROPS+12>: mov %eax,0xfffffffc(%ebp) 0x807495f <SELECTGDKPENPROPS+15>: mov 0xfffffffc(%ebp),%eax 0x8074962 <SELECTGDKPENPROPS+18>: mov 0x1c(%eax),%eax 0x8074965 <SELECTGDKPENPROPS+21>: mov %eax,0xfffffff8(%ebp) 0x8074968 <SELECTGDKPENPROPS+24>: mov 0xfffffff8(%ebp),%eax 0x807496b <SELECTGDKPENPROPS+27>: lea 0x4(%eax),%eax 0x807496e <SELECTGDKPENPROPS+30>: push %eax
^^^^^^^^^^^^^
Causes segfault since stack is invalid.

0x807496f <SELECTGDKPENPROPS+31>: mov 0xfffffffc(%ebp),%eax 0x8074972 <SELECTGDKPENPROPS+34>: pushl 0x4(%eax) 0x8074975 <SELECTGDKPENPROPS+37>: call 0x804e484 <gdk_gc_set_foreground>

To check if this was compiler related I put all needed structs in one program, called the same piece of code and this version disassembed to:

0x80542f0 <SELECTGDKPENPROPS>: push %ebp
0x80542f1 <SELECTGDKPENPROPS+1>: mov %esp,%ebp
0x80542f3 <SELECTGDKPENPROPS+3>: sub $0x8,%esp
^^^^^^^^^
Seems reasonable hold with1 and with2

0x80542f6 <SELECTGDKPENPROPS+6>: mov 0x8(%ebp),%eax 0x80542f9 <SELECTGDKPENPROPS+9>: mov %eax,0xfffffffc(%ebp) 0x80542fc <SELECTGDKPENPROPS+12>: mov 0xfffffffc(%ebp),%eax 0x80542ff <SELECTGDKPENPROPS+15>: mov 0x1c(%eax),%eax 0x8054302 <SELECTGDKPENPROPS+18>: mov %eax,0xfffffff8(%ebp) 0x8054305 <SELECTGDKPENPROPS+21>: mov 0xfffffff8(%ebp),%eax 0x8054308 <SELECTGDKPENPROPS+24>: lea 0x4(%eax),%eax 0x805430b <SELECTGDKPENPROPS+27>: push %eax
0x805430c <SELECTGDKPENPROPS+28>: mov 0xfffffffc(%ebp),%eax 0x805430f <SELECTGDKPENPROPS+31>: pushl 0x4(%eax) 0x8054312 <SELECTGDKPENPROPS+34>: call 0x8048af8 <gdk_gc_set_foreground>

And that was something you would expect. So my question... what to do about it.

Marc

Reply by email

Marc Weustink
to Peter Vreman: If it's reproducable using the lazarus file in CVS i can try it myself with the 1.0.4…

+ From: Peter Vreman
+
+ > + Which compilers did you test? Both 1.1 and 1.0.4 ? Because it
+ > + looks like a real compiler bug then.
+ >
+ > I only checked the 1.0.4 version. Tonight I'll try the 1.1
+ (and the 1.0.2)
+
+ If it's reproducable using the lazarus file in CVS i can try
+ it myself with the 1.0.4 release and try to debug it

Steps I did

- get latest (yesterday) version of Lazarus

- make clean; make OPT=-dDEBUG

To get a small example (and not whole lazarus):

- cd examples

- make OPT=-dDEBUG

- run speedtest

I got a segfault in lazarus/lcl/interfaces/gtk/gtkproc.inc - SelectGDKPenProps

Marc

Reply by email

Marc Weustink
to Peter Vreman: 1. If compiling with optimization, try to turn it off (-O- on the commandline) 2. Try to…

+ From: Peter Vreman

+ I wrote:
+ > And that was something you would expect. So my question...
+ > what to do about it.
+ >
+
+ 1. If compiling with optimization, try to turn it off (-O- on
+ the commandline)

I cant check it from here, but I used the ppc386.cfg as delivered with fpc.

+ 2. Try to remove the 'with' construct

Tried that, didn't make any difference.

Marc

Reply by email

Peter Vreman
Show quoted text 15 lines
+ From: Peter Vreman + I wrote: + > And that was something you would expect. So my question... + > what to do about it. + > + + 1. If compiling with optimization, try to turn it off (-O- on + the commandline) I cant check it from here, but I used the ppc386.cfg as delivered with fpc. + 2. Try to remove the 'with' construct Tried that, didn't make any difference.

Which compilers did you test? Both 1.1 and 1.0.4 ? Because it looks like a real compiler bug then.

Reply by email

Marc Weustink
to Peter Vreman: If it's reproducable using the lazarus file in CVS i can try it myself with the 1.0.4…
you wrote 7 lines
> + Which compilers did you test? Both 1.1 and 1.0.4 ? Because it > + looks like a real compiler bug then. > > I only checked the 1.0.4 version. Tonight I'll try the 1.1 (and the 1.0.2) If it's reproducable using the lazarus file in CVS i can try it myself with the 1.0.4 release and try to debug it

Let me know if you succeeded, otherwise I'll look for a testcase.

Marc

Reply by email

Marc Weustink
to Peter Vreman: Which compilers did you test? Both 1.1 and 1.0.4 ? Because it looks like a real compiler…

+ From: Peter Vreman
+
+ > + From: Peter Vreman
+ >
+ > + I wrote:
+ > + > And that was something you would expect. So my question...
+ > + > what to do about it.
+ > + >
+ > +
+ > + 1. If compiling with optimization, try to turn it off (-O- on
+ > + the commandline)
+ >
+ > I cant check it from here, but I used the ppc386.cfg as
+ > delivered with fpc.
+ >
+ > + 2. Try to remove the 'with' construct
+ >
+ > Tried that, didn't make any difference.
+
+ Which compilers did you test? Both 1.1 and 1.0.4 ? Because it
+ looks like a real compiler bug then.

I only checked the 1.0.4 version. Tonight I'll try the 1.1 (and the 1.0.2)

Marc

Reply by email

Peter Vreman
+ Which compilers did you test? Both 1.1 and 1.0.4 ? Because it + looks like a real compiler bug then. I only checked the 1.0.4 version. Tonight I'll try the 1.1 (and the 1.0.2)

If it's reproducable using the lazarus file in CVS i can try it myself with the 1.0.4 release and try to debug it

Reply by email