不幸的问题还是出现了:Chromium代码上整理patch(working目录/master分支),部分文件做了git checkout恢复,结果GYP再编译就出错了

在Chromium项目中,进行代码修复并使用git checkout恢复部分文件后,尝试使用GYP进行编译时遇到了错误。错误主要集中在编译android_webview_apk时,编译器报告了多个错误,包括未使用的变量、预期的标识符错误、类型未定义等。这可能是由于代码冲突、宏定义问题或头文件包含不正确导致的。
redtea@Lenovo:~/Projects/Chromium/src$ ninja -C out/Release android_webview_apk
ninja: Entering directory `out/Release'
[3/24] CXX obj/android_webview/browser/android_webview_common.shared_renderer_state.o
FAILED: /home/redtea/Projects/Chromium/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -MMD -MF obj/android_webview/browser/android_webview_common.shared_renderer_state.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_PROFILING=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_BROWSER_CDMS -DENABLE_CONFIGURATION_POLICY -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DCLD_VERSION=1 -DENABLE_PRINTING=1 -DENABLE_MANAGED_USERS=1 -DVIDEO_HOLE=1 -DENABLE_LOAD_COMPLETION_HACKS=1 -DMOJO_USE_SYSTEM_IMPL -DLIBPEERCONNECTION_LIB=1 -DAPPCACHE_USE_SIMPLE_CACHE -DMEDIA_DISABLE_LIBVPX -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT -DSK_SUPPORT_LEGACY_TEXTRENDERMODE -DSK_BUILD_FOR_ANDROID -DSK_USE_POSIX_THREADS -DSK_DEFERRED_CANVAS_USES_FACTORIES=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DCHROME_PNG_READ_PACK_SUPPORT -DMESA_EGL_NO_X11_HEADERS -DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../skia/config -Igen/ui/resources/ -I../../third_party/khronos -I../../gpu -I../../third_party/WebKit/Source -Igen/angle -I../../third_party/WebKit -I../../third_party/skia/src/core -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../skia/ext -I../../third_party/WebKit -I../../third_party/icu/source/common -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../v8/include -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -Igen/ui/gl -I../../third_party/mesa/src/include -fstack-protector --param=ssp-buffer-size=4 -Werror -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -march=armv7-a -mtune=generic-armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -fno-tree-sra -fno-caller-saves -Wno-psabi -mthumb-interwork -marm -mapcs-frame -fno-optimize-sibling-calls -ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums -finline-limit=64 -Wa,--noexecstack -fno-omit-frame-pointer --sysroot=/home/redtea/Projects/Chromium/src/third_party/android_tools/ndk//platforms/android-14/arch-arm -isystem/home/redtea/Projects/Chromium/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g -funwind-tables -fno-omit-frame-pointer -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -Wno-abi -std=gnu++11 -Wno-narrowing -Wno-literal-suffix  -c ../../android_webview/browser/shared_renderer_state.cc -o obj/android_webview/browser/android_webview_common.shared_renderer_state.o
../../android_webview/browser/shared_renderer_state.cc: In member function 'void android_webview::SharedRendererState::UpdateParentDrawConstraintsOnUIThread()':
../../android_webview/browser/shared_renderer_state.cc:153:15: error: variable 'prevent_recursive_call' set but not used [-Werror=unused-but-set-variable]
   static bool prevent_recursive_call = false; //FIXME: should be atomic<bool> here;
               ^
In file included from ../../base/memory/weak_ptr.h:68:0,
                 from ../../base/bind_helpers.h:148,
                 from ../../base/bind_internal.h:13,
                 from ../../base/bind.h:13,
                 from ../../base/cancelable_callback.h:46,
                 from ../../android_webview/browser/shared_renderer_state.h:9,
                 from ../../android_webview/browser/shared_renderer_state.cc:5:
../../android_webview/browser/shared_renderer_state.cc: At global scope:
../../base/logging.h:355:3: error: expected unqualified-id before '!' token
   !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
   ^
../../base/logging.h:622:3: note: in expansion of macro 'LAZY_STREAM'
   LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON && !(condition))   \
   ^
../../android_webview/browser/shared_renderer_state.cc:166:3: note: in expansion of macro 'DCHECK'
   DCHECK(ui_loop_->BelongsToCurrentThread());
   ^
../../android_webview/browser/shared_renderer_state.cc:167:3: error: 'client_on_ui_' does not name a type
   client_on_ui_->UpdateParentDrawConstraints();
   ^
../../android_webview/browser/shared_renderer_state.cc:170:3: error: expected unqualified-id before '{' token
   {
   ^
../../android_webview/browser/shared_renderer_state.cc:175:6: error: 'SharedRendererState' has not been declared
 bool SharedRendererState::HasDrawGLInput() const {
      ^
../../android_webview/browser/shared_renderer_state.cc:175:44: error: non-member function 'bool HasDrawGLInput()' cannot have cv-qualifier
 bool SharedRendererState::HasDrawGLInput() const {
                                            ^
../../android_webview/browser/shared_renderer_state.cc: In function 'bool HasDrawGLInput()':
../../android_webview/browser/shared_renderer_state.cc:176:23: error: 'lock_' was not declared in this scope
   base::AutoLock lock(lock_);
                       ^
../../android_webview/browser/shared_renderer_state.cc:177:10: error: 'draw_gl_input_' was not declared in this scope
   return draw_gl_input_.get();
      &
Storm@Storm-PC:~/chromium/src$ ninja -C out/Release -j8 chrome ninja: Entering directory `out/Release' [198/56137] ACTION //build/rust/gni_impl:rustc_print_cfg(//build/toolchain/linux:clang_arm64) FAILED: gen/build/rust/gni_impl/rustc-print-cfg-aarch64-unknown-linux-gnu.txt python3 ../../build/rust/gni_impl/rustc_print_cfg.py --rust-prefix ../../third_party/rust-toolchain/bin --target aarch64-unknown-linux-gnu --output-path gen/build/rust/gni_impl/rustc-print-cfg-aarch64-unknown-linux-gnu.txt Traceback (most recent call last): File "/home/Storm/chromium/src/out/Release/../../build/rust/gni_impl/rustc_print_cfg.py", line 57, in <module> sys.exit(main()) File "/home/Storm/chromium/src/out/Release/../../build/rust/gni_impl/rustc_print_cfg.py", line 52, in main capture_rustc_cfg(args.rust_prefix, args.target, args.output_path) File "/home/Storm/chromium/src/out/Release/../../build/rust/gni_impl/rustc_print_cfg.py", line 43, in capture_rustc_cfg subprocess.run(args, stdout=output_file, check=True) File "/usr/local/python39/lib/python3.9/subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "/usr/local/python39/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/python39/lib/python3.9/subprocess.py", line 1837, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '../../third_party/rust-toolchain/bin/rustc' [203/56137] RUST local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore_core.rlib FAILED: local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore_core.rlib "python3" "../../build/rust/gni_impl/rustc_wrapper.py" --rustc=../../third_party/rust-toolchain/bin/rustc --depfile=local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore_core.rlib.d --rsp=local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore_core.rlib.rsp -- -Clinker="../../third_party/llvm-build/Release+Asserts/bin/clang++" --crate-name core ../../third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/lib.rs --crate-type rlib --cfg=backtrace_in_libstd -Zforce-unstable-if-unmarked --cap-lints=allow --edition=2024 -Cforce-unwind-tables=no -Crelocation-model=pic -Zsplit-lto-unit -Clinker-plugin-lto=yes -Cdefault-linker-libraries -Zdep-info-omit-d-target -Zmacro-backtrace -Zremap-cwd-prefix=. -Zexternal-clangrt --color=always --target=aarch64-unknown-linux-gnu -Ccodegen-units=1 -Zunstable-options -Cpanic=immediate-abort -Zpanic_abort_tests --cfg cr_rustc_revision=\"192015283f6fe95e5b604273d13a428bab5fc0788f5a-15283f6fe95e5b604273d13a428bab5fc0788f5a-1-22-8940-g4d4cb757\" -Copt-level=3 -Zdwarf-version=4 -g -Clinker-plugin-lto=yes -Zdefault-visibility=hidden -Dunsafe_op_in_unsafe_fn -Dwarnings -Zunstable-options -Cpanic=immediate-abort -Awarnings @../../build/rust/gni_impl/allow_all_warnings.rsp --sysroot=local_rustc_sysroot --emit=dep-info=local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore_core.rlib.d,link -o local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore_core.rlib LDFLAGS RUSTENV OUT_DIR=../../../../../../../../../out/Release/gen/build/rust/std/rules/core CFG_DISABLE_UNSTABLE_FEATURES=0 STD_ENV_ARCH=aarch64 CARGO_PKG_VERSION=0.0.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE= CARGO_PKG_NAME=core CARGO_PKG_DESCRIPTION=The\ Rust\ Core\ Library CARGO_PKG_REPOSITORY=https://github.com/rust-lang/rust.git CARGO_MANIFEST_DIR=../../build/rust/std/rules/core/crate Traceback (most recent call last): File "/home/Storm/chromium/src/out/Release/../../build/rust/gni_impl/rustc_wrapper.py", line 236, in <module> sys.exit(main()) File "/home/Storm/chromium/src/out/Release/../../build/rust/gni_impl/rustc_wrapper.py", line 205, in main r = subprocess.run([args.rustc, *rustc_args], env=env, check=False) File "/usr/local/python39/lib/python3.9/subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "/usr/local/python39/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/python39/lib/python3.9/subprocess.py", line 1837, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: PosixPath('../../third_party/rust-toolchain/bin/rustc') [204/56137] RUST local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins_profiler_builtins.rlib FAILED: local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins_profiler_builtins.rlib "python3" "../../build/rust/gni_impl/rustc_wrapper.py" --rustc=../../third_party/rust-toolchain/bin/rustc --depfile=local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins_profiler_builtins.rlib.d --rsp=local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins_profiler_builtins.rlib.rsp -- -Clinker="../../third_party/llvm-build/Release+Asserts/bin/clang++" --crate-name profiler_builtins ../../third_party/rust-toolchain/lib/rustlib/src/rust/library/profiler_builtins/src/lib.rs --crate-type rlib --cfg=backtrace_in_libstd -Zforce-unstable-if-unmarked --cap-lints=allow --edition=2024 -Cforce-unwind-tables=no -Crelocation-model=pic -Zsplit-lto-unit -Clinker-plugin-lto=yes -Cdefault-linker-libraries -Zdep-info-omit-d-target -Zmacro-backtrace -Zremap-cwd-prefix=. -Zexternal-clangrt --color=always --target=aarch64-unknown-linux-gnu -Ccodegen-units=1 -Zunstable-options -Cpanic=immediate-abort -Zpanic_abort_tests --cfg cr_rustc_revision=\"192015283f6fe95e5b604273d13a428bab5fc0788f5a-15283f6fe95e5b604273d13a428bab5fc0788f5a-1-22-8940-g4d4cb757\" -Copt-level=3 -Zdwarf-version=4 -g -Clinker-plugin-lto=yes -Zdefault-visibility=hidden -Dunsafe_op_in_unsafe_fn -Dwarnings -Awarnings @../../build/rust/gni_impl/allow_all_warnings.rsp --sysroot=local_rustc_sysroot --emit=dep-info=local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins_profiler_builtins.rlib.d,link -o local_rustc_sysroot/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins_profiler_builtins.rlib LDFLAGS RUSTENV OUT_DIR=../../../../../../../../../out/Release/gen/build/rust/std/rules/profiler_builtins CFG_DISABLE_UNSTABLE_FEATURES=0 STD_ENV_ARCH=aarch64 CARGO_PKG_VERSION=0.0.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE= CARGO_PKG_NAME=profiler_builtins CARGO_MANIFEST_DIR=../../build/rust/std/rules/profiler_builtins/crate Traceback (most recent call last): File "/home/Storm/chromium/src/out/Release/../../build/rust/gni_impl/rustc_wrapper.py", line 236, in <module> sys.exit(main()) File "/home/Storm/chromium/src/out/Release/../../build/rust/gni_impl/rustc_wrapper.py", line 205, in main r = subprocess.run([args.rustc, *rustc_args], env=env, check=False) File "/usr/local/python39/lib/python3.9/subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "/usr/local/python39/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/python39/lib/python3.9/subprocess.py", line 1837, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: PosixPath('../../third_party/rust-toolchain/bin/rustc') [205/56137] ACTION //components/data_sharing/data_sharing_internals/webui:mojo_bindings__type_mappings_ts__validator(//build/toolchain/linux:clang_arm64) ninja: build stopped: subcommand failed. 如何解决
09-28
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值