Recent

Author Topic: Errors linking the project - ppaslin.sh - Segment fault / Bus error: 10  (Read 603 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: 16932
  • 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: 3344
    • 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: 5962
  • 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.

 

TinyPortal © 2005-2018