Recent

Author Topic: Errors linking the project - ppaslin.sh - Segment fault / Bus error: 10  (Read 819 times)

Pepin

  • Newbie
  • Posts: 2
Hello everyone.

First at all, congratulations for this forum!

My English is very bad, excuse me if my writing is not as good as I would like.

I installed Lazarus following instructions and the installation ended successfully but, when I trie to compile a project I get errors in the linking phase:

    Ppaslink.sh: line 9: 62623 Bus error: 10
    An error occurred while linking
Or:
     Ppaslink.sh: line 9: 64135 Segmentation fault: 11
     An error occurred while linking


I'm using a MacBook with M3 chip and macOS 15.4 operating system (Sequoia)

Does anyone know what it can be due to and how it can be solved?

Thank you very much.

Thaddy

  • Hero Member
  • *****
  • Posts: 16982
  • Ceterum censeo Trump esse delendam
Looks like a hardware problem: a bus error can not be caused by a fpc/lazarus compile. A bus error is always a hardware issue.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 372
I too just started getting this after upgrading to Sequoia (Lazarus 4.0RC1 (rev Unknown) FPC 3.2.2 aarch64-darwin-cocoa, was compiling & linking fine before upgrading to Sequoia)

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 372
I also get this problem doing a new install on sequoia using the fixes_4 branch:

Code: Pascal  [Select][+][-]
  1. ld: warning: ignoring duplicate libraries: '-lc'
  2. ld: warning: no platform load command found in '/Users/grahamegrieve/eclipse-workspace4/lazarusFixes/units/aarch64-darwin/cocoa/lazarus.or', assuming: macOS
  3. ./../ppaslink.sh: line 9: 29062 Segmentation fault: 11  /Library/Developer/CommandLineTools/usr/bin/ld -weak_framework AppKit -weak_framework UserNotifications -order_file ../symbol_order.fpc -multiply_defined suppress -L. -o ../lazarus `cat ../link28415.res` -filelist ../linkfiles28415.res
  4. An error occurred while linking
  5. Error: (9013) Error while linking

MacOS version: 15.4.1 (24E263), XCode Version 16.3 (16E140)

dbannon

  • Hero Member
  • *****
  • Posts: 3352
    • tomboy-ng, a rewrite of the classic Tomboy
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 372
actually, to my surprise, it did. I had -WM11.0. Changing it to -WM10.9 resulted in linker errors about missing stuff, but it linked with -WM10.15

Thanks!

PascalDragon

  • Hero Member
  • *****
  • Posts: 5968
  • Compiler Developer
Looks like a hardware problem: a bus error can not be caused by a fpc/lazarus compile. A bus error is always a hardware issue.

Wrong. A bus error occurs when some memory is accessed in an unaligned way while it should be accessed in an aligned way. And even though Aarch64 allows for the operating system to enable unaligned accesses to normal memory there is still memory (e.g. device memory) that has alignment requirements.

MarcoST

  • Newbie
  • Posts: 1
I installed Lazarus v4 final release, All is said OK.

Trying to compile the basic project on opening these are the errors I get :


Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.2.2 [2021/05/16] for aarch64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Darwin for AArch64
(3104) Compiling /Users/marco/tmp/project1.lpr
(3104) Compiling unit1.pas
/Users/marco/tmp/unit1.pas(17,28) Hint: (5024) Parameter "Sender" not used
(9009) Assembling unit1
(9009) Assembling project1
(9022) Compiling resource /Users/marco/tmp/lib/aarch64-darwin/project1.or
-macosx_version_min has been renamed to -macos_version_min
ld: warning: -multiply_defined is obsolete
ld: warning: ignoring duplicate libraries: '-lc'
(9015) Linking /Users/marco/tmp/project1
ld: warning: no platform load command found in '/Users/marco/tmp/lib/aarch64-darwin/project1.or', assuming: macOS
/Users/marco/tmp/ppaslink.sh: line 9: 81340 Bus error: 10           /Library/Developer/CommandLineTools/usr/bin/ld -weak_framework AppKit -weak_framework UserNotifications -order_file /Users/marco/tmp/symbol_order.fpc -multiply_defined suppress -L. -o /Users/marco/tmp/project1 `cat /Users/marco/tmp/link81330.res` -filelist /Users/marco/tmp/linkfiles81330.res
An error occurred while linking
Error: (9013) Error while linking
Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/local/bin/ppca64 returned an error exitcode


Compile Project, Target: /Users/marco/tmp/project1: Exit code 1, Errors: 3, Warnings: 3
Error: -macosx_version_min has been renamed to -macos_version_min
Warning: ld: warning: -multiply_defined is obsolete
Warning: ld: warning: ignoring duplicate libraries: '-lc'
Warning: ld: warning: no platform load command found in '/Users/marco/tmp/lib/aarch64-darwin/project1.or', assuming: macOS
Error: /Users/marco/tmp/ppaslink.sh: line 9: 81340 Bus error: 10           /Library/Developer/CommandLineTools/usr/bin/ld -weak_framework AppKit -weak_framework UserNotifications -order_file /Users/marco/tmp/symbol_order.fpc -multiply_defined suppress -L. -o /Users/marco/tmp/project1 `cat /Users/marco/tmp/link81330.res` -filelist /Users/marco/tmp/linkfiles81330.res
An error occurred while linking
Error: Error while linking

 

TinyPortal © 2005-2018