0

我在 fedora32 机器上运行 buildroot。

我启用了 webkitgtk 包。源代码的下载和配置运行没有错误

但是,在构建过程中,make 会抛出错误并崩溃。

我对 linux 和 GTK 还很陌生,很高兴能得到一些关于问题所在的指针。

下面是构建失败之前终端上输出的摘录

/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
4

1 回答 1

1

UnifiedSource 构建错误在主干中相对常见。通常问题是受影响的统一源文件引用的某些源文件中缺少标头,在本例中为 UnifiedSource-3c72abbe-28.cpp。

您提到构建错误发生在 WebKitGTK 2.30.2 tarball 中。要修复错误,您可以尝试几件事:

  1. 也许最简单的事情是构建一个更新的版本。WebKitGTK 2.30.3 仅在几周前发布(https://webkitgtk.org/releases/webkitgtk-2.30.3.tar.xz
  2. 如果您需要专门构建 2.30.2,您可以尝试在禁用统一源的情况下构建。为此,我必须运行以下命令:
$ cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo 
  -DENABLED_UNIFIED_BUILDS=OFF -DUSE_WPE_RENDERER=OFF -GNinja

似乎禁用了禁用 WPE 渲染所需的统一构建。

于 2020-12-07T02:19:22.093 回答