WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
209946
Do not link with OpenGL on Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=209946
Summary
Do not link with OpenGL on Apple platforms
Keith Rollin
Reported
2020-04-02 19:12:59 PDT
OpenGL is not used in our build of ANGLE. Attempting to link with it causes warnings, which can turn to errors in some cases (in particular with building with Xcode's "new" build system).
Attachments
Patch
(2.68 KB, patch)
2020-04-02 19:15 PDT
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-04-02 19:13:11 PDT
<
rdar://problem/61237956
>
Keith Rollin
Comment 2
2020-04-02 19:15:51 PDT
Created
attachment 395337
[details]
Patch
EWS Watchlist
Comment 3
2020-04-02 19:16:37 PDT
Note that there are important steps to take when updating ANGLE. See
http://trac.webkit.org/wiki/UpdatingANGLE
EWS
Comment 4
2020-04-03 11:00:38 PDT
Committed
r259475
: <
https://trac.webkit.org/changeset/259475
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 395337
[details]
.
Kenneth Russell
Comment 5
2020-04-03 13:05:27 PDT
How are references to functions like CGLCreateContext resolved after this patch?
Dean Jackson
Comment 6
2020-04-03 17:12:41 PDT
(In reply to Kenneth Russell from
comment #5
)
> How are references to functions like CGLCreateContext resolved after this > patch?
Yeah. ANGLE only dynamically loads /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib All the CGL stuff is in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL So how did this pass tests?
Dean Jackson
Comment 7
2020-04-03 17:19:58 PDT
Oh. It's because it is linked into WebCore which links OpenGL.
Dean Jackson
Comment 8
2020-04-03 17:20:55 PDT
However, this change shouldn't have been necessary. If the new build system can't link against OpenGL, it can't build WebCore or WebKit.
Dean Jackson
Comment 9
2020-04-03 17:23:12 PDT
Did you find out what was actually causing the compiler warning? Because if it was unused functions when linking, then we also have a bunch of those in other projects. e.g. ld: warning: linking with (/System/Library/Frameworks/CoreAudio.framework/CoreAudio) but not using any symbols from it ld: warning: linking with (/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox) but not using any symbols from it ld: warning: linking with (/System/Library/Frameworks/CoreMedia.framework/CoreMedia) but not using any symbols from it ld: warning: linking with (/System/Library/PrivateFrameworks/URLFormatting.framework/URLFormatting) but not using any symbols from it ld: warning: linking with (/usr/lib/libAccessibility.dylib) but not using any symbols from it
Keith Rollin
Comment 10
2020-04-03 17:39:09 PDT
(In reply to Dean Jackson from
comment #8
)
> However, this change shouldn't have been necessary. If the new build system > can't link against OpenGL, it can't build WebCore or WebKit.
It's not that it can't link against OpenGL. I'm pretty sure that it's because it can't link against an OpenGL that doesn't exist. OpenGL.framework is not in the iphonesimulator SDK. That's where the error was occurring. WebCore is able to link because it only links against OpenGL on the macOS: WebCore.xcconfig 108:WK_OPENGL_LDFLAGS_iphoneos = -framework OpenGLES; 109:WK_OPENGL_LDFLAGS_iphonesimulator = -framework OpenGLES; 114:WK_OPENGL_LDFLAGS_maccatalyst = -framework OpenGL; 115:WK_OPENGL_LDFLAGS_macosx = -framework OpenGL; Thanks for clarifying all of this. I was going crazy today trying to figure out how macOS was linking!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug