-
-
Notifications
You must be signed in to change notification settings - Fork 23.4k
[3.x] Fix build on macOS 26 by removing AGL framework link #110898
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
Conversation
Previously, a link error occurred as we'd be trying to link against a nonexistent framework. AGL was removed in macOS Tahoe since the first beta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AGL should not be used by the current 3.x OpenGL, so it should be fine to remove it. I do not have any functional Intel macs, but will test it on some older macOS versions on the weekend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on macOS 12, 15 and 26.
AGL was deprecated in 10.8 and not used by any of Godot 3.x versions (it seems to be used by Godot 2.x).
2.1 seems to be runnable on macOS 26, so its AGL code might be dead (or framework still exists in Rosetta, and only removed from SDK). 2.x build fails for unrelated reasons. |
2.1 also builds and runs on macOS 26 with the following small patch, so AGL code is unused. Patchdiff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 20d313809e..321241b7f2 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -81,7 +81,7 @@ def configure(env):
env.Append(LIBS=['pthread'])
#env.Append(CPPFLAGS=['-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks', '-isysroot', '/Developer/SDKs/MacOSX10.4u.sdk', '-mmacosx-version-min=10.4'])
#env.Append(LINKFLAGS=['-mmacosx-version-min=10.4', '-isysroot', '/Developer/SDKs/MacOSX10.4u.sdk', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'])
- env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-lz', '-framework', 'IOKit', '-framework', 'ForceFeedback'])
+ env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'OpenGL', '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-lz', '-framework', 'IOKit', '-framework', 'ForceFeedback'])
env.Append(LINKFLAGS=["-mmacosx-version-min=10.9"])
if (env["CXX"] == "clang++"):
diff --git a/thirdparty/libpng/pngpriv.h b/thirdparty/libpng/pngpriv.h
index 57e1bf989b..d8f5e6d277 100644
--- a/thirdparty/libpng/pngpriv.h
+++ b/thirdparty/libpng/pngpriv.h
@@ -518,7 +518,7 @@
# include <float.h>
# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
+ defined(THINK_C) || defined(__SC__)
/* We need to check that <math.h> hasn't already been included earlier
* as it seems it doesn't agree with <fp.h>, yet we should really use
* <fp.h> if possible.
diff --git a/thirdparty/zlib/zutil.h b/thirdparty/zlib/zutil.h
index b079ea6a80..ea705c61a1 100644
--- a/thirdparty/zlib/zutil.h
+++ b/thirdparty/zlib/zutil.h
@@ -27,6 +27,7 @@
# endif
# include <string.h>
# include <stdlib.h>
+# include <stdio.h>
#endif
#ifdef Z_SOLO |
Thanks! |
Previously, a link error occurred as we'd be trying to link against a nonexistent framework. AGL was removed in macOS Tahoe since the first beta.
Please test on older macOS versions as well as Intel Macs, as I've only tested this on macOS 26 on Apple Silicon.
This fix isn't necessary in 4.x.