Error when compiling for Android 11

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error when compiling for Android 11

2,441 Views
lishaocheng
Contributor III

Compiling the Android 11 Linux kernel for imx8mp_evp sends an error, what could be that part of the reason?

The following are the compilation steps and error messages。

 

~/imx-android-11.0.0_2.4.0/android_build$ export AARCH64_GCC_CROSS_COMPILE=/opt/toolchain/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-
~/imx-android-11.0.0_2.4.0/android_build$ export CLANG_PATH=/opt/prebuilt-android-clang 
~/imx-android-11.0.0_2.4.0/android_build$ source build/envsetup.sh 
~/imx-android-11.0.0_2.4.0/android_build$ lunch evk_8mp-userdebug 
~/imx-android-11.0.0_2.4.0/android_build$ ./imx-make.sh kernel -c -j4
make: Entering directory '/home/sbs/imx-android-11.0.0_2.4.0/android_build'
Merging KERNEL config srcs: /home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/gki_defconfig /home/sbs/imx-android-11.0.0_2.4.0/android_build/device/nxp/imx8m/evk_8mp/android_addition_defconfig /home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mp_gki.fragment
Using /home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/gki_defconfig as base
Merging /home/sbs/imx-android-11.0.0_2.4.0/android_build/device/nxp/imx8m/evk_8mp/android_addition_defconfig
Merging /home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mp_gki.fragment
Value of CONFIG_STATIC_USERMODEHELPER_PATH is redefined by fragment /home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mp_gki.fragment:
Previous value: CONFIG_STATIC_USERMODEHELPER_PATH=""
New value: CONFIG_STATIC_USERMODEHELPER_PATH="/system/bin/sh"

Value of CONFIG_LTO_CLANG_FULL is redefined by fragment /home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mp_gki.fragment:
Previous value: CONFIG_LTO_CLANG_FULL=y
New value: # CONFIG_LTO_CLANG_FULL is not set

Value of CONFIG_CFI_CLANG is redefined by fragment /home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mp_gki.fragment:
Previous value: CONFIG_CFI_CLANG=y
New value: # CONFIG_CFI_CLANG is not set

make[1]: Entering directory '/home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx'
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[2]: Entering directory '/home/sbs/imx-android-11.0.0_2.4.0/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ'
  GEN     Makefile
  HOSTCC  scripts/basic/fixdep
Internal error. Please report to android-llvm@google.com.
compiler_wrapper.go:178: failed to execute &main.command{Path:"/opt/prebuilt-android-clang/clang-r416183b/bin/clang.real", Args:[]string{"-Wp,-MMD,scripts/basic/.fixdep.d", "-Wall", "-Wmissing-prototypes", "-Wstrict-prototypes", "-O2", "-fomit-frame-pointer", "-std=gnu89", "-I", "./scripts/basic", "-o", "scripts/basic/fixdep", "/home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/scripts/basic/fixdep.c"}, EnvUpdates:[]string(nil)}: go_exec.go:22: exec error: exec format error
make[3]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 1
make[2]: *** [/home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx/Makefile:550: scripts_basic] Error 2
make[2]: Leaving directory '/home/sbs/imx-android-11.0.0_2.4.0/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ'
make[1]: *** [Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/home/sbs/imx-android-11.0.0_2.4.0/android_build/vendor/nxp-opensource/kernel_imx'
make: *** [/home/sbs/imx-android-11.0.0_2.4.0/android_build/device/nxp/common/build/kernel.mk:187: /home/sbs/imx-android-11.0.0_2.4.0/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ/.config] Error 2
make: Leaving directory '/home/sbs/imx-android-11.0.0_2.4.0/android_build'

 

 

0 Kudos
Reply
1 Reply

2,430 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello lishaocheng

Is probably that you have another linux BSP or android compilated in your computer? the issue is weird I never seen before it said

Internal error. Please report to android-llvm@google.com.

So I suggest to send the log to that address is problem of your PC and android.

 

Regards

0 Kudos
Reply