Forum > macOS / Mac OS X

Compile Error (Darain/AArch64)

(1/3) > >>

Grahame Grieve:
Compiling my source, quite a lot of it, I get this error:

Error: Compilation raised exception internally
Error: An unhandled exception occurred at $000000010029FB78:
Error: EBusError: Bus error or misaligned data access
Debug:   $000000010029FB78
Debug:   $000000010029FBB4
Debug:   $0000000100334210
Debug:   $000000010029FBB4
Debug:   $000000010029AE08
Debug:   $000000010029FBB4
Debug:   $0000000100336718
Debug:   $000000010029FBB4
Debug:   $000000010033882C
Debug:   $000000010029FBB4
Debug:   $0000000100330414
Debug:   $000000010029FBB4
Debug:   $0000000100332F2C
Debug:   $000000010029FBB4
Debug:   $0000000100336718
Debug:   $000000010029FBB4
Debug:   $000000010033167C
Debug:
Verbose: Compilation aborted
Verbose: /Users/grahame/tools/lazarus/fpc/bin/aarch64-darwin/ppca64 returned an error exitcode

There's no line, or even source unit associated with this error, so I'm kind of at a loss. It compiles fine for windows64. Any thoughts on what I'd do to investigate?

DonAlfredo:
As the error tells: misaligned data access.
Happens very often on ARM and ARM64 when using pointer magic (or access).
However, I do not know if this is also valid for the sources you are trying to compile.
For me: using the typinfo unit to the max will prevent many of these errors.

I stand corrected. This is indeed a compiler error.

ccrause:
The error messages suggest this is an internal compiler error.  It would help if Grahame can rebuild the compiler with line information added (add option -gl somewhere to the build command).  If this is a release compiler then all information was probably stripped so it would be quite difficult to figure out where in the compiler the error originates from.

Which compiler version is giving this problem?

Jonas Maebe:
On Darwin you need to add -Xg in addition to -gl (and then copy the ppca64.dSYM directory from the compiler directory next to the ppca64 binary). This will also require trunk, or a fairly recent version of the fixes branch.

It's indeed a crash inside the compiler, which is why it's not giving any more information. If you pass -va, you might get some idea of what it was compiling based on the output that appears before the crash.

Grahame Grieve:
Well, I did a fresh install of lazarus from trunk using FPCUpdeluxe with the options -g -gl -O- -Xg for both Lazarus and FPC, and then recompiled, and got more info:

Error: (1026) Compilation raised exception internally
An unhandled exception occurred at $00000001009E12FC:
EBusError: Bus error or misaligned data access
  $00000001009E12FC line 200 of pass_2.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A86D28 line 1352 of ncgcal.pas
  $00000001009E133C line 211 of pass_2.pas
  $00000001009DB898 line 205 of ncgmem.pas
Fatal: (1018) Compilation aborted
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A8989C line 847 of ncgcnv.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A8BEAC line 729 of ncgld.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A82430 line 475 of ncgbas.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A85798 line 998 of ncgcal.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A8989C line 847 of ncgcnv.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A839DC line 334 of ncgcal.pas


 btw, this is fairly straight forward to reproduce: get the GitHub repo, install the dependent packages (most not in OPM) and then compile one of the packages in the GitHub repo. I can provide details if relevant

Navigation

[0] Message Index

[#] Next page

Go to full version