c++ - 未完成的 WEBKITGTK 构建
问题描述
我在 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 渲染所需的统一构建。
推荐阅读
- c++ - CMake:在高级应用程序构建之前未安装外部项目
- c# - mongoexport/projection:仅导出不等于 null 的字段
- r - 如何将向量分成R中具有相同数量观察的组?
- postgresql - docker-compose.yml 中不健康的 postgres 容器
- kotlin - gRPC Java - 服务器收到请求后立即记录请求有效负载
- javascript - 为什么我无法使用 Selenium 找到此按钮并单击它?(它甚至没有出现在 .page_source 上)
- rest - 如何检索 Twitch API 不记名令牌
- mysql-workbench - 如何解决错误:“字段列表”中的未知列“delete_versioning_rows_priv”
- python - 如果数组是在 GPU 中定义的,为什么 np.einsum() 可以在 GPU 上运行?
- google-apis-explorer - 在 Cromebook 设备上运行 TryThis API 时,我无法获得超过 1000 个数据