Sign in Join

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

Mailing lists / fpc-devel / 2010-02

Native compilers for non-x86

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Mark Morgan Lloyd

I'm having another of my periodic attempts at getting various systems up-to-date here, and I wonder if I could ask for help with build problems.

First machine is an ARM-based Linksys NSLU2 "Slug", running Debian "Squeeze" i.e. little-endian EABI. I've previously managed to build for this using (I think) 2.5.1. I experimentally reverted to 2.4.0 but an attempt at building gave me

/bin/mkdir -p arm/units/arm-linux
/usr/local/bin/ppcarm -Ur -Xs -O2 -n -Fuarm -Fusystems -Fu/usr/local/src/fpc/fpcbuild-2.4.0/fpcsrc/rtl/units/arm-linux -Fiarm -FE. -FUarm/units/arm-linux -dRELEASE -O- -gl -vt -darm -dGDB -dBROWSERLOG pp.pas
Using assembler: /usr/bin/as
cgobj.pas(3384,38) Warning: range check error while evaluating constants pstatmnt.pas(547,39) Error: Call by var for arg no. 1 has to match exactly: Got "ttempcreatenode" expected "tnode"
pstatmnt.pas(1236) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
make[5]: *** [ppcarm] Error 1

Using trunk downloaded last night progresses further but eventually fails with

make -C pasjpeg smart
make[4]: Entering directory
`/usr/local/src/fpc/fpcbuild/fpcsrc/packages/pasjpeg' make all LINKSMART=1 CREATESMART=1
make[5]: Entering directory
`/usr/local/src/fpc/fpcbuild/fpcsrc/packages/pasjpeg' /bin/mkdir -p units/arm-linux
/usr/local/src/fpc/fpcbuild/fpcsrc/compiler/ppcarm -XX -CX -Ur -Xs -O2 -n -Fu/usr/local/src/fpc/fpcbuild/fpcsrc/rtl/units/arm-linux -FE. -FUunits/arm-linux -O- -gl -vt -darm -dRELEASE src/buildpasjpeg.pp Using assembler: /usr/bin/as
jdmarker.pas(17,2) StaAn unhandled exception occurred at $000B6118 : EAccessViolation : Access violation
$000B6118 TSCANNERFILE__READCHAR, line 2745 of scanner.pas $000B6CAC TSCANNERFILE__SKIPSPACE, line 3074 of scanner.pas $000B75FC TSCANNERFILE__READTOKEN, line 3398 of scanner.pas $001462B8 CONSUME, line 133 of pbase.pas
$0019557C PROC_UNIT, line 1301 of pmodules.pas
$0017A3AC COMPILE, line 395 of parser.pas
$001891C8 TPPUMODULE__LOADPPU, line 1630 of fppu.pas $00193E3C LOADUNITS, line 767 of pmodules.pas
$00194ED0 PROC_UNIT, line 1135 of pmodules.pas
$0017A3AC COMPILE, line 395 of parser.pas
$001891C8 TPPUMODULE__LOADPPU, line 1630 of fppu.pas $00193E3C LOADUNITS, line 767 of pmodules.pas
$00194ED0 PROC_UNIT, line 1135 of pmort reading includefile src/jconfig.inc
Fatal: Compilation aborted
dules.pas
$0017A3AC COMPILE, line 395 of parser.pas
$0002D414 COMPILE, line 249 of compiler.pas
$00008314 main, line 223 of pp.pas

make[5]: *** [buildpasjpeg.ppu] Error 217

In both cases the commandline I'm using is

make 'NOGDB=1' 'OPT=-O- -gl -vt' 'EXTDEBUG=1' all

I've added extdebug in an attempt to enable -an for listings although so far I don't think it's working (when looked at on other platforms)- is this the right way of doing it?

Can anybody point me at a fix, or suggest a specific version I should be using?

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

Henry Vermaak
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 7 lines
I'm having another of my periodic attempts at getting various systems up-to-date here, and I wonder if I could ask for help with build problems. First machine is an ARM-based Linksys NSLU2 "Slug", running Debian "Squeeze" i.e. little-endian EABI. I've previously managed to build for this using (I think) 2.5.1. I experimentally reverted to 2.4.0 but an attempt at building gave me

