Sign in Join

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

Mailing lists / fpc-pascal / 2015-06

Help building FPC on armhf

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Andrew Brunner

Hi there,

I recently installed fpc-2.6.4 on my Wandboard-Quad for production. I have fpc from svn but I get an error when I try to build.

Compiling ARM Free Pascal Compiler...
make clean all OPT=-O- DEBUG=1 OS_TARGET=linux CPU_TARGET=armhf CPU_SOURCE=arm
make: -iVSPTPSOTO: Command not found
Makefile:215: *** The Makefile doesn't support target armhf-linux, please run fpcmake first. Stop.

Can someone help?

Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more.

Reply by email

Jonas Maebe
to Andrew Brunner
Andrew Brunner wrote 11 lines
I recently installed fpc-2.6.4 on my Wandboard-Quad for production. I have fpc from svn but I get an error when I try to build. Compiling ARM Free Pascal Compiler... make clean all OPT=-O- DEBUG=1 OS_TARGET=linux CPU_TARGET=armhf CPU_SOURCE=arm make: -iVSPTPSOTO: Command not found Makefile:215: *** The Makefile doesn't support target armhf-linux, please run fpcmake first. Stop. Can someone help?

1) the error you get means that the "fpc" binary is not in your path. Building FPC always has been and always will be only supported with an existing, complete installation of the latest FPC release in your path
2) FPC 2.6.4 does not contain ARMHF support (except in an unofficial, and completely unsupported by us, Debian backport)
3) "ARM hard float" not a different kind of CPU compared to ARM. To build FPC for ARM hard-float using a non-ARMHF compiler, perform a make all for CPU_TARGET=ARM with OPT="-dARMHF"

Jonas

Reply by email

Andrew Brunner
to Jonas Maebe
Jonas Maebe wrote 8 lines
1) the error you get means that the "fpc" binary is not in your path. Building FPC always has been and always will be only supported with an existing, complete installation of the latest FPC release in your path 2) FPC 2.6.4 does not contain ARMHF support (except in an unofficial, and completely unsupported by us, Debian backport) 3) "ARM hard float" not a different kind of CPU compared to ARM. To build FPC for ARM hard-float using a non-ARMHF compiler, perform a make all for CPU_TARGET=ARM with OPT="-dARMHF"

Thanks Jonas, I was able to get a bit further along in the build process.

make clean all OPT=-dARMHF DEBUG=1 OS_TARGET=linux CPU_TARGET=arm CPU_SOURCE=arm

Building crashes at compiling system.pp

as -o /Developer/FPC/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as as -o /Developer/FPC/rtl/units/arm-linux/cprt0.o arm/cprt0.as as -o /Developer/FPC/rtl/units/arm-linux/gprt0.o arm/gprt0.as as -o /Developer/FPC/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as /Developer/FPC/compiler/ppc1 -Ur -gl -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/Developer/FPC/rtl/units/arm-linux -dARMHF -darm -dDEBUG -dRELEASE -Us -Sg system.pp
flt_pack.inc(119,5) Error: Syntax error while parsing a conditional compiling expression
system.inc(1884,8) Warning: Implicit string type conversion from "RawByteString" to "UnicodeString"
system.pp(377) Fatal: There were 1 errors compiling module, stopping Makefile:3573: recipe for target 'system.ppu' failed make[7]: *** [system.ppu] Error 1
make[7]: Leaving directory '/Developer/FPC/rtl/linux' Makefile:1950: recipe for target 'linux_all' failed make[6]: *** [linux_all] Error 2
make[6]: Leaving directory '/Developer/FPC/rtl'
Makefile:4157: recipe for target 'rtl' failed
make[5]: *** [rtl] Error 2
make[5]: Leaving directory '/Developer/FPC/compiler' Makefile:4046: recipe for target 'next' failed
make[4]: *** [next] Error 2
make[4]: Leaving directory '/Developer/FPC/compiler' Makefile:4055: recipe for target 'ppc2' failed
make[3]: *** [ppc2] Error 2
make[3]: Leaving directory '/Developer/FPC/compiler' Makefile:4063: recipe for target 'cycle' failed
make[2]: *** [cycle] Error 2
make[2]: Leaving directory '/Developer/FPC/compiler' Makefile:2826: recipe for target 'compiler_cycle' failed make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory '/Developer/FPC'
Makefile:2858: recipe for target 'build-stamp.arm-linux' failed make: *** [build-stamp.arm-linux] Error 2

Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more.

Reply by email

Michael Ring
to Andrew Brunner

I am using parameters suggested on this page (modified for armv7a):

http://michellcomputing.co.uk/blog/2014/05/freepascal-2-7-1-on-raspberry-pi/

OPT="-dREVINC -dFPC_ARMHF -CX -CpARMV7A -CfVFPV3_D16 -OpARMV7A -O2 -OoFASTMATH -XX -Xs"

