Sign in Join

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

Mailing lists / fpc-devel / 2013-05

Crash while compiling fpc 2.7.1 on ARM

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Michel Catudal

My platform is odroid U2 with funtoo Linux, desktop is mate. Processor is a 4 core arm processor from Samsung, with 2G of RAM, OS runs on a 32G SD Card. I also have an Ubuntu system also on a 32G SD card, haven't tested fpc compile on it yet.

A few weeks ago I was able to compile fpc with hard float support on odroid U2. I still have it along with lazarus. I have created a few graphic programs, they work like a champ so far, no crash.

For the past few weeks fpc no longer compiles. It works until it is time to compile the RTL.

Here is part of the log :

/bin/mv -f ppcarm ppc1
make 'FPC=/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compiler/ppc1' 'OLDFPC=' next CYC make[3] : on entre dans le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/com make rtlclean rtl
make[4] : on entre dans le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/com make -C /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl clean make[5] : on entre dans le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl /bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res /bin/rm -f *.s *_ppas.sh
make -C linux clean
make[6] : on entre dans le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl /bin/rm -f /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/prt0.o /var/ /bin/rm -f /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/system.ppu / /bin/rm -f /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/system.o /va /bin/rm -f /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/math.rst /va /bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res /bin/rm -f *.s *_ppas.sh
make[6] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/lin make[5] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl » make -C /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl 'OPT=-dFPC_ARMHF ' all make[5] : on entre dans le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl make -C linux all
make[6] : on entre dans le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl as -o /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/prt0.o arm/prt0. as -o /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/dllprt0.o arm/d as -o /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/cprt0.o arm/cprt as -o /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/gprt0.o arm/gprt as -o /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/ucprt0.o arm/ucp /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compiler/ppc1 -Ur -Ur -O2 -n -Fi../inc -Fi. text.inc(2082,14) Warning: Implicit string type conversion from "AnsiString" to "UnicodeString" text.inc(2301,53) Warning: Implicit string type conversion with potential data loss from "UnicodeString An unhandled exception occurred at $0000923C:
EAccessViolation: Access violation
$0000923C

An unhandled exception occurred at $0000923C:
EAccessViolation: Access violation
$0000923C

