Sign in Join

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

Mailing lists / fpc-devel / 2013-08

fpc 2.6.2 gives AV on arm

11 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Joost van der Sluis

Hi all,

I've cross-compiled a ppcarm, and now I try to use that compiler on qemu to build fpc (2.6.2).

But the compiler crashes on compiling the system-unit. But with trunk (2.7.1) this all works.

Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target of Fedora (armv7, hardware float, little endian). Maybe someone knows in which revision this could have been fixed, so that I can apply that fix to 2.6.2 on Fedora?

Here's the stacktrace:

/home/joost/ppcarm -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE.
-FU/home/joost/rpmbuild/BUILD/fpcbuild-2.6.2/fpcsrc/rtl/units/arm-linux -k"--build-id" -gl -darm -dRELEASE -Us -Sg system.pp -dFPC_ARMEL Fatal: Compilation aborted
An unhandled exception occurred at $0003CDD0 :
EAccessViolation : Access violation
$0003CDD0 FINDGETFILEINFO, line 711 of ../unix/sysutils.pp $0003D118 FINDNEXT, line 774 of ../unix/sysutils.pp $0003D350 FINDFIRST, line 816 of ../unix/sysutils.pp $0004B970 TCACHEDDIRECTORY__RELOAD, line 266 of cfileutl.pas $0004B678 TCACHEDDIRECTORY__FORCEUSECACHE, line 223 of cfileutl.pas $0004B624 TCACHEDDIRECTORY__TRYUSECACHE, line 212 of cfileutl.pas $0004BE94 TCACHEDDIRECTORY__DIRECTORYEXISTS, line 346 of cfileutl.pas $0004C464 TDIRECTORYCACHE__DIRECTORYEXISTS, line 422 of cfileutl.pas $0004CF90 PATHEXISTS, line 676 of cfileutl.pas
$0004E6BC TSEARCHPATHLIST__ADDPATH, line 1120 of cfileutl.pas $0004DFC8 TSEARCHPATHLIST__ADDPATH, line 975 of cfileutl.pas $000E0AB8 TOPTION__INTERPRET_OPTION, line 1058 of options.pas $000E53C0 TOPTION__READ_PARAMETERS, line 2280 of options.pas $000E6ACC READ_ARGUMENTS, line 2808 of options.pas $0002CE74 INITCOMPILER, line 187 of compiler.pas $0002CF68 COMPILE, line 234 of compiler.pas
$00008360 main, line 223 of pp.pas

Reply by email

Joost van der Sluis
to Jonas Maebe
Jonas Maebe wrote 6 lines
On 09 Aug 2013, at 18:46, Joost van der Sluis wrote: > Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target of Fedora (armv7, hardware float, little endian). The EABI with hardfloat is not supported at all in 2.6.2.

That's good to know. But in that case it should still work with soft-float, no?

If I explicitly add -Cfsoft it gives the exact same result. This is what I use to build the compiler:

make clean all CPU_TARGET=arm BINUTILSPREFIX=arm-linux-gnu- CROSSOPT="-O- -CaEABI -gl -dFPC_ARMEL -Cfsoft"

I did not add armv7, because if I do that, the ppcarm executable crashes immediately after startup.

Joost.

Reply by email

Michel Catudal
to Jonas Maebe: The EABI with hardfloat is not supported at all in 2.6.2. Jonas
Jonas Maebe wrote 10 lines
On 09 Aug 2013, at 18:46, Joost van der Sluis wrote: > Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target of Fedora (armv7, hardware float, little endian). The EABI with hardfloat is not supported at all in 2.6.2. Jonas_______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

This is not true, with the proper patches it works beautifully. Check catudodroid on sourceforge. If anyone is interested I can create one for Fedora on odroid. I have working fpc on both funtoo and ubuntu.

Michel

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

Reply by email

Joost van der Sluis
to Joost van der Sluis: I've cross-compiled a ppcarm, and now I try to use that compiler on qemu to build fpc…
Joost van der Sluis wrote 12 lines
Hi all, I've cross-compiled a ppcarm, and now I try to use that compiler on qemu to build fpc (2.6.2). But the compiler crashes on compiling the system-unit. But with trunk (2.7.1) this all works. Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target of Fedora (armv7, hardware float, little endian). Maybe someone knows in which revision this could have been fixed, so that I can apply that fix to 2.6.2 on Fedora?

