Bug 174940 - [GTK] Building with ENABLE_VIDEO=OFF fails
Summary: [GTK] Building with ENABLE_VIDEO=OFF fails
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Linux
: P2 Normal
Assignee: Adrian Perez
Depends on:
Reported: 2017-07-28 09:39 PDT by Adrian Perez
Modified: 2017-07-28 11:07 PDT (History)
7 users (show)

See Also:

Patch (3.66 KB, patch)
2017-07-28 09:55 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2017-07-28 09:39:32 PDT
This issue was reported in the Buildroot mailing list, it happens with
the latest releases (at least 2.16.5 and 2.16.6), and also with “trunk”.
The error is:

  /home/peko/buildroot/output/build/webkitgtk-2.16.5/DerivedSources/WebCore/JSWebGLRenderingContextBase.cpp:3100:207:   required from here
  /home/peko/buildroot/output/build/webkitgtk-2.16.5/Source/WTF/wtf/PassRefPtr.h:40:13: error: invalid use of incomplete type ‘class WebCore::HTMLVideoElement’
  In file included from /home/peko/buildroot/output/build/webkitgtk-2.16.5/Source/WebCore/html/canvas/WebGLRenderingContextBase.h:32:0,
                   from /home/peko/buildroot/output/build/webkitgtk-2.16.5/DerivedSources/WebCore/JSWebGLRenderingContextBase.h:26,
                   from /home/peko/buildroot/output/build/webkitgtk-2.16.5/DerivedSources/WebCore/JSWebGLRenderingContextBase.cpp:25:
  /home/peko/buildroot/output/build/webkitgtk-2.16.5/Source/WebCore/html/canvas/CanvasRenderingContext.h:40:7: note: forward declaration of ‘class WebCore::HTMLVideoElement’
   class HTMLVideoElement;

Original report: http://lists.busybox.net/pipermail/buildroot/2017-July/198467.html
Comment 1 Adrian Perez 2017-07-28 09:41:20 PDT
I looked a bit into this, and it's caused because MEDIA_STREAM is
enabled anyway, and it tries to use the definition of HTMLVideoElement,
which is guarded by ENABLE(VIDEO).

This is due to a missing feature dependency in the CMake build files.
We need to add:


I'll be submitting a patch.
Comment 2 Adrian Perez 2017-07-28 09:46:29 PDT
A test build with of “trunk” with “-DENABLE_MEDIA_STREAM=OFF” failed with:

  ../../Tools/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:25:10: fatal error: gst/gst.h: No such file or directory
   #include <gst/gst.h>

“-DENABLE_MEDIA_STREAM=OFF” is passed, then GStreamer is not needed,
and no GStreamer flags are queried using “pkg-config”. Which results in
the header not found. I think in this case we would want to guard the
use of GStreamer in the tests as well, so I'll add that to the patch.
Comment 3 Adrian Perez 2017-07-28 09:55:02 PDT
Created attachment 316646 [details]
Comment 4 WebKit Commit Bot 2017-07-28 11:07:03 PDT
Comment on attachment 316646 [details]

Clearing flags on attachment: 316646

Committed r220007: <http://trac.webkit.org/changeset/220007>
Comment 5 WebKit Commit Bot 2017-07-28 11:07:05 PDT
All reviewed patches have been landed.  Closing bug.