RESOLVED FIXED306334
Build failure: expected unqualified-id before numeric constant
https://bugs.webkit.org/show_bug.cgi?id=306334
Summary Build failure: expected unqualified-id before numeric constant
Mike Gorse
Reported 2026-01-27 08:02:40 PST
I am trying to get WebKitGTK 2.51.90 to build on SLE and am getting these errors with a couple of our older codestreams: In file included from /usr/include/X11/Xlib.h:44, from /usr/include/EGL/eglplatform.h:134, from /usr/include/epoxy/egl_generated.h:11, from /usr/include/epoxy/egl.h:46, from ../Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp:50, from DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-32.cpp:7: WebCore/PrivateHeaders/WebCore/FontAttributes.h:42:52: error: expected unqualified-id before numeric constant 42 | Style::ListStyleType styleType { CSS::Keyword::None { } }; | ^~~~ ... In file included from /usr/include/X11/Xlib.h:44, from /usr/include/EGL/eglplatform.h:134, from /usr/include/epoxy/egl_generated.h:11, from /usr/include/epoxy/egl.h:46, from ../Source/WebCore/platform/graphics/skia/PlatformDisplaySkia.cpp:42, from WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-66.cpp:3: WebCore/PrivateHeaders/WebCore/SharedMemory.h:57:27: error: expected identifier before numeric constant 57 | enum class MemoryLedger { None, Default, Network, Media, Graphics, Neural }; | ^~~~ I get more errors like it in both cases, although, for the latter, some of them come from ShareableBitmapSkia.cpp. I likely have a nonstandard build (I'm compiling with -DENABLE_MEDIA_STREAM=OFF, for instance), but these errors don't seem directly related to my changes or patches. Both sources build if I add @no-unify to them.
Attachments
Mike Gorse
Comment 1 2026-01-27 08:12:51 PST
Michael Catanzaro
Comment 2 2026-01-30 13:34:30 PST
Xlib.h is just horrible. Unfortunately using @no-unify to avoid it getting included is probably indeed the best solution here. That's nicer than renaming things.
Radar WebKit Bug Importer
Comment 3 2026-02-03 08:03:12 PST
EWS
Comment 4 2026-04-18 07:44:48 PDT
Committed 311526@main (470279182571): <https://commits.webkit.org/311526@main> Reviewed commits have been landed. Closing PR #57333 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.