Sign in Join

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

Mailing lists / fpc-pascal / 2020-09

FPC for FreeBSD/PowerPC64

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Curtis Hamilton

I'm attempting to port FPC to Freebsd/PowerPC64 and need some help.

I've added initial code to get started. However, when trying to cross compile I'm getting an internal error message when the newly created cross compiler (ppcrossppc64) executes.

/root/Downloads/fpc-3.2.0/compiler/ppcrossppc64 -Ur -Ppowerpc64 -XPpowerpc64-unknown-freebsd11.2- -Xr -XX -CX -Ur -Xs -O2 -n -Fi../inc -Fi../powerpc64 -Fi../unix -Fi../bsd -Fi../bsd/powerpc64 -Fi../freebsd/powerpc64 -FE.
-FU/root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd -dpowerpc64 -dRELEASE -CaDEFAULT -Us -Sg ../bsd/system.pp
sysos.inc(69,12) Fatal: Internal error 2015021001
Fatal: Compilation aborted

Can someone help me decipher this? I've attached the fpc debug file, if that will help.

Regards

Reply by email

Karoly Balogh (Charlie/SGR
to Curtis Hamilton

Hi,

Curtis Hamilton wrote 12 lines
I'm attempting to port FPC to Freebsd/PowerPC64  and need some help.  I've added initial code to get started.  However, when trying to cross compile I'm getting an internal error message when the newly created cross compiler (ppcrossppc64) executes. /root/Downloads/fpc-3.2.0/compiler/ppcrossppc64 -Ur -Ppowerpc64 -XPpowerpc64-unknown-freebsd11.2- -Xr -XX -CX -Ur -Xs -O2 -n -Fi../inc -Fi../powerpc64 -Fi../unix -Fi../bsd -Fi../bsd/powerpc64 -Fi../freebsd/powerpc64 -FE. -FU/root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd -dpowerpc64 -dRELEASE -CaDEFAULT  -Us -Sg ../bsd/system.pp sysos.inc(69,12) Fatal: Internal error 2015021001 Fatal: Compilation aborted Can someone help me decipher this? I've attached the fpc debug file, if that will help.

You can just search the source for that IE number as string. It will reveal, that you failed to specify a default ABI for the target system. This error seems to be PPC64 specific.

See systems/t_linux.pas for an example, and do something similar in the PPC64 FreeBSD port.

Cheers,

Charlie

Reply by email

Jonas Maebe
to Karoly Balogh (Charlie/SGR
See systems/t_linux.pas for an example, and do something similar in the PPC64 FreeBSD port.

You should also set the ABI in systems/i_bsd.pas already. The code in t_linux is because of the support for both big and little endian PowerPC64 (which FreeBSD also has, so you'll indeed have to do the same there).

Jonas

Reply by email

Curtis Hamilton

I've resolved my initial issue. It was something included in the command-line that was causing the error.

I'm trying to use the unmodified linux/powerpc64 files with freebsd. When building bsd/system.pp I get the following:

/root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Assembler messages:
/root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld57 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld58 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld59 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld60 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld61 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld62 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld63 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld64 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld1 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld23 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld24 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld25 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld26 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld27 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld28$strlab does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld30 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld31 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld32 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld33 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld34 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld35 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld36 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld37 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld38 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld39 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld40 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld41 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld42 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld43 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld44 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld45 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld46 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld47 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld48 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld49 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld50 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ._$SYSTEM$_Ld51 does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld52$strlab does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld53$strlab does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld54$strlab does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld55$strlab does not evaluate to a constant /root/Downloads/fpc-3.2.0/rtl/units/powerpc64-freebsd/system.s: Error: .size expression for ..Ld56$strlab does not evaluate to a constant system.pp(395) Error: Error while assembling exitcode 1 system.pp(395) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted

I'm a novice programmer, so any suggestions on what to look at or how to fix this?

PM Curtis Hamilton wrote 28 lines
Thanks for the info. I checked and added code similar to what's in i_linux.pas and t_linux.pas to i_bsd.pas and t_bsd.pas, respectively. However, I'm still getting the same error message. Maybe I'm missing something. Attached are the modified files. Thanks in advance. On Sun, Sep 13, 2020 at 6:06 AM Jonas Maebe via fpc-pascal < > wrote: > On 13/09/2020 10:36, Karoly Balogh (Charlie/SGR) via fpc-pascal wrote: > > See systems/t_linux.pas for an example, and do something similar in the > > PPC64 FreeBSD port. > > You should also set the ABI in systems/i_bsd.pas already. The code in > t_linux is because of the support for both big and little endian > PowerPC64 (which FreeBSD also has, so you'll indeed have to do the same > there). > > > Jonas > _______________________________________________ > fpc-pascal maillist - > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal >

Reply by email