cmakeg++qt6ninjaqtwebengine

c++ fatal error when building QtWebEngine


When I try to build Qt 6.2.4 from source, the compiler terminates unexpectedly close to the end for some reason. Would you be able to help me diagnose the issue?

There were a number of compiler terminations, but the final one before the build stopped is shown below:

FAILED: obj/content/browser/browser/touch_passthrough_manager.o 
/usr/bin/c++ -MMD -MF obj/content/browser/browser/touch_passthrough_manager.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DCONTENT_IMPLEMENTATION -DWEBP_EXTERN=extern -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DSK_FAVOR_WUFFS_V_0_3_OVER_V_0_2 -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DCRASHPAD_ZLIB_SOURCE_EXTERNAL -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_BUILTIN_ISAC_FIX=0 -DWEBRTC_USE_BUILTIN_ISAC_FLOAT=1 -DWEBRTC_USE_X11 -DWEBRTC_USE_X11 -DWEBRTC_HAVE_SCTP -DNO_MAIN_THREAD_WRAPPING -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DSQLITE_OMIT_ANALYZE -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOMATIC_INDEX -DSQLITE_OMIT_AUTORESET -DSQLITE_OMIT_COMPILEOPTION_DIAGS -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_INTROSPECTION_PRAGMAS -DSQLITE_DEFAULT_LOOKASIDE=0,0 -DSQLITE_OMIT_LOOKASIDE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_REINDEX -DSQLITE_OMIT_TRACE -DSQLITE_OMIT_UPSERT -DSQLITE_OMIT_WINDOWFUNC -DSQLITE_ENABLE_FTS3 -DSQLITE_DISABLE_FTS3_UNICODE -DSQLITE_DISABLE_FTS4_DEFERRED -DSQLITE_ENABLE_ICU -DSQLITE_SECURE_DELETE -DSQLITE_THREADSAFE=1 -DSQLITE_MAX_WORKER_THREADS=0 -DSQLITE_MAX_MMAP_SIZE=268435456 -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 -DSQLITE_DEFAULT_LOCKING_MODE=1 -DSQLITE_DEFAULT_MEMSTATUS=1 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_PCACHE_INITSZ=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_USE_ALLOCA -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_HAVE_ISNAN -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_ENABLE_API_ARMOR -DV8_ENABLE_CHECKS -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DLIBGAV1_MAX_BITDEPTH=10 -DLIBGAV1_THREADPOOL_USE_STD_MUTEX -DLIBGAV1_ENABLE_LOGGING=0 -DLIBGAV1_PUBLIC= -DVK_NO_PROTOTYPES -DUSE_VULKAN_XCB -Igen -I../../../../../../../source/qtwebengine/src/3rdparty/chromium -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/libwebp/src -Igen -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/vulkan-deps/vulkan-headers/src/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/libyuv/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/jsoncpp/source/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/khronos -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/gpu -Igen/third_party/dawn/src/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/dawn/src/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/wtl/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/abseil-cpp -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src -Igen/protoc_out -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/ced/src -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/icu/source/common -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/icu/source/i18n -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/skia -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/wuffs/src/release/c -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/vulkan/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/vulkan-deps/vulkan-headers/src/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/non_win -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/zlib -Igen/net/third_party/quiche/src -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/net/third_party/quiche/overrides -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/net/third_party/quiche/src/common/platform/default -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/net/third_party/quiche/src -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/webrtc_overrides -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/webrtc -Igen/third_party/webrtc -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/mesa_headers -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/libwebm/source -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase/src -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase/src/include -Igen/third_party/metrics_proto -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/v8/include -Igen/v8/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/libgav1/src -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/libgav1/src/src -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/third_party/base -Igen/angle -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/angle/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/brotli/include -I../../../../../../../source/qtwebengine/src/3rdparty/chromium/third_party/re2/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-unknown-pragmas -Wno-parentheses -Wno-sign-compare -Wno-stringop-overflow -Wno-stringop-overread -Wno-psabi -Wno-multichar -Wno-format-zero-length -funwind-tables -fPIC -pipe -pthread -m64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -O0 -fno-omit-frame-pointer -g2 -fvisibility=hidden -I/usr/include/nss -I/usr/include/nspr -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wno-deprecated-declarations -c ../../../../../../../source/qtwebengine/src/3rdparty/chromium/content/browser/accessibility/touch_passthrough_manager.cc -o obj/content/browser/browser/touch_passthrough_manager.o
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[28674/30705] CXX obj/content/browser/browser/gpu_data_manager_impl_private.o
[28675/30705] CXX obj/content/browser/browser/gpu_memory_buffer_manager_singleton.o
[28676/30705] CXX obj/content/browser/browser/gpu_internals_ui.o
[28677/30705] CXX obj/content/browser/browser/io_handler.o
[28678/30705] CXX obj/content/browser/browser/gpu_process_host.o
[28679/30705] CXX obj/content/browser/browser/browser_accessibility_state_impl.o
[28680/30705] CXX obj/content/browser/browser/inspector_handler.o
[28681/30705] CXX obj/content/browser/browser/sensor_provider_proxy_impl.o
[28682/30705] CXX obj/content/browser/browser/handler_helpers.o
[28683/30705] CXX obj/content/browser/browser/dom_handler.o
[28684/30705] CXX obj/content/browser/browser/input_handler.o
[28685/30705] CXX obj/content/browser/browser/audits_handler.o
[28686/30705] CXX obj/content/browser/browser/devtools_session.o
[28687/30705] CXX obj/content/browser/browser/emulation_handler.o
[28688/30705] CXX obj/content/browser/browser/devtools_mhtml_helper.o
[28689/30705] CXX obj/content/browser/browser/devtools_url_loader_interceptor.o
[28690/30705] CXX obj/content/browser/browser/background_service_handler.o
ninja: build stopped: subcommand failed.
[8586/8683] Linking CXX shared module qtbase/qml/QtWebView/libqtwebviewquickplugin.so
FAILED: qtwebengine/src/core/Debug/x86_64/QtWebEngineCore.stamp qtwebengine/src/core/Debug/x86_64/QtWebEngineCore /home/administrator/Qt/6.2.4/build/Debug/qtwebengine/src/core/Debug/x86_64/QtWebEngineCore.stamp /home/administrator/Qt/6.2.4/build/Debug/qtwebengine/src/core/Debug/x86_64/QtWebEngineCore 
cd /home/administrator/Qt/6.2.4/build/Debug/qtwebengine/src/core && /usr/bin/ninja -C /home/administrator/Qt/6.2.4/build/Debug/qtwebengine/src/core/Debug/x86_64 QtWebEngineCore
ninja: build stopped: subcommand failed.

Solution

  • The compiler was running out of memory, so it terminated unexpectedly. The way I fixed this was to disable jumbo-build with -no-webengine-jumbo-build and to limit the number of concurrent builds to 8 by setting the NINJAFLAGS environment variable to -j8. Despite it taking much longer to build, it built successfully.