Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions for building Godot on Mac OS do not work on Sonoma (14.4) Xcode 14.5 #9898

Open
zaddok opened this issue Sep 4, 2024 · 5 comments
Labels
area:contributing Issues and PRs related to the Contributing/Development section of the documentation bug platform:macos

Comments

@zaddok
Copy link

zaddok commented Sep 4, 2024

Your Godot version:

4.3-stable

Issue description:

The instructions for building Godot on Mac OS (Sonoma 14.4) are incomplete and/or don't work.

When you follow the instructions on the page, to install scons using brew, clone the repo, then use scons the following errors are generated:

godot % scons platform=macos arch=arm64

scons: Reading SConscript files ...
Auto-detected 12 CPU cores available for build parallelism. Using 11 cores by default. You can override it with the -j argument.
Building for macOS 11.0+.
Building for platform "macos", architecture "arm64", target "editor".
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[Initial build] Compiling platform/macos/os_macos.mm ...
[Initial build] Compiling platform/macos/godot_application.mm ...
[Initial build] Compiling platform/macos/godot_application_delegate.mm ...
[Initial build] Compiling platform/macos/crash_handler_macos.mm ...
[Initial build] Compiling platform/macos/macos_terminal_logger.mm ...
In file included from platform/macos/godot_application.mm:31:
In file included from platform/macos/godot_application.h:34:
In file included from ./core/os/os.h:34:
In file included from ./core/config/engine.h:34:
In file included from ./core/os/main_loop.h:34:
In file included from ./core/input/input_event.h:35:
In file included from ./core/io/resource.h:34:
In file included from ./core/io/resource_uid.h:34:
In file included from ./core/object/ref_counted.h:34:
In file included from ./core/object/class_db.h:34:
In file included from ./core/object/method_bind.h:34:
In file included from ./core/variant/binder_common.h:35:
In file included from ./core/object/object.h:35:
In file included from ./core/object/message_queue.h:35:
In file included from ./core/os/thread_safe.h:34In file included from :
platform/macos/os_macos.mm:31:
In file included from platform/macos/os_macos.h:35:
In file included from platform/macos/joypad_macos.h:31:
In file included from ./core/input/input.h:34:
In file included from ./core/input/input_event.h:35:
In file included from ./core/io/resource.h:34:
In file included from ./core/io/resource_uid.h:34:
In file included from ./core/object/ref_counted.h:34:
In file included from ./core/object/class_db.h:34:
In file included from ./core/object/method_bind.h:34:
In file included from ./core/variant/binder_common.h:35:
In file included from ./core/object/object.h:35:
In file included from ./core/os/mutex.h:34:
In file included from ./core/error/error_macros.h:36:
In file included from ./core/object/message_queue.h:35:
In file included from In file included from ./core/os/thread_safe.h/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/atomic::34522:
:
In file included from In file included from ./core/os/mutex.h/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__atomic/aliases.h::3420:
:
In file included from ./core/error/error_macros.h/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/cstdlib::36144:
:In file included from 9/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/atomic:: error: no member named 'at_quick_exit' in the global namespace
522:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__atomic/aliases.h:20:
using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/cstdlib
:144      ~~^:
9: error: no member named 'at_quick_exit' in the global namespace
using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/cstdlib:145:9: error: no member named 'quick_exit' in the global namespace
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/cstdlib:145:9: errorusing ::quick_exit _LIBCPP_USING_IF_EXISTS;
: no member named 'quick_exit' in the global namespace      ~~^

using ::quick_exit _LIBCPP_USING_IF_EXISTS;
      ~~^

There are actually thousands of errors, I have just included up until the first few errors appear.

I wonder if there are other dependencies needed, or if Xcode needs to be a certain version?

URL to the documentation page:

https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_macos.html

@zaddok zaddok added the bug label Sep 4, 2024
@zaddok
Copy link
Author

zaddok commented Sep 4, 2024

Note that the same problem occurs if you disable Vulcan in a custom.py, or if you include Vulkan like this:

scons platform=macos arch=arm64 vulkan_sdk_path= /Volumes/drive/VulkanSDK/1.3.290.0/

Here is the Xcode/macOS update history in case it could be relevant.

godot % softwareupdate --history
Display Name                                       Version    Date
------------                                       -------    ----
macOS Ventura 13.5                                 13.5       08/07/2023, 14:13:37
Command Line Tools for Xcode                       14.3       08/08/2023, 12:31:41
macOS Ventura 13.5.1                               13.5.1     08/30/2023, 08:00:18
macOS Ventura 13.5.2                               13.5.2     09/12/2023, 15:18:37
Command Line Tools for Xcode                       15.0       09/20/2023, 07:51:11
macOS Sonoma 14.0                                  14.0       10/09/2023, 09:05:23
macOS Sonoma 14.1.2                                14.1.2     12/07/2023, 23:31:17
Command Line Tools for Xcode                       15.1       12/24/2023, 21:55:31
macOS Sonoma 14.2.1                                14.2.1     12/24/2023, 21:57:28
Command Line Tools for Xcode                       15.3       04/19/2024, 23:30:16
macOS Sonoma 14.4.1                                14.4.1     04/19/2024, 23:32:16
macOS Sonoma 14.6.1                                14.6.1     09/04/2024, 15:00:08

@olliejudge
Copy link

I ran the compile from 4.3 branch with up to date Xcode and macOS and it ran fine. I believe your error may be to do with your custom.py. Please clarify the content for testing.

This is a follow on from your reddit thread here: https://www.reddit.com/r/godot/comments/1f8ms6n/comment/llg3su5/?context=3

@bruvzg
Copy link
Member

bruvzg commented Sep 4, 2024

Can't reproduce it on macOS 14.6.1 (23G93) with Xcode 15.4 (15F31d). It's likely either your custom.py or something wrong with Xcode install.

scons platform=macos arch=arm64 vulkan_sdk_path= /Volumes/drive/VulkanSDK/1.3.290.0/

There's extra space after = in the command.

@zaddok
Copy link
Author

zaddok commented Sep 4, 2024

Thank you for letting me know. This means we at least know it works for some Mac's and not others. To be clear I have tried

scons platform=macos arch=arm64
scons platform=macos arch=arm64 vulkan_sdk_path=/Volumes/scripturial/VulkanSDK/1.3.290.0/
scons platform=macos arch=x86_64
scons platform=macos arch=x86_64 vulkan_sdk_path=/Volumes/scripturial/VulkanSDK/1.3.290.0/

I have tried with no custom.py and adding a custom.py.

I also rm -rfed the Command Line Tools folder and did a full reinstall with xcode-select --install

rm -rf /Library/Developer/CommandLineTools
xcode-select --install

@zaddok
Copy link
Author

zaddok commented Sep 4, 2024

Here is a video showing me typing the commands above, and the errors that appear in full.

https://www.youtube.com/watch?v=b0_Sh2AjHZ0

@skyace65 skyace65 added area:contributing Issues and PRs related to the Contributing/Development section of the documentation platform:macos labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:contributing Issues and PRs related to the Contributing/Development section of the documentation bug platform:macos
Projects
None yet
Development

No branches or pull requests

4 participants