Sign in Join

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

Mailing lists / fpc-devel / 2009-09

Armel for Debian "Lenny"

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Mark Morgan Lloyd

What's the current situation with armel? I've got the armel-generating 2.3.1 (I think from Florian) but I can't complete a "make all"- it barfs during cycle 2.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Jonas Maebe
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
What's the current situation with armel?

I think the latest svn should work fine (both trunk and fixes_2_4).

I've got the armel-generating 2.3.1 (I think from Florian) but I can't complete a "make all"- it barfs during cycle 2.

If that's an old starting compiler (what does "ppcarm -iD" show?), make sure to add "-O-" to the OPT="..." flags. Other than that, I'm not sure what the problem could be.

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 18 lines
On 12 Sep 2009, at 18:58, Mark Morgan Lloyd wrote: > What's the current situation with armel? I think the latest svn should work fine (both trunk and fixes_2_4). > I've got the armel-generating 2.3.1 (I think from Florian) but I can't > complete a "make all"- it barfs during cycle 2. If that's an old starting compiler (what does "ppcarm -iD" show?), make sure to add "-O-" to the OPT="..." flags. Other than that, I'm not sure what the problem could be. Jonas _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

ppcarm -iD shows 2008/11/29. I've tried doing things like using ppc1 or ppc2 built part-way through the cycle and it hasn't appeared to change toe problem.

On trunk make NOGDB=1 "OPT=-O- -gl" all eventually gets me to

..
/usr/local/src/fpc/trunk/compiler/ppcwpo1 -Ur -Xs -O2 -n -Fuarm -Fusystems -Fu/usr/local/src/fpc/trunk/rtl/units/arm-linux -Fiarm -FE. -FUarm/units/arm-linux -dRELEASE -O- -gl -darm -dGDB -dBROWSERLOG -Owdevirtcalls,optvmts -Fw/usr/local/src/fpc/trunk/compiler/pp2.wpo -darm -dGDB -dBROWSERLOG pp.pas
cgobj.pas(3384,38) Warning: range check error while evaluating constants Fatal: Compilation aborted
An unhandled exception occurred at $000ACFC8 :
EAccessViolation : Access violation
$000ACFC8 TSCANNERFILE__READCHAR, line 2658 of scanner.pas $000ADB5C TSCANNERFILE__SKIPSPACE, line 2987 of scanner.pas $000AE480 TSCANNERFILE__READTOKEN, line 3304 of scanner.pas $001247E4 CONSUME, line 133 of pbase.pas
$00176C48 PROC_UNIT, line 1184 of pmodules.pas
$00152F94 COMPILE, line 394 of parser.pas
$0016B400 TPPUMODULE__LOADPPU, line 1531 of fppu.pas $00175768 LOADUNITS, line 713 of pmodules.pas
$00175B4C PARSE_IMPLEMENTATION_USES, line 801 of pmodules.pas $00176888 PROC_UNIT, line 1103 of pmodules.pas
$00152F94 COMPILE, line 394 of parser.pas
$0016B400 TPPUMODULE__LOADPPU, line 1531 of fppu.pas $00175768 LOADUNITS, line 713 of pmodules.pas
$00175B4C PARSE_IMPLEMENTATION_USES, line 801 of pmodules.pas $00176888 PROC_UNIT, line 1103 of pmodules.pas
$00152F94 COMPILE, line 394 of parser.pas
$0016B400 TPPUMODULE__LOADPPU, line 1531 of fppu.pas

make[4]: *** [ppcarm] Error 217
make[4]: Leaving directory `/usr/local/src/fpc/trunk/compiler' make[3]: *** [wpocycle] Error 2
make[3]: Leaving directory `/usr/local/src/fpc/trunk/compiler' make[2]: *** [cycle] Error 2
make[2]: Leaving directory `/usr/local/src/fpc/trunk/compiler' make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `/usr/local/src/fpc/trunk' make: *** [build-stamp.arm-linux] Error 2

If I try compiling manually (cut-and-paste command line) it fails similarly. GDB does give me what appears to be a sensible backtrace, first few lines as below.

Program received signal SIGSEGV, Segmentation fault. 0x000acfc8 in TSCANNERFILE__READCHAR (this=0x41265c90) at scanner.pas:2658 2658 c:=inputpointer^;

