【已解决】 AOSP - android-9.0.0_r8 源码整编时出错
Google搜了很久都没找到,以下是报错日志
下载的 android-9.0.0_r8 源码
anjiemo@ubuntu:~$ make -j6
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=aosp_x86
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-26-generic-x86_64-Ubuntu-20.04-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR2.180905.006.A1
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
wildcard(out/target/product/generic_x86/clean_steps.mk) was changed, regenerating...
No need to regenerate ninja file
[ 0% 2/79106] host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
FAILED: out/hostnux-x86/obj/EXECUTABLES/aapt_intermediates/Main.o
/bin/bash -c "PWD=/proclf/cwd prebuilts/clang/hostnux-x86/clang-4691093/bin/clang++ -I frameworks/base/tools/aapt -I out/hostnux-x86/obj/EXECUTABLES/aapt_intermediates -I out/hostnux-x86/gen/EXECUTABLES/aapt_intermediates -I libnativehelper/include_jni \$(cat out/hostnux-x86/obj/EXECUTABLES/aapt_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardwarebhardware/include -I hardwarebhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -c -Wa,--noexecstack -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS --gcc-toolchain=prebuilts/gccnux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gccnux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -fstack-protector-strong -m64 -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 -fdebug-prefix-map=/proclf/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -target x86_64-linux-gnu -Bprebuilts/gccnux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -isystem prebuilts/gccnux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gccnux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -isystem prebuilts/gccnux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -std=gnu++14 -DAAPT_VERSION=\\\"\$(cat outild_number.txt)\\\" -Wall -Werror -fPIE -D_USING_LIBCXX -DANDROID_STRICT -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -MD -MF out/hostnux-x86/obj/EXECUTABLES/aapt_intermediates/Main.d -o out/hostnux-x86/obj/EXECUTABLES/aapt_intermediates/Main.o frameworks/base/tools/aapt/Main.cpp"
prebuilts/clang/hostnux-x86/clang-4691093/bin/clang++.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
[ 0% 7/79106] build out/target/common.../PACKAGING/hiddenapi-dark-greylist.txt
ninja: build stopped: subcommand failed.
20:24:02 ninja failed with: exit status 1
#### failed to build some targets (21 seconds) ####
下面是截图
libtinfo.so.5
一搜这个,不就有了么?
这个,你可以理解为Main.cpp编译为Main.o失败了。
为什么呢?
往下看呀:
这是啥?这是编译指令呀,编译谁,参数是啥,输出是啥,都有了。
为什么会失败呢?
libtinfo.so.5: cannot open shared object file: No such file or directory
你这个共享库没有呀!!!!
说明你的环境有问题呀,是不是安装的时候漏掉啥了呀。
怎么办呢?
装这个库:libtinfo.so,怎么装,是什么模块的?
搜索一下就知道了。