WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
247132
[GTK] REGRESSION(
255909@main
): GBM dependency may be disabled by mistake
https://bugs.webkit.org/show_bug.cgi?id=247132
Summary
[GTK] REGRESSION(255909@main): GBM dependency may be disabled by mistake
Michael Catanzaro
Reported
2022-10-27 09:36:23 PDT
After
255909@main
it's possible for the GBM dependency to be disabled by mistake if it's not present in the buildroot. That's too fragile: people building WebKitGTK are not experts on its build dependencies, and we need to make sure no functionality gets disabled unintentionally when working on packaging. One option is to add a build flag to turn off GBM and fail the build if GBM is missing and the flag is not passed. Alternatively, we could make GBM mandatory if USE_OPENGL_OR_ES is ON (since the USE_OPENGL_OR_ES setting determines the value of the ENABLE_WEBGL setting). For example: diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake index c8772180ceb8..af306a7fd268 100644 --- a/Source/cmake/OptionsGTK.cmake +++ b/Source/cmake/OptionsGTK.cmake @@ -393,11 +393,17 @@ if (USE_OPENGL_OR_ES) # make libdrm a requirement and define the USE_LIBGBM and USE_TEXTURE_MAPPER_DMABUF # macros. When not available, ANGLE will be used in slower software-rasterization mode. find_package(GBM) - if (GBM_FOUND) - find_package(LibDRM REQUIRED) - SET_AND_EXPOSE_TO_BUILD(USE_LIBGBM TRUE) - SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_DMABUF TRUE) + if (NOT GBM_FOUND) + message(FATAL_ERROR "GBM is required for USE_OPENGL_OR_ES") endif () + + find_package(LibDRM) + if (NOT LIBDRM_FOUND) + message(FATAL_ERROR "libdrm is required for USE_OPENGL_OR_ES") + endif () + + SET_AND_EXPOSE_TO_BUILD(USE_LIBGBM TRUE) + SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_DMABUF TRUE) endif () endif ()
Attachments
Add attachment
proposed patch, testcase, etc.
Jim Mason
Comment 1
2022-10-27 10:45:01 PDT
FYI, I have USE_OPENGL_OR_ES ON and do not have GBM. The suggestion to fail the build in this case would be a regression. Adding a new build flag to condition the GBM dependency seems reasonable.
Jim Mason
Comment 2
2022-10-28 04:22:50 PDT
Is it possible that the GBM dependencies could be resolved at runtime, as is done with GL, where we build a function table in OpenGLShims using dlsym? In this way, not the build environment but that of the user would determine whether GBM is used. If it is not present, webkit would degrade gracefully to software backing to keep WebGL operational.
Michael Catanzaro
Comment 3
2022-10-28 06:16:52 PDT
Zan has suggested just adding a new flag to control use of GBM. That should solve this without causing trouble for you.
Michael Catanzaro
Comment 4
2022-10-28 07:33:34 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/5907
EWS
Comment 5
2022-10-31 07:37:22 PDT
Committed
256152@main
(22e4c0386605): <
https://commits.webkit.org/256152@main
> Reviewed commits have been landed. Closing PR #5907 and removing active labels.
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