Recent

Author Topic: Compile errors in MacBook OS!!!  (Read 621 times)

Wonder

  • Newbie
  • Posts: 1
Compile errors in MacBook OS!!!
« on: June 18, 2025, 11:16:06 am »
Hi, everybody,

I install the lazarus 4.0 on my latest version Sequoia15.5 MacBook Pro OS, everything is fine, but after the compiling, there are 3 major errors, I am new for lazarus and pascal. So, anybody can give me some information?

Thanks!

The Errors are:

Compile Project, Target: /Users/wonder/prjwonder: 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/wonder/lib/aarch64-darwin/prjwonderbox.or', assuming: macOS
Error: /Users/wonder/WonderBox/ppaslink.sh: line 9:  3810 Segmentation fault: 11  /Library/Developer/CommandLineTools/usr/bin/ld -weak_framework AppKit -weak_framework UserNotifications -order_file /Users/wonder/WonderBox/symbol_order.fpc -multiply_defined suppress -L. -o /Users/wonder/WonderBox/prjwonderbox `cat /Users/wonder/WonderBox/link3804.res` -filelist /Users/wonder/WonderBox/linkfiles3804.res
An error occurred while linking
Error: Error while linking
 

Thaddy

  • Hero Member
  • *****
  • Posts: 17396
  • Ceterum censeo Trump esse delendam
Re: Compile errors in MacBook OS!!!
« Reply #1 on: June 18, 2025, 11:46:06 am »
How did you install, because my mac mini M4 does not have these...
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

cburk

  • Newbie
  • Posts: 2
Re: Compile errors in MacBook OS!!!
« Reply #2 on: July 03, 2025, 01:24:12 am »
I'm not the original poster, but I just got the same error. MacBook Pro, Apple M2 Pro chip.

1. Downloaded fpc and installed.
2. git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git
3. cd lazarus
4. git checkout fixes_4 #also tried on main, same result
5. make clean all LCL_PLATFORM=cocoa CPU_TARGET=aarch64 bigide

Seemed to compile things for a good 2 or 3 minutes, so I think the FPC compiler is at least sort of working.

Here's the errors:
(9009) Assembling lazarus
(9022) Compiling resource ../units/aarch64-darwin/cocoa/lazarus.or
(9015) Linking ../lazarus
-macosx_version_min has been renamed to -macos_version_min
ld: warning: -multiply_defined is obsolete
ld: warning: ignoring duplicate libraries: '-lc'
ld: warning: no platform load command found in '/Users/chas/lazarus/units/aarch64-darwin/cocoa/lazarus.or', assuming: macOS
./../ppaslink.sh: line 9: 54158 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 ../link53563.res` -filelist ../linkfiles53563.res
An error occurred while linking
Error: (9013) Error while linking
Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[2]: *** [lazarus] Error 1
make[1]: *** [ide] Error 2
make: *** [ide] Error 2

I'm coming back to pascal and Lazarus after a couple decades away, but I'm a pretty experienced unix/linux guy, so if you want to ask me to try something, I can probably understand what you're saying.

cburk

  • Newbie
  • Posts: 2
Re: Compile errors in MacBook OS!!!
« Reply #3 on: July 03, 2025, 01:35:48 am »
Replying to myself, hoping to help someone who comes afterward with the same problem.

A different thread on this forum had the solution. It's adding OPT="-WM10.15" to the build line.

So here's how I did the compile, which seems to have worked:

1. Downloaded fpc and installed.
2. git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git
3. cd lazarus
4. git checkout fixes_4 #also tried on main, same result
5. make clean all LCL_PLATFORM=cocoa CPU_TARGET=aarch64 bigide OPT="-WM10.15"
6. wait for a lot of compilation
7. xattr -drv com.apple.quarantine *
8. open ./lazarus.app

And you should have a running IDE. Haven't used it yet, but still.

 

TinyPortal © 2005-2018