as your error seems to be caused by some conditional parsing the extra defines above might help (or not .....)

Michael

Andrew Brunner wrote 57 lines
On 6/28/2015 4:47 AM, Jonas Maebe wrote: > 1) the error you get means that the "fpc" binary is not in your path. > Building FPC always has been and always will be only supported with > an existing, complete installation of the latest FPC release in your > path 2) FPC 2.6.4 does not contain ARMHF support (except in an > unofficial, and completely unsupported by us, Debian backport) 3) > "ARM hard float" not a different kind of CPU compared to ARM. To > build FPC for ARM hard-float using a non-ARMHF compiler, perform a > make all for CPU_TARGET=ARM with OPT="-dARMHF" Thanks Jonas, I was able to get a bit further along in the build process. make clean all OPT=-dARMHF DEBUG=1 OS_TARGET=linux CPU_TARGET=arm CPU_SOURCE=arm Building crashes at compiling system.pp as -o /Developer/FPC/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as as -o /Developer/FPC/rtl/units/arm-linux/cprt0.o arm/cprt0.as as -o /Developer/FPC/rtl/units/arm-linux/gprt0.o arm/gprt0.as as -o /Developer/FPC/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as /Developer/FPC/compiler/ppc1 -Ur -gl -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/Developer/FPC/rtl/units/arm-linux -dARMHF -darm -dDEBUG -dRELEASE -Us -Sg system.pp flt_pack.inc(119,5) Error: Syntax error while parsing a conditional compiling expression system.inc(1884,8) Warning: Implicit string type conversion from "RawByteString" to "UnicodeString" system.pp(377) Fatal: There were 1 errors compiling module, stopping Makefile:3573: recipe for target 'system.ppu' failed make[7]: *** [system.ppu] Error 1 make[7]: Leaving directory '/Developer/FPC/rtl/linux' Makefile:1950: recipe for target 'linux_all' failed make[6]: *** [linux_all] Error 2 make[6]: Leaving directory '/Developer/FPC/rtl' Makefile:4157: recipe for target 'rtl' failed make[5]: *** [rtl] Error 2 make[5]: Leaving directory '/Developer/FPC/compiler' Makefile:4046: recipe for target 'next' failed make[4]: *** [next] Error 2 make[4]: Leaving directory '/Developer/FPC/compiler' Makefile:4055: recipe for target 'ppc2' failed make[3]: *** [ppc2] Error 2 make[3]: Leaving directory '/Developer/FPC/compiler' Makefile:4063: recipe for target 'cycle' failed make[2]: *** [cycle] Error 2 make[2]: Leaving directory '/Developer/FPC/compiler' Makefile:2826: recipe for target 'compiler_cycle' failed make[1]: *** [compiler_cycle] Error 2 make[1]: Leaving directory '/Developer/FPC' Makefile:2858: recipe for target 'build-stamp.arm-linux' failed make: *** [build-stamp.arm-linux] Error 2

Reply by email

Andrew Brunner
to Michael Ring
Michael Ring wrote 12 lines
I am using parameters suggested on this page (modified for armv7a): http://michellcomputing.co.uk/blog/2014/05/freepascal-2-7-1-on-raspberry-pi/ OPT="-dREVINC -dFPC_ARMHF -CX -CpARMV7A -CfVFPV3_D16 -OpARMV7A -O2 -OoFASTMATH -XX -Xs" as your error seems to be caused by some conditional parsing the extra defines above might help (or not .....) Michael

Hi Michael,

I tried to use the options above to no avail. Thanks for the effort though.

Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more.

Reply by email

Jonas Maebe
to Andrew Brunner: Thanks Jonas, I was able to get a bit further along in the build process. make clean all…

Andrew Brunner wrote on Sun, 28 Jun 2015:

Show quoted text 15 lines
make clean all OPT=-dARMHF DEBUG=1 OS_TARGET=linux CPU_TARGET=arm CPU_SOURCE=arm Building crashes at compiling system.pp as -o /Developer/FPC/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as as -o /Developer/FPC/rtl/units/arm-linux/cprt0.o arm/cprt0.as as -o /Developer/FPC/rtl/units/arm-linux/gprt0.o arm/gprt0.as as -o /Developer/FPC/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as /Developer/FPC/compiler/ppc1 -Ur -gl -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/Developer/FPC/rtl/units/arm-linux -dARMHF -darm -dDEBUG -dRELEASE -Us -Sg system.pp flt_pack.inc(119,5) Error: Syntax error while parsing a conditional compiling expression

That suggests a miscompiled ppc1. You can try using OPT="-dARMHF -O-" for the initial bootstrap to avoid potential wrong optimisations by the 2.6.4 starting compiler. Unrelated to this, you should probably also specify the correct architecture and VFP version for your platform, similar to what Michael suggested (but not necessarily the same, as it depends on your CPU).

Jonas

Reply by email

