我正在尝试切换工具链以编译android

时间:2019-05-09 06:53:05

标签: android compiler-errors linux-toolchain

我正在尝试切换工具链以编译android。我已经将build / envsetup.sh修改为目标aarch64-linux-android-8.3 / bin

# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_TOOLCHAIN=
export ANDROID_TOOLCHAIN_2ND_ARCH=
local ARCH=$(get_build_var TARGET_ARCH)
local toolchaindir toolchaindir2=
case $ARCH in
    x86) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
        ;;
    x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
        ;;
    arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
        ;;
    arm64) toolchaindir=aarch64/aarch64-linux-android-8.3/bin;
           toolchaindir2=arm/arm-linux-

但是我在编译时遇到此错误

[ 10% 11035/106558] Building Kernel
FAILED: TARGET_KERNEL_BINARIES 
/bin/bash -c "(make -j4  CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/sdm845 O=/home/kuljeet/android/omni/out/target/product/oneplus6t/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache aarch64-linux-android-\"   Image.gz-dtb ) && (if grep -q '^CONFIG_OF=y' /home/kuljeet/android/omni/out/target/product/oneplus6t/obj/KERNEL_OBJ/.config; then           echo \"Building DTBs\";     make -j4  CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/sdm845 O=/home/kuljeet/android/omni/out/target/product/oneplus6t/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache aarch64-linux-android-\"   dtbs;      fi ) && (if grep -q '^CONFIG_MODULES=y' /home/kuljeet/android/omni/out/target/product/oneplus6t/obj/KERNEL_OBJ/.config; then            echo \"Building Kernel Modules\";           make -j4  CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/sdm845 O=/home/kuljeet/android/omni/out/target/product/oneplus6t/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache aarch64-linux-android-\"   modules;   fi )"
make: Entering directory '/home/kuljeet/android/omni/kernel/oneplus/sdm845'
make[1]: Entering directory '/home/kuljeet/android/omni/out/target/product/oneplus6t/obj/KERNEL_OBJ'
aarch64-linux-android-gcc: error trying to exec 'cc1': execvp: No such file or directory
aarch64-linux-android-gcc: error trying to exec 'cc1': execvp: No such file or directory
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
aarch64-linux-android-gcc: error trying to exec 'cc1': execvp: No such file or directory
aarch64-linux-android-gcc: error trying to exec 'cc1': execvp: No such file or directory
  CHK     include/config/kernel.release
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
/home/kuljeet/android/omni/kernel/oneplus/sdm845/Makefile:1198: recipe for target 'prepare-compiler-check' failed
make[1]: *** [prepare-compiler-check] Error 1
make[1]: *** Waiting for unfinished jobs....
  UPD     include/config/kernel.release
make[1]: *** wait: No child processes.  Stop.
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/kuljeet/android/omni/kernel/oneplus/sdm845'
[ 10% 11044/106558] Yacc: dtc <= external/dtc/dtc-parser.y
external/dtc/dtc-parser.y: conflicts: 3 shift/reduce
ninja: build stopped: subcommand failed.
11:57:14 ninja failed with: exit status 1

0 个答案:

没有答案