#0 0x000acfc8 in TSCANNERFILE__READCHAR (this=0x41265c90) at scanner.pas:2658
#1 0x000adb5c in TSCANNERFILE__SKIPSPACE (this=0x41265c90) at scanner.pas:2987
#2 0x000ae480 in TSCANNERFILE__READTOKEN (ALLOWRECORDTOKEN=true, this=0x41265c90) at scanner.pas:3304
#3 0x001247e4 in CONSUME (I=_POINT) at pbase.pas:133 #4 0x00176c48 in PROC_UNIT () at pmodules.pas:1184 #5 0x00152f94 in COMPILE (FILENAME='ptype.pas') at parser.pas:394 #6 0x0016b400 in TPPUMODULE__LOADPPU (this=0x41339e20) at fppu.pas:1531 #7 0x00175768 in LOADUNITS () at pmodules.pas:713 #8 0x00175b4c in PARSE_IMPLEMENTATION_USES () at pmodules.pas:801 #9 0x00176888 in PROC_UNIT () at pmodules.pas:1103 #10 0x00152f94 in COMPILE (FILENAME='pexpr.pas') at parser.pas:394 ..

If I don't use -O- I think it fails (with similar messages) at an earlier cycle, i.e. compiling with ppc1 or ppc2. In this case compiling manually works so I've not been able to get a backtrace.

It would be very useful if I could get FPC working on this platform (NSLu2 "Slug") but I could at a pinch to Debian "Etch" which is arm rather than armel. However part of the reason I'm doing this is because I've been running the compiler in parallel on x86, SPARC, PPC and ARM and have found something interesting which I think has no bearing on this problem so I'd rather deal with it separately.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Jonas Maebe
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 12 lines
ppcarm -iD shows 2008/11/29. I've tried doing things like using ppc1 or ppc2 built part-way through the cycle and it hasn't appeared to change toe problem. On trunk make NOGDB=1 "OPT=-O- -gl" all eventually gets me to .. /usr/local/src/fpc/trunk/compiler/ppcwpo1 -Ur -Xs -O2 -n -Fuarm - Fusystems -Fu/usr/local/src/fpc/trunk/rtl/units/arm-linux -Fiarm - FE. -FUarm/units/arm-linux -dRELEASE -O- -gl -darm -dGDB - dBROWSERLOG -Owdevirtcalls,optvmts -Fw/usr/local/src/fpc/trunk/ compiler/pp2.wpo -darm -dGDB -dBROWSERLOG pp.pas

Since it crashes during the optional whole-program optimization (wpo) cycle, try adding the following to your initial make command: NOWPOCYCLE=1. I'm not sure why this would crash on ARM though, since there are no cpu-specific wpo's at this time and the crash happens in code that is shared among all architectures.

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 20 lines
On 13 Sep 2009, at 08:57, Mark Morgan Lloyd wrote: > ppcarm -iD shows 2008/11/29. I've tried doing things like using ppc1 > or ppc2 built part-way through the cycle and it hasn't appeared to > change toe problem. > > On trunk make NOGDB=1 "OPT=-O- -gl" all eventually gets me to > > .. > /usr/local/src/fpc/trunk/compiler/ppcwpo1 -Ur -Xs -O2 -n -Fuarm > -Fusystems -Fu/usr/local/src/fpc/trunk/rtl/units/arm-linux -Fiarm -FE. > -FUarm/units/arm-linux -dRELEASE -O- -gl -darm -dGDB -dBROWSERLOG > -Owdevirtcalls,optvmts -Fw/usr/local/src/fpc/trunk/compiler/pp2.wpo > -darm -dGDB -dBROWSERLOG pp.pas Since it crashes during the optional whole-program optimization (wpo) cycle, try adding the following to your initial make command: NOWPOCYCLE=1. I'm not sure why this would crash on ARM though, since there are no cpu-specific wpo's at this time and the crash happens in code that is shared among all architectures.

Thanks, that appears to do the trick- build completes.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd

Just in case it's useful to anybody in the future, I note that on Debian "Lenny" (armel) compiling with

make NOGDB=1 "OPT=-O- -gl" NOWPOCYCLE=1 all

works but a make install might not copy ppcarm over- that might have to be done manually.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Nataraj S Narayan
to Mark Morgan Lloyd

Hi

make distclean crosszipinstall CPU_TARGET=arm CROSSOPT='-CfSOFT -darm -dFPC-ARMEL -gl' FPC=/usr/bin/fpc

works for me well and i am able to cross compile and run many of the gtk2 examples on arm-linux.

regards

Nataraj

Mark Morgan Lloyd wrote 17 lines
Just in case it's useful to anybody in the future, I note that on Debian "Lenny" (armel) compiling with make NOGDB=1 "OPT=-O- -gl" NOWPOCYCLE=1 all works but a make install might not copy ppcarm over- that might have to be done manually. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email