make[6]: *** [system.ppu] Erreur 217
make[6] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/lin make[5]: *** [linux_all] Erreur 2
make[5] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl » make[4]: *** [rtl] Erreur 2
make[4] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile make[3]: *** [next] Erreur 2
make[3] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile make[2]: *** [ppc2] Erreur 2
make[2] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile make[1]: *** [cycle] Erreur 2
make[1] : on quitte le répertoire « /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile make: *** [compiler_cycle] Erreur 2
[[31;01m*[[0m ERROR: dev-lang/fpc-2.7.1-r2 failed (compile phase): [[31;01m*[[0m emake failed

This is done using the snapshot from today may 28th ==>

HOMEPAGE="http://www.freepascal.org/"
DESCRIPTION="Free Pascal Compiler"
SRC_URI="ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpcbuild.zip"

Michel Catudal

For Linux Software visit http://home.comcast.net/~mcatudal

Reply by email

Paul Ishenin
to Michel Catudal

29.05.2013 10:09, Michel Catudal пишет:

Show quoted text 5 lines
My platform is odroid U2 with funtoo Linux, desktop is mate. Processor is a 4 core arm processor from Samsung, with 2G of RAM, OS runs on a 32G SD Card. I also have an Ubuntu system also on a 32G SD card, haven't tested fpc compile on it yet. A few weeks ago I was able to compile fpc with hard float support on odroid U2. I still have it along with lazarus. I have created a few graphic programs, they work like a champ so far, no crash. For the past few weeks fpc no longer compiles. It works until it is time to compile the RTL.

What starting compiler do you use?

Best regards,
Paul Ishenin

Reply by email

Michel Catudal
to Paul Ishenin
Paul Ishenin wrote 18 lines
29.05.2013 10:09, Michel Catudal пишет: > My platform is odroid U2 with funtoo Linux, desktop is mate. Processor is a 4 core arm processor from Samsung, with 2G of RAM, OS runs on a 32G SD Card. I also have an Ubuntu system also on a 32G SD card, haven't tested fpc compile on > it yet. > > A few weeks ago I was able to compile fpc with hard float support on odroid U2. I still have it along with lazarus. I have created a few graphic programs, they work like a champ so far, no crash. > > For the past few weeks fpc no longer compiles. It works until it is time to compile the RTL. What starting compiler do you use? Best regards, Paul Ishenin _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

The one that I compiled before the code was broken

For Linux Software visit http://home.comcast.net/~mcatudal

Reply by email

Thomas Schatzl
to Paul Ishenin

Hi,

Paul Ishenin wrote
29.05.2013 14:06, Michel Catudal пишет: > The one that I compiled before the code was broken

(note: the last working armhf compiler was generated by daily builds on 8th of May)

To answer on your question I need to know paticular compiler version.

Probably 2.7.1 as 2.6.2 cannot generate armhf code; that is the same issue I was reporting elsewhere.

Naturally it is most convenient to compile on the device natively, especially since arm devices are fast enough now. Unfortunately the latest stable version is too outdated to support that.

@Michel: I got the following response recently:

Show quoted text 22 lines
>> [.. the same crash description ...] >> >> Only when compiling with trunk as starting compiler with -O2 (i.e. >> default settings). >> >> I do know that compiling with trunk is unsupported, but with 2.6.2 >> you >> - cannot compile for armv7a (armv7-a, armv7 etc) >> - cannot compile for/on armhf >> >> Regardless, this seems to be an (old) optimizer bug in trunk which >> would be nice if it were fixed regardless of that. > > Sorry, also occurs with OPT=-O- > That's true, RTTI on alignment-sensitive targets was not generated correctly. I fixed that (or at least tried to) in r24562, getting a working compiler for MIPS. Can you test if r24562 fixes behavior on ARM? (You have to build trunk for i386 using 2.6.2, then use that compiler to cross-compile for armv7).

I did not have time to test this workaround yet.

So try to first build a non-armhf version, and then crosscompile to armhf.
You can try using this method to get a new base compiler.

Hth,
Thomas

Reply by email

Michel Catudal
to Paul Ishenin: 29.05.2013 14:06, Michel Catudal пишет: To answer on your question I need to know…
Paul Ishenin wrote 11 lines
29.05.2013 14:06, Michel Catudal пишет: > The one that I compiled before the code was broken To answer on your question I need to know paticular compiler version. Best regards, Paul Ishenin

Here is more detailed info. I guess my answer was a bit too short, I did a quick answer last night after I finally got firefox 20.0.1 compiled on odroid U2. The ebuild that comes with funtoo has probably never been tried on ARM, a few things would compiled, the patch were minimal. If anyone is interested I can give my patches.

When I installed funtoo I compiled fpc-2.6.0 which came with the standard funtoo portage That version worked but lazarus would not work with it. I then went on to compile the dev version 2.7.1 , it would crash. The strange part is that a few weeks prior it would compile fine on mele A2000G. I passed the arguments for hard float, that is how I got lazarus to work.

I did some experiment and found out that the fpc.zip snapshot still worked while the fpcbuild.zip one would crash. I didn't realize until a bit later that I needed to erase the manifest file and move the fpc.zip file from the distfiles directory to force it to use the latest snapshot. This is why it worked. Once I recreated the manifest file on the ebuild directory the compiling would no longer work.
When I compared the fpc.zip to the code in fpcbuild I saw that they didn't am not sure that this fpc.zip is the last one that worked. It is dated may 6th.

part of the ebuild that worked :

HOMEPAGE="http://www.freepascal.org/"
DESCRIPTION="Free Pascal Compiler"
SRC_URI="ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpc.zip" SLOT="0"

I had to copy the source on a directory that would satisfy lazarus since this is not the standard fpcbuild code.

revision may 6th :
URL: http://svn.freepascal.org/svn/fpc/trunk
Revision: 24455
Last Changed Rev: 24455

Here is when I run fpc, the date shown is the date that the compiler was created

/usr/local/portage/dev-lang/fpc $ fpc
Free Pascal Compiler version 2.7.1 [2013/05/18] for arm Copyright (c) 1993-2013 by Florian Klaempfl and others

Here is the newer one

michel compiler # pwd
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compiler

michel compiler # ./ppc1
Free Pascal Compiler version 2.7.1 [2013/05/28] for arm Copyright (c) 1993-2013 by Florian Klaempfl and others

This one is crashes trying to create the RTL files. I made sure that it took the lastest snapshot. Perhaps there should be a date in the filename so it would be easier to track.

With the version that I have that works, I have done a few test and it never crashes. I didn't do very extensive tests yet. I was more concerned with getting something that someone else would be able to create without me having to provide some forked version. There may well be issues, I will do more tests later on.

Michel

For Linux Software visit http://home.comcast.net/~mcatudal

Reply by email