我正在使用 Mac OS Catalina 版本 10.15.7。我正在尝试为 OnePlus 7T 编译 AOSIP 分支 10 的映像,但我无法使用命令make api-stubs-docs-update-current-api完成构建
我有一些报告丢失的模块,按照@TheHardGamer 的建议,我去了 AOSIP 的 Git 页面并为以下模块下载了分支 10。
libsquashfs_util -> placed into systems/extras/squashfs_utils
fec & verity -> placed into systems/extras/verity
libtestUtil -> placed into test/vts-testcase/kernel/testUtil
simpleperf-inferno -> The systems/extras/simpleperf/scripts was not present so i copied the entire scripts folder from Git
libc++_darwin -> I did git clone https://android.googlesource.com/platform/prebuilts/clang/host/darwin-x86 -b android-10.0.0_r40 on the prebuilts/clang/host folder
然后我遇到了以下错误:
internal error: Could not find a supported mac sdk: ["10.10" "10.11" "10.12" "10.13" "10.14"]
internal error: Could not find a supported mac sdk: ["10.10" "10.11" "10.12" "10.13" "10.14"]
所以我听从了Could not find a supported mac sdk: ["10.10" "10.11" "10.12" "10.13"]的建议
编辑了以下文件/Volumes/android/build/soong/cc/config/x86_darwin_host.go
在文件的以下代码段中添加了“11.1”
darwinSupportedSdkVersions = []string{
"10.10",
"10.11",
"10.12",
"10.13",
"10.14",
"11.1",
}
然后出现以下错误
error: system/extras/simpleperf/Android.bp:72:1: module "libsimpleperf_elf_read" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/read_apk.cpp" does not exist
error: system/extras/simpleperf/Android.bp:72:1: module "libsimpleperf_elf_read" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/read_elf.cpp" does not exist
error: system/extras/simpleperf/Android.bp:72:1: module "libsimpleperf_elf_read" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/utils.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/dso.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/event_attr.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/event_type.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/perf_regs.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/read_apk.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/read_elf.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/record.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/record_file_reader.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/report_sample.proto" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/thread_tree.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/tracing.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/utils.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/nonlinux_support/nonlinux_support.cpp" does not exist
error: system/extras/simpleperf/Android.bp:310:1: module "libsimpleperf" variant "darwin_x86_64_static": module source path "system/extras/simpleperf/nonlinux_support/include" does not exist
然后我将整个 simpleperf 文件夹从分支 10 复制到我的 simpleperf 文件夹中。
然后我遇到了以下错误
art/build/Android.common.mk:51: warning: unsupported HOST_ARCH=x86_64
[ 24% 116/481] including device_oneplus_hotdogb/overlay/packages/apps/overlays/NoCutoutOverlay/Android.mk ...
FAILED:
build/make/core/base_rules.mk:324: error: device_oneplus_hotdogb/overlay/packages/apps/overlays/NoCutoutOverlay: MODULE.TARGET.APPS.NoCutoutOverlay already defined by device/oneplus/hotdogb/overlay/packages/apps/overlays/NoCutoutOverlay.
10:15:54 ckati failed with: exit status 1
我删除了device_oneplus_hotdogb文件夹。
之后我遇到了这个错误。
FAILED: out/soong/.intermediates/system/core/base/libbase/darwin_x86_64_static/obj/system/core/base/cmsg.o
prebuilts/clang/host/darwin-x86/clang-r353983c1/bin/clang++ -c -Isystem/core/base -fPIC -funwind-tables -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -m64 -integrated-as -fstack-protector-strong -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -D__compiler_offsetof=__builtin_offsetof -faddrsig -Wimplicit-fallthrough -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-zero-as-null-pointer-constant -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Isystem/core/base/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/core/liblog/include -Isystem/core/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -Ilibnativehelper/include_jni -Wall -Werror -Wextra -D_FILE_OFFSET_BITS=64 -target x86_64-apple-darwin -B/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -DANDROID_STRICT -fPIC -D_USING_LIBCXX -std=gnu++17 -Wsign-promo -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -Wexit-time-destructors -D_LIBCPP_DISABLE_AVAILABILITY -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-tautological-unsigned-enum-zero-compare -Wno-tautological-unsigned-zero-compare -Wno-c++98-compat-extra-semi -Wno-return-std-move-in-c++11 -MD -MF out/soong/.intermediates/system/core/base/libbase/darwin_x86_64_static/obj/system/core/base/cmsg.o.d -o out/soong/.intermediates/system/core/base/libbase/darwin_x86_64_static/obj/system/core/base/cmsg.o system/core/base/cmsg.cpp
system/core/base/cmsg.cpp:36:21: error: use of undeclared identifier 'PAGE_SIZE'
if (cmsg_space >= PAGE_SIZE) {
^
system/core/base/cmsg.cpp:78:21: error: use of undeclared identifier 'PAGE_SIZE'
if (cmsg_space >= PAGE_SIZE) {
^
我应该尝试定义 page_size 吗?如果是,我如何决定尺寸?还是我在某处缺少头文件?
谢谢你。