Skip to content

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Sep 25, 2025

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.

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.
@Calinou Calinou added this to the 3.7 milestone Sep 25, 2025
@Calinou Calinou requested a review from a team as a code owner September 25, 2025 15:00
@Calinou Calinou added bug topic:buildsystem cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:3.6 Considered for cherry-picking into a future 3.6.x release labels Sep 25, 2025
@Calinou Calinou requested a review from bruvzg September 25, 2025 15:01
Copy link
Member

@bruvzg bruvzg left a 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.

Copy link
Member

@bruvzg bruvzg left a 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).

@bruvzg
Copy link
Member

bruvzg commented Sep 27, 2025

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.

@bruvzg
Copy link
Member

bruvzg commented Sep 28, 2025

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.

Patch
diff --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

@akien-mga akien-mga merged commit b3fbca1 into godotengine:3.x Sep 30, 2025
14 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:3.6 Considered for cherry-picking into a future 3.6.x release topic:buildsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants