c++webkitbuildrootwebkitgtk

Incomplete WEBKITGTK build


I am running buildroot on a fedora32 machine.

I enebale the webkitgtk package. Downloading and configuring of the source runs with no errors

However, when during the build process, make throws an error and crashes.

I am fiarly new to linux and GTK and will gladly appreciate some pointers to exactly what is wrong.

below is an extract of the output on the terminal right before the build fails

/home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/Options.h:164:25: warning: ‘addressOfOptionDefault’ defined but not used [-Wunused-variable]
  164 |     inline static void* addressOfOptionDefault(Options::ID);
      |                         ^~~~~~~~~~~~~~~~~~~~~~
/home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/Options.h:163:25: warning: ‘addressOfOption’ defined but not used [-Wunused-variable]
  163 |     inline static void* addressOfOption(Options::ID);
      |                         ^~~~~~~~~~~~~~~
/home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/Options.h:135:17: warning: ‘isAvailable’ defined but not used [-Wunused-variable]
  135 |     static bool isAvailable(ID, Availability);
      |                 ^~~~~~~~~~~
In file included from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/OptionsList.h:28,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/JSCConfig.h:28,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/Options.h:28,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/CPU.h:28,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/MathCommon.h:28,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/TypedArrayAdaptors.h:29,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/TypedArrays.h:29,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/Uint8ClampedArray.h:28,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/Source/WebCore/html/ImageData.h:33,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/Source/WebCore/platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp:39,
                 from /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-28.cpp:7:
/home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/DerivedSources/ForwardingHeaders/JavaScriptCore/GCLogging.h:42:24: warning: ‘JSC::levelAsString’ defined but not used [-Wunused-variable]
   42 |     static const char* levelAsString(Level);
      |                        ^~~~~~~~~~~~~
make[4]: *** [Source/WebCore/CMakeFiles/WebCore.dir/build.make:7364: Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-28.cpp.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/Makefile2:949: Source/WebCore/CMakeFiles/WebCore.dir/all] Error 2
make[2]: *** [Makefile:152: all] Error 2
make[1]: *** [package/pkg-generic.mk:250: /home/cerezolarbi/cerezobuild/buildroot/output/build/webkitgtk-2.30.2/.stamp_built] Error 2
make: *** [Makefile:84: _all] Error 2

Solution

  • UnifiedSource build errors are relatively common in trunk. Usually the issue is a missing header in some of the source files referenced by the affected unified source file, in this case UnifiedSource-3c72abbe-28.cpp.

    You mentioned the build error is happening in WebKitGTK 2.30.2 tarball. To fix the error you can try several things:

    1. Perhaps the easiest thing to do is to build a newer release. WebKitGTK 2.30.3 was published just a few weeks ago (https://webkitgtk.org/releases/webkitgtk-2.30.3.tar.xz)
    2. If you need to build 2.30.2 specifically, you can try building with unified sources disabled. To do that I had to run the following command:
    $ cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo 
      -DENABLED_UNIFIED_BUILDS=OFF -DUSE_WPE_RENDERER=OFF -GNinja
    

    It seems disabling unified builds required to disable WPE rendering.