问题描述
我正在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
解决方法
UnifiedSource构建错误在中继中相对常见。通常,问题是受影响的统一源文件(在本例中为UnifiedSource-3c72abbe-28.cpp)引用的某些源文件中缺少标头。
您提到WebKitGTK 2.30.2 tarball中发生了构建错误。要解决该错误,您可以尝试以下几种方法:
- 也许最简单的方法是构建更新的版本。 WebKitGTK 2.30.3刚刚在几周前发布(https://webkitgtk.org/releases/webkitgtk-2.30.3.tar.xz)
- 如果您需要专门构建2.30.2,可以尝试在禁用统一源的情况下进行构建。为此,我必须运行以下命令:
$ cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DENABLED_UNIFIED_BUILDS=OFF -DUSE_WPE_RENDERER=OFF -GNinja
似乎禁用了禁用WPE渲染所需的统一版本。