chromium electron 編譯出現 clang 錯誤 clang++: error: unable to execute command: Killed



ninja -C out/Release electron
ninja: Entering directory `out/Release'
[1/3263] CXX obj/content/browser/browser/browser_jumbo_16.o
FAILED: obj/content/browser/browser/browser_jumbo_16.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/browser/browser/browser_jumbo_16.o.d -DENABLE_SCREEN_CAPTURE=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\"371202-8455294f-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=361348 -DCR_SYSROOT_HASH=b1b67071a9850ecba2ee8de0762e0edc0981a1cb -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DCONTENT_IMPLEMENTATION -DV8_USE_EXTERNAL_STARTUP_DATA -DATK_LIB_DIR=\"/usr/lib/x86_64-linux-gnu\" -DUSE_ATK_BRIDGE -DATK_DISABLE_DEPRECATION_WARNINGS -DATSPI_MAJOR_VERSION=2 -DATSPI_MINOR_VERSION=29 -DATSPI_MICRO_VERSION=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DWEBP_EXTERN=extern -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_NO_PROTOTYPES -DTOOLKIT_VIEWS=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DSK_GL -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_HAS_JPEG_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\" -DVK_NO_PROTOTYPES -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DNO_MAIN_THREAD_WRAPPING -DPERFETTO_IMPLEMENTATION -DUSE_VULKAN_XLIB -DV8_DEPRECATION_WARNINGS -DAUDIO_PROCESSING_IN_AUDIO_SERVICE -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE -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_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_ANALYZE -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTORESET -DSQLITE_OMIT_COMPILEOPTION_DIAGS -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_LOAD_EXTENSION -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_HAVE_ISNAN -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DFLAC__NO_DLL -I. -I../.. -Igen -I../../third_party/libwebp/src -I../../third_party/libyuv/include -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan/include -Igen/third_party/dawn -I../../third_party/dawn/src/include -I../../third_party/boringssl/src/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -I../../third_party/skia -I../../third_party/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/vulkan/include -I../../third_party/libwebm/source -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -Igen/third_party/metrics_proto -I../../third_party/perfetto -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -I../../third_party/mesa_headers -I../../v8/include -Igen/v8/include -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -I../../third_party/angle/src/common/third_party/base -Igen/angle -I../../third_party/angle/include -I../../third_party/brotli/include -I../../third_party/re2/src -I../../third_party/zlib -I../../third_party/fontconfig/src -fprofile-sample-use=../../chrome/android/profiles/afdo.prof -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-xor-used-as-pow -Wno-c99-designator -Wno-reorder-init-list -Wno-final-dtor-non-final-class -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g2 -ggnu-pubnames -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wshadow -Wexit-time-destructors -Wno-unused-function -Wno-unused-local-typedef -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/atk-1.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/at-spi2-atk/2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/at-spi-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/dbus-1.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/at-spi-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/dbus-1.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/pango-1.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/harfbuzz -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/pango-1.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/fribidi -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/cairo -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/pixman-1 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/uuid -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/libpng16 -Wno-shorten-64-to-32 -Wno-header-guard -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/nss -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/nspr -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/dbus-1.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/dbus-1.0/include -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -c gen/content/browser/browser_jumbo_16.cc -o obj/content/browser/browser/browser_jumbo_16.o

clang++: error: unable to execute command: Killed
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.0 (https://github.com/llvm/llvm-project/ 8455294f2ac13d587b13d728038a9bffa7185f2b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: ../../third_party/llvm-build/Release+Asserts/bin
clang++: note: diagnostic msg: PLEASE submit a bug report to https://crbug.com and run tools/clang/scripts/process_crashreports.py (only works inside Google) which will upload a report and include the crash backtrace, preprocessed source, and associated run script.
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: ../../tools/clang/crashreports/browser_jumbo_16-791290.cpp
clang++: note: diagnostic msg: ../../tools/clang/crashreports/browser_jumbo_16-791290.sh
clang++: note: diagnostic msg:

********************
[6/3263] CXX obj/content/browser/browser/browser_jumbo_2.o
ninja: build stopped: subcommand failed.

 

原因:

      這是swap區不夠大的原因。導致clang++ kernel opps
解決方法:
請加大分區:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
開機自動掛載swap:
使用 vi 或 nano 在 /etc/fstab 文件底部添加如下內容:
/swapfile none swap sw 0 0

 


 

==> NOTE: You are downloading one or more large file(s), which would
run significantly faster if you enabled sliced object downloads. This
feature is enabled by default but requires that compiled crcmod be
installed (see "gsutil help crcmod").


[0:00:01] Cloning into 'C:\Users\Administrator\Downloads\electron\_gclient_src_yz0fka'... [0:00:05] remote: Sending approximately 20.82 GiB ...Counting objects: 1 [0:31:41] Receiving objects: 72% (10327751/14256706), 14.07 GiB | 19.99 MiB/s [0:31:42] fatal: write error: No space left on device [0:31:43] fatal: index-pack failed [0:31:44]

 


chromium下載歷史版本錯誤
chromium下載歷史版本的源碼時(比如:43.0.2357.134),可能出現如下錯誤(並在.gclient同級的目錄創建一個_bad_scm的文件夾):

src/third_party/WebKit (ERROR)
—————————————-
[0:00:08] Started.
[0:00:17] _ src\third_party\WebKit : Attempting rebase onto 63a6d727b8c338c1ede7f5acacfb085519fc3051…
[0:00:26]
[0:0:26] Rebase produced error output:
fatal: Needed a single revision
Does not point to a valid commit: 63a6d727b8c338c1ede7f5acacfb085519fc3051
—————————————-
Error: 12> Unrecognized error, please merge or rebase manually.
12> cd X:\chromium_43\src\third_party\WebKit && git rebase –onto 63a6d727b8c338c1ede7f5acacfb085519fc3051 refs/remotes/origin/master

這是因為對應的倉庫沒有這個提交(這里是63a6d727b8c338c1ede7f5acacfb085519fc3051)。解決方法是打開DEPS文件(src\DEPS),找到這個提交號並修改為早期版本(比如:43.0.2357.0,patch為0)DEPS里的值(這里是54ac8d7272b177ae0d94ca8de98bd236c7b8dbea)。同時刪除已下載.git倉庫(src\third_party\WebKit\.git),否則會出現如下錯誤:

src/third_party/WebKit (ERROR)
—————————————-
[0:00:09] Started.
[0:00:15] _ src\third_party\WebKit : Attempting rebase onto 54ac8d7272b177ae0d94ca8de98bd236c7b8dbea…
[0:00:20]
[0:00:20] Rebase produced error output:
Cannot rebase: Your index contains uncommitted changes.
Please commit or stash them.
—————————————-
Error: 12> Unrecognized error, please merge or rebase manually.
12> cd X:\chromium_43\src\third_party\WebKit && git rebase –onto 54ac8d7272b177ae0d94ca8de98bd236c7b8dbea refs/remotes/origin/master

然后,重新同步代碼gclient sync或者gclient sync --nohooks即可。需要指出的是,這樣修改后下載的源碼是早期的版本(541c...),可能存在問題,如果有人知道怎么下載原來的版本(63a6...),煩請在底下的評論區告知。
————————————————
版權聲明:本文為CSDN博主「還沒想好昵稱」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/yyinhai/article/details/58031768


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM