如何解决在 Mac 上构建 Chromium 然后我无法执行二进制文件
我正在尝试在 Mac 上构建 Google Chromium。 为了获得 Chromiumum,我执行了以下步骤:
-
fetch chromium
在 Google Cloud Ubuntu 服务器上。 -
git fetch origin tag <tag>
在服务器上。 - 压缩下载的源代码,然后将压缩的源代码下载到我的本地机器
- 在我的本地机器上解压源代码。
由于中国的网络连接不良,因此需要此过程,这意味着 git clone
可能会丢失数据包。
为了构建,我做了以下步骤:
gclient sync
gn gen out/Default
autoninja -C out/Default chrome
执行此操作时出现以下错误;
[1/48575] CC obj/third_party/libwebp/libwebp_dsp_sse41/dec_sse41.o
Failed: obj/third_party/libwebp/libwebp_dsp_sse41/dec_sse41.o
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/libwebp/libwebp_dsp_sse41/dec_sse41.o.d -D_LIBCPP_HAS_NO_ALIGNED_ALLOCATION -DCR_XCODE_VERSION=1220 -DCR_CLANG_REVISION=\"llvmorg-12-init-11462-g418f18c6-1\" -DCOMPONENT_BUILD -D_LIBCPP_ENABLE_NOdisCARD -D_LIBCPP_DEBUG=0 -DCR_LIBCXX_REVISION=375504 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERscoreS=0 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWEBP_NEAR_LOSSLESS=0 -DWEBP_disABLE_STATS -DWEBP_REDUCE_SIZE -DWEBP_REDUCE_CSP -DWEBP_EXTERN=extern -I../.. -Igen -I../../third_party/libwebp -I../../third_party/libwebp/src -msse4.1 -fno-strict-aliasing -fstack-protector-strong -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -arch x86_64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -O0 -fno-omit-frame-pointer -gdwarf-4 -g2 -isysroot ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -mmacosx-version-min=10.10.0 -ftrivial-auto-var-init=pattern -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-misleading-indentation -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-max-tokens -std=c11 -Wno-implicit-fallthrough -c ../../third_party/libwebp/src/dsp/dec_sse41.c -o obj/third_party/libwebp/libwebp_dsp_sse41/dec_sse41.o
/bin/sh: ../../third_party/llvm-build/Release+Asserts/bin/clang: cannot execute binary file
我正在为此工作超过 5 天,请帮助我。
解决方法
它有效,我找到了解决方案。
我删除 src/third_party/llvm-build 目录,然后再次 gclient sync
。
它将下载可执行的clang程序。
谢谢大家。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。