ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Tools: ardupilotwaf: use classic clang linker when compiling on macOS

Open srmainwaring opened this issue 1 year ago • 5 comments

Fix issue where linker fails with Xcode 15.3.

Reported here:

  • https://discuss.ardupilot.org/t/compile-ardupilot-4-4-4-copter-sitl-on-mac-m1-sonoma-14-4/115210
  • https://discord.com/channels/674039678562861068/674039678982422579/1225621147278770316

Some discussion about Xcode linker changes here:

  • https://developer.apple.com/forums/thread/731089?page=2

Fix verified using:

  • MacBookPro M1 Max
  • macOS Sonoma 14.3.1
  • Xcode_15.3
  • Command_Line_Tools_for_Xcode_15.3

Tasks

  • [x] Needs to be backwards compatible for versions of Apple clang < 15.0.0 (clang-1500.3.9.4)

srmainwaring avatar Apr 05 '24 17:04 srmainwaring

Works for me - thanks @srmainwaring !

timtuxworth avatar Apr 05 '24 17:04 timtuxworth

I still can't get this to fail for me even though I am using XCode 15.3!

andyp1per avatar Apr 07 '24 14:04 andyp1per

I still can't get this to fail for me even though I am using XCode 15.3!

That's odd. Did you update the command line tools to 15.3 as well?

srmainwaring avatar Apr 07 '24 20:04 srmainwaring

Can confirm this fix is working for me on a MacBook Air M2.

Xcode Tools version: 15.3.0.0.1.1708646388, macOS Sonoma 14.4.1

afonsoVale avatar May 01 '24 23:05 afonsoVale

I've tagged this for the dev call so that it's not forgotten.

rmackay9 avatar May 01 '24 23:05 rmackay9

This has been included in 4.5.6

rmackay9 avatar Sep 03 '24 01:09 rmackay9