Bug 221884

Summary: Missing WEBKIT_TYPE_ constants
Product: WebKit Reporter: Dennis Nezic <dennisn>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: aperez, bugs-noreply, mcatanzaro, thomas.devoogdt, webkit-bug-importer
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
error log none

Dennis Nezic
Reported 2021-02-14 20:27:41 PST
I'm getting a bunch of undeclared constants/enums. They don't appear to be defined in ANY .h or .cpp file :s. WEBKIT_TYPE_FIND_OPTIONS in Source/WebKit/UIProcess/API/glib/WebKitFindController.cpp:214 WEBKIT_TYPE_INPUT_PURPOSE in Source/WebKit/UIProcess/API/glib/WebKitInputMethodContext.cpp:227 WEBKIT_TYPE_NAVIGATION_TYPE in Source/WebKit/UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp:138 WEBKIT_TYPE_HARDWARE_ACCELERATION_POLICY in Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:1486 WEBKIT_TYPE_AUTOMATION_BROWSING_CONTEXT_PRESENTATION WEBKIT_TYPE_LOAD_EVENT WEBKIT_TYPE_POLICY_DECISION_TYPE WEBKIT_TYPE_INSECURE_CONTENT_EVENT WEBKIT_TYPE_WEB_PROCESS_TERMINATION_REASON in Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:1265,1397,1429,1670,2075 WEBKIT_TYPE_AUTOPLAY_POLICY in Source/WebKit/UIProcess/API/glib/WebKitWebsitePolicies.cpp:151 WEBKIT_TYPE_FORM_SUBMISSION_STEP in Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:667 WEBKIT_TYPE_COOKIE_ACCEPT_POLICY in Tools/MiniBrowser/gtk/main.c:679
Attachments
error log (46.57 KB, text/plain)
2025-10-24 07:40 PDT, Thomas Devoogdt
no flags
Thomas Devoogdt
Comment 1 2025-10-24 07:40:19 PDT
Created attachment 477190 [details] error log Still a problem. (webkitgtk-2.50.1)
Adrian Perez
Comment 2 2025-10-27 06:37:23 PDT
(In reply to Thomas Devoogdt from comment #1) > Created attachment 477190 [details] > error log > > Still a problem. (webkitgtk-2.50.1) The log contain a few lines like this: /bin/sh: 1: glib-mkenums: not found This is most likely the root cause of the build failure. Make sure you have the tool installed. If you are cross-compiling, make sure that a the build host has the tool installed, and that it can run properly. You seen to be using Buildroot, but instead of using "make webkitgtk" you are manually invoking "cmake --build" from the work directory. IIRC that won't work in general, because that bypasses the Buildroot host tools directory (where glib-mkenums is present).
Thomas Devoogdt
Comment 3 2025-10-27 07:27:14 PDT
Hi Adrian, To be honest, I'm writing here for a colleague who reported this. Yes we are using buildroot, but on a variation of host systems. I check if glib-mkenums is installed either by the host system, or by a buildroot host package. I also double check if cmake is not just ran form the working directory. Thanks for you response. Kr, Thomas
Michael Catanzaro
Comment 4 2025-10-27 08:03:04 PDT
Why didn't the build fail immediately if glib-mkenums is not available? add_custom_command( OUTPUT ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.h ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.cpp DEPENDS ${WebKitGTK_ENUM_GENERATION_HEADERS} COMMAND glib-mkenums --template ${WebKitGTK_ENUM_HEADER_TEMPLATE} ${WebKitGTK_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.h COMMAND glib-mkenums --template ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.in ${WebKitGTK_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.cpp VERBATIM ) Problem is sed succeeds (returns 0) even when glib-mkenums fails. We need to rewrite these somehow. Note: we use glib-mkenums in 10 different places, which need to be fixed.
Note You need to log in before you can comment on or make changes to this bug.