I've managed to build fpc for the slug running debian squeeze (a while ago), so there is hope. I even managed to run the testsuite - you may be amused by my fumblings here:
http://bugs.freepascal.org/view.php?id=14386

In both cases the commandline I'm using is make 'NOGDB=1' 'OPT=-O- -gl -vt' 'EXTDEBUG=1' all

You will have to build the compiler for EABI, so add -dFPC_ARMEL to your OPT parameter. I'm afraid I don't have tips for the build failing, but maybe you should try the latest trunk and submit a bugreport with the trace.

Henry

Reply by email

Mark Morgan Lloyd
to Henry Vermaak
Henry Vermaak wrote 23 lines
On 25 February 2010 21:22, Mark Morgan Lloyd wrote: > I'm having another of my periodic attempts at getting various systems > up-to-date here, and I wonder if I could ask for help with build problems. > > First machine is an ARM-based Linksys NSLU2 "Slug", running Debian "Squeeze" > i.e. little-endian EABI. I've previously managed to build for this using (I > think) 2.5.1. I experimentally reverted to 2.4.0 but an attempt at building > gave me I've managed to build fpc for the slug running debian squeeze (a while ago), so there is hope. I even managed to run the testsuite - you may be amused by my fumblings here: http://bugs.freepascal.org/view.php?id=14386 > In both cases the commandline I'm using is > > make 'NOGDB=1' 'OPT=-O- -gl -vt' 'EXTDEBUG=1' all You will have to build the compiler for EABI, so add -dFPC_ARMEL to your OPT parameter. I'm afraid I don't have tips for the build failing, but maybe you should try the latest trunk and submit a bugreport with the trace.

Thanks Henry, noted. I was able to use a ppcarm from Florian (I think) to bootstrap 2.5.1 (about September 11th), after which I could build reliably using

make 'GDB_V607=1' 'OPT=-O- -gl -vt NOWPOCYCLE=1' all

Can anybody say whether I still need this NOWPOCYCLE=1?

As you say, running a compilation on a Slug tends to take a while. I've got some probably-faster boards badged "iEi" but they're flashed to run CE and the manufacturer wanted some extortionate amount for a Linux conversion kit. I'm hoping that if I can get something like OpenFirmware booting from disc that I can then boot Linux, but it's not going to happen overnight.

For other processors (x86, SPARC, PPC) I'm now using

make 'GDB_V607=1' 'OPT=-O- -gl -vt -dEXTDEBUG' all

successfully. Output is piped into Perl which gives me a summary of what sources are used- I figured I'd need that for tackling the SPARC IDE problem, unfortunately it means I can't use make -j on the larger systems.

On ARMEL I've just run this a couple of times

make 'GDB_V607=1' 'NOWPOCYCLE=1' 'OPT=-O- -gl -vt -dEXTDEBUG' all

which goes further than it did without the NOWPOCYCLE but it (eventually) fails with

make[3]: Leaving directory `/usr/local/src/fpc/fpcbuild/fpcsrc/compiler' /usr/bin/diff ppc3 ppcarm
Binary files ppc3 and ppcarm differ
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `/usr/local/src/fpc/fpcbuild/fpcsrc/compiler' make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `/usr/local/src/fpc/fpcbuild/fpcsrc' make: *** [build-stamp.arm-linux] Error 2

[Much later] I think I've got it to work using

make 'GDB_V607=1' 'NOWPOCYCLE=1' 'OPT=-O- -gl -dFPC_ARMEL -vt -dEXTDEBUG' all

Both the NOWPOCYCLE and FPC_ARMEL appear to be essential, at least with the compiler I was starting with.

I've now got a fairly up-to-date 2.5.1. fpc will compile a minimal test program but I find that if I force a segv gdb has difficulty getting bt parameters. fp also works and shows disassembly etc.

I'll run a few more test compilations since it would be interesting to find out whether now that I've got a recent 2.5.1 I can dispense with either NOWPOCYCLE or FPC_ARMEL. However my main focus at present is checking out Lazarus on the various platforms available to me since I'm trying to map out the next couple of months development for management.

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