Hard to do a bisect when you have to cross-compile and copy the binary to another machine each time... but it was r19562.

Which is the revision to switch to armel by default.

I had to add OPT=-dFPC_ARMEL, CROSSOPT=-dFPC_ARMEL alone was not enough.

Joost.

Reply by email

Florian Klämpfl
to Joost van der Sluis
Joost van der Sluis wrote 20 lines
On 08/09/2013 06:46 PM, Joost van der Sluis wrote: > Hi all, > > I've cross-compiled a ppcarm, and now I try to use that compiler on qemu > to build fpc (2.6.2). > > But the compiler crashes on compiling the system-unit. But with trunk > (2.7.1) this all works. > > Thing is that I'm trying to get fpc 2.6.2 working on the new arm-target > of Fedora (armv7, hardware float, little endian). Maybe someone knows in > which revision this could have been fixed, so that I can apply that fix > to 2.6.2 on Fedora? Hard to do a bisect when you have to cross-compile and copy the binary to another machine each time... but it was r19562. Which is the revision to switch to armel by default. I had to add OPT=-dFPC_ARMEL, CROSSOPT=-dFPC_ARMEL alone was not enough.

Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all.

Reply by email

peter green
to Joost van der Sluis: That's good to know. But in that case it should still work with soft-float, no? If I…
Joost van der Sluis wrote 11 lines
On 08/09/2013 07:07 PM, Jonas Maebe wrote: > > On 09 Aug 2013, at 18:46, Joost van der Sluis wrote: > >> Thing is that I'm trying to get fpc 2.6.2 working on the new >> arm-target of Fedora (armv7, hardware float, little endian). > > The EABI with hardfloat is not supported at all in 2.6.2. That's good to know. But in that case it should still work with soft-float, no?

Things will break if you try and link with C libraries but building the compiler itself with softfloat options should work. If you want patches for hardfloat with 2.6.2 you can find them at
https://code.google.com/p/bollin/source/browse/#svn%2Ffpc%2Ftrunk%2Fdebian%2Fpatches the hardfloat releated patches are armhf.diff armhf-linker-path.diff armhf-build-with-2.6.0.diff (only needed if bootstrapping with 2.6.0) and regenerate_messages.diff

Once the patches are applied use -dFPC_ARMHF instead of -dFPC_ARMEL to get a hardlfoat build.

What linker are you using? the gnu gold linker is known to break freepascal.

Reply by email

Mattias Gaertner
to Jonas Maebe
Show quoted text 13 lines
On 15 Aug 2013, at 11:26, Mattias Gaertner wrote: > On Fri, 09 Aug 2013 23:10:05 +0200 > Florian Klämpfl wrote: > >> >> Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all. > > It's on the wiki: > http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Building_the_compiler_yourself_in_Linux It only mentions OPT=-dFPC_ARMEL, not CROSSOPT=-dFPC_ARMEL.

You are right. I misread the mails and misunderstood Joost statement. Sorry.

Mattias

Reply by email

Joost van der Sluis
to Mattias Gaertner
Mattias Gaertner wrote 19 lines
On Thu, 15 Aug 2013 11:45:38 +0200 Jonas Maebe wrote: > > On 15 Aug 2013, at 11:26, Mattias Gaertner wrote: > >> On Fri, 09 Aug 2013 23:10:05 +0200 >> Florian Klämpfl wrote: >> >>> >>> Where did you get the CROSSOPT=-dFPC_ARMEL from? It is not needed at all. >> >> It's on the wiki: >> http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Building_the_compiler_yourself_in_Linux > > It only mentions OPT=-dFPC_ARMEL, not CROSSOPT=-dFPC_ARMEL. You are right. I misread the mails and misunderstood Joost statement. Sorry.

I think I got confused and mixed the two. Probably because of some other things I've tried with other CROSSOPT options.

Joost.

Reply by email