Recent

Author Topic: Compile FPC 3.0.0 rc1 on Raspberry pi 3 aarch64  (Read 9546 times)

desmondc

  • New member
  • *
  • Posts: 9
Compile FPC 3.0.0 rc1 on Raspberry pi 3 aarch64
« on: October 11, 2017, 12:31:38 pm »
Hi there,

I'm trying to build fpc 3.0.0 rc1 on raspberry pi 3 running opensuse leap/tumbleweed
Linux 4.13.2-1-default #1 SMP (68f4aee) aarch64 aarch64 aarch64 GNU/Linux

The builder I'm using is from http://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.arm-linux.tar and is it seems to work:

ppcarm
Free Pascal Compiler version 2.6.4 [2014/03/21] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
/usr/local/lib/fpc/2.6.4/ppcarm [options] <inputfile> [options]
.....


I cannot build fpc though. make all produces (with or without OPT=-dFPC_ARMHF)

make compiler_cycle RELEASE=1
make[1]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1'
make -C compiler cycle
make[2]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
make tempclean ppc3
make[3]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
/usr/bin/rm -f ppcrossarm ppc ppc1 ppc2 ppc3 ./msg2inc pp1.wpo pp2.wpo
make 'OLDFPC=' next CYCLELEVEL=1
make[4]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
make rtlclean rtl
make[5]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
make -C /usr/local/src/fpc/release_3_0_0_rc1/rtl clean
make[6]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl'
/usr/bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res 
/usr/bin/rm -f *.s *_ppas.sh
make -C linux clean
make[7]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl/linux'
/usr/bin/rm -f /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/prt0.o /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/dllprt0.o /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cprt0.o /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/gprt0.o /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/ucprt0.o
/usr/bin/rm -f /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/system.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/fpintres.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/uuchar.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/unixtype.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/ctypes.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/baseunix.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/strings.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/objpas.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/macpas.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/iso7185.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/syscall.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/unixutil.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/heaptrc.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/lineinfo.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/lnfodwrf.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/termio.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/unix.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/linux.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/initc.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cmem.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/linuxvcs.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/sysutils.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/typinfo.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/math.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/charset.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cpall.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/character.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/unixcp.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/getopts.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/errors.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/dl.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/dynlibs.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/types.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/sysconst.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/fpwidestring.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cthreads.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/classes.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/fgl.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/rtlconsts.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/dos.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cwstring.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/fpcylix.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/exeinfo.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1250.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1251.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1252.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1253.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1254.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1255.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1256.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1257.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp1258.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp437.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp646.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp850.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp856.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp866.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp874.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp8859_1.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp8859_5.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp8859_2.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/cp852.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/unicodedata.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/unicodenumtable.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/syslinux.ppu /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/linux.ppu
/usr/bin/rm -f /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/math.rst /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/typinfo.rst /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/sysconst.rst /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/rtlconsts.rst
/usr/bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res 
/usr/bin/rm -f *.s *_ppas.sh
make[7]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl/linux'
make[6]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl'
make -C /usr/local/src/fpc/release_3_0_0_rc1/rtl 'OPT=-dFPC_ARMHF  ' all
make[6]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl'
make -C linux all
make[7]: Entering directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl/linux'
as  -o /usr/local/src/fpc/release_3_0_0_rc1/rtl/units/arm-linux/prt0.o arm/prt0.as
arm/prt0.as: Assembler messages:
arm/prt0.as:52: Error: operand 1 must be an integer register -- `ldr ip,=__dl_fini'
arm/prt0.as:53: Error: operand 1 must be an integer register -- `str a1,[ip]'
arm/prt0.as:87: Error: unknown mnemonic `ldmia' -- `ldmia sp!,{a2}'
arm/prt0.as:90: Error: operand 1 must be an integer register -- `ldr ip,=operatingsystem_parameter_argc'
arm/prt0.as:91: Error: operand 1 must be an integer register -- `ldr a3,=operatingsystem_parameter_argv'
arm/prt0.as:92: Error: operand 1 must be an integer register -- `str a2,[ip]'
arm/prt0.as:95: Error: operand 1 must be an integer or stack pointer register -- `add a2,a2,#1'
arm/prt0.as:96: Error: operand 1 must be an integer or stack pointer register -- `add a2,sp,a2,LSL#2'
arm/prt0.as:97: Error: operand 1 must be an integer register -- `ldr ip,=operatingsystem_parameter_envp'
arm/prt0.as:99: Error: operand 1 must be an integer register -- `str sp,[a3]'
arm/prt0.as:100: Error: operand 1 must be an integer register -- `str a2,[ip]'
arm/prt0.as:103: Error: operand 1 must be an integer register -- `ldr ip,=__stkptr'
arm/prt0.as:104: Error: operand 1 must be an integer register -- `str sp,[ip]'
arm/prt0.as:123: Error: unknown mnemonic `swi' -- `swi 0x900001'
arm/prt0.as:130: Error: operand 1 must be an integer register -- `ldr r0,=__dl_fini'
arm/prt0.as:131: Error: operand 1 must be an integer register -- `ldr r0,[r0]'
arm/prt0.as:132: Error: operand 1 must be an integer or stack pointer register -- `cmp r0,#0'
arm/prt0.as:142: Error: unknown mnemonic `movne' -- `movne lr,pc'
arm/prt0.as:143: Error: unknown mnemonic `bxne' -- `bxne r0'
arm/prt0.as:147: Error: operand 1 must be an integer register -- `ldr r0,=operatingsystem_result'
arm/prt0.as:148: Error: operand 1 must be an integer register -- `ldr r0,[r0]'
arm/prt0.as:149: Error: operand 1 must be an integer register -- `mov r7,#248'
arm/prt0.as:150: Error: unknown mnemonic `swi' -- `swi 0x0'
make[7]: *** [Makefile:3449: prt0.o] Error 1
make[7]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl/linux'
make[6]: *** [Makefile:1928: linux_all] Error 2
make[6]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/rtl'
make[5]: *** [Makefile:4076: rtl] Error 2
make[5]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
make[4]: *** [Makefile:3967: next] Error 2
make[4]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
make[3]: *** [Makefile:3972: ppc1] Error 2
make[3]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
make[2]: *** [Makefile:3984: cycle] Error 2
make[2]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1/compiler'
make[1]: *** [Makefile:2780: compiler_cycle] Error 2
make[1]: Leaving directory '/usr/local/src/fpc/release_3_0_0_rc1'
make: *** [Makefile:2812: build-stamp.arm-linux] Error 2


Any advice?

AndyPreston

  • Newbie
  • Posts: 6
Re: Compile FPC 3.0.0 rc1 on Raspberry pi 3 aarch64
« Reply #1 on: February 24, 2018, 08:42:29 pm »
I've got the same problem trying to build a 2.6.2 cross compiler using a Buildroot toolchain's assembler.

Did you get anywhere with this problem?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11946
  • FPC developer.
Re: Compile FPC 3.0.0 rc1 on Raspberry pi 3 aarch64
« Reply #2 on: February 24, 2018, 09:00:23 pm »
You need trunk for aarch64 afaik.

AndyPreston

  • Newbie
  • Posts: 6
Re: Compile FPC 3.0.0 rc1 on Raspberry pi 3 aarch64
« Reply #3 on: February 25, 2018, 12:16:32 am »
Thanks... I'm not sure if this is any use for desmondc but I'll see if I can get a Buildroot image that doesn't use aarch64 (I'm very new to ARM so haven't got much idea what I'm talking about at the moment)

With so much other new-to-me stuff going on, I'm not sure if using Trunk would be a good idea at the moment.

 

TinyPortal © 2005-2018