godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.6k stars 21.28k forks source link

Failed to build the engine on macOS 15.1.1 (24B91), undefined symbol: __isPlatformVersionAtLeast #99824

Open AllenDang opened 5 days ago

AllenDang commented 5 days ago

Tested versions

System information

macOS 15.1.1 (24B91), Xcode Version 16.1 (16B40)

Issue description

Cannot build engine via scons platform=macos target=template_release arch=arm64, error message is

...
[100%] ld64.lld: warning: Option `-s' is obsolete. Please modernize your usage.
ld64.lld: warning: Option `-stack_size' is not yet implemented. Stay tuned...
ld64.lld: error: undefined symbol: __isPlatformVersionAtLeast
>>> referenced by platform/macos/godot_open_save_delegate.macos.template_release.arm64.o:(symbol -[GodotOpenSaveDelegate makeAccessoryView:filters:options:]+0x98c)
>>> referenced by platform/macos/godot_open_save_delegate.macos.template_release.arm64.o:(symbol -[GodotOpenSaveDelegate makeAccessoryView:filters:options:]+0x478)
>>> referenced by platform/macos/joypad_macos.macos.template_release.arm64.o:(symbol JoypadMacOS::JoypadMacOS()+0x50)
>>> referenced 3 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to reproduce

  1. git pull to pull latest master
  2. scons platform=macos target=template_release arch=arm64

Minimal reproduction project (MRP)

N/A

bruvzg commented 5 days ago

Not reproducible, most likely it's something wrong with Xcode command line tools install (usually an old version that was not automatically updated with Xcode).

Try running xcode-select -p. If it prints something other than /Applications/Xcode.app/Contents/Developer run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.

bruvzg commented 5 days ago

Also check if you have custom toolchain in the PATH. The error (missing __isPlatformVersionAtLeast) is typical for either really ancient Xcode version (like Xcode 10), or incorrectly compiled custom llvm toolchain (usually OSXCross without compiler-rt).

AllenDang commented 2 days ago

@bruvzg

❯ xcode-select -p
/Applications/Xcode.app/Contents/Developer

And my Xcode version is Version 16.1 (16B40), how can I check the incorrect compiled custom llvm toolchain to make it work?