Michael Ring
to Andrew Brunner: I tried to use the options above to no avail. Thanks for the effort though. Andrew…

I think I now remember having the same problem before, can you please try to build with "-O-" instead of -O2 ?

In the past the compiler threw an exception in system.pas, perhaps it now displays an error message.

Michael

Andrew Brunner wrote 20 lines
On 6/28/2015 8:56 AM, Michael Ring wrote: > I am using parameters suggested on this page (modified for armv7a): > > http://michellcomputing.co.uk/blog/2014/05/freepascal-2-7-1-on-raspberry-pi/ > > > OPT="-dREVINC -dFPC_ARMHF -CX -CpARMV7A -CfVFPV3_D16 -OpARMV7A -O2 > -OoFASTMATH -XX -Xs" > > as your error seems to be caused by some conditional parsing the > extra defines above might help (or not .....) > > Michael Hi Michael, I tried to use the options above to no avail. Thanks for the effort though.

Reply by email

Michael Ring
to Jonas Maebe: Andrew Brunner wrote on Sun, 28 Jun 2015: That suggests a miscompiled ppc1. You can try…

At least for debian the values for Floating point should be OK for the Wandboard:

"Currently the Debian armhf port requires at least an ARMv7 CPU with Thumb-2 and VFP3D16." (https://wiki.debian.org/ArmHardFloatPort)

Michael

Jonas Maebe wrote 31 lines
Andrew Brunner wrote on Sun, 28 Jun 2015: > make clean all OPT=-dARMHF DEBUG=1 OS_TARGET=linux CPU_TARGET=arm > CPU_SOURCE=arm > > Building crashes at compiling system.pp > > as -o /Developer/FPC/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as > as -o /Developer/FPC/rtl/units/arm-linux/cprt0.o arm/cprt0.as > as -o /Developer/FPC/rtl/units/arm-linux/gprt0.o arm/gprt0.as > as -o /Developer/FPC/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as > /Developer/FPC/compiler/ppc1 -Ur -gl -Ur -Xs -O2 -n -Fi../inc > -Fi../arm -Fi../unix -Fiarm -FE. > -FU/Developer/FPC/rtl/units/arm-linux -dARMHF -darm -dDEBUG -dRELEASE > -Us -Sg system.pp > flt_pack.inc(119,5) Error: Syntax error while parsing a conditional > compiling expression That suggests a miscompiled ppc1. You can try using OPT="-dARMHF -O-" for the initial bootstrap to avoid potential wrong optimisations by the 2.6.4 starting compiler. Unrelated to this, you should probably also specify the correct architecture and VFP version for your platform, similar to what Michael suggested (but not necessarily the same, as it depends on your CPU). Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Andrew Brunner
to Michael Ring: I think I now remember having the same problem before, can you please try to build with…
Michael Ring wrote
I think I now remember having the same problem before, can you please try to build with "-O-" instead of -O2 ?

I've had some success/progress with my Wandboard Quad Revision C. Thanks for all your help however there are still some issues.

When compiling FPC 2.6.4 bootstrap I determined that : -OpARMV71 is not a supported option.
-cfVFPV3 is not a supported option.

On make sourceinstall I determined that there is something wrong with the make process because nothing I do can get make sourceinstall to stop overriding the source in /usr/share/src/fpc-2.6.4 with my 3.1.1 source :-( <snip>
/bin/rm -f build-stamp.*
/bin/rm -f base.build-stamp.*
/usr/bin/install -m 755 -d /usr/share/src/fpc-2.6.4/fpc /bin/cp -Rfp /Developer/FPC/* /usr/share/src/fpc-2.6.4/fpc

The script should have shown /usr/share/src/fpc-3.1.1 etc...

This problem is only with building on Linux-arm. I've never had this issue in any other linux device.

Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more.

Reply by email

Jonas Maebe
to Andrew Brunner

Andrew Brunner wrote on Wed, 01 Jul 2015:

When compiling FPC 2.6.4 bootstrap I determined that : -OpARMV71 is not a supported option. -cfVFPV3 is not a supported option.

The correct parameter is -Cfvfpv3, with a capital C.

Show quoted text 11 lines
On make sourceinstall I determined that there is something wrong with the make process because nothing I do can get make sourceinstall to stop overriding the source in /usr/share/src/fpc-2.6.4 with my 3.1.1 source :-( <snip> /bin/rm -f build-stamp.* /bin/rm -f base.build-stamp.* /usr/bin/install -m 755 -d /usr/share/src/fpc-2.6.4/fpc /bin/cp -Rfp /Developer/FPC/* /usr/share/src/fpc-2.6.4/fpc The script should have shown /usr/share/src/fpc-3.1.1 etc...

It will if either your default compiler is FPC 3.1.1, or if you specify an FPC 3.1.1 compiler via FPC=/path/to/3.1.1/version/of/ppcarm

Jonas

Reply by email