리눅스에서 안드로이드 소스 빌드 중 나타난 에러입니다.
▲ 에러 메시지
build out/target/product/apollo/abl.elf
FAILED: out/target/product/apollo/abl.elf
/bin/bash -c "make -j4 -C bootable/bootloader/edk2 BOOTLOADER_OUT=../../../out/target/product/apollo/obj/ABL_OBJ all VERIFIED_BOOT=1 VERIFIED_BOOT_2=0 USER_BUILD_VARIANT=0 CLANG_BIN=/home/sdduser/code/android_O/prebuilts/clang/host/ linux-x86/clang-4053586/bin/ TARGET_ARCHITECTURE=AARCH64"
make: Entering directory '/home/sdduser/code/android_O/bootable/bootloader/edk2'
Loading previous configuration from /home/sdduser/code/android_O/bootable/bootloader/edk2/Conf/BuildEnv.sh
WORKSPACE: /home/sdduser/code/android_O/bootable/bootloader/edk2
EDK_TOOLS_PATH: /local/android_O/bootable/bootloader/edk2/BaseTools
CONF_PATH: /home/sdduser/code/android_O/bootable/bootloader/edk2/Conf
make[1]: Entering directory '/home/sdduser/code/android_O/bootable/bootloader/edk2'
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make -C Source/C
make[2]: Entering directory '/home/sdduser/code/android_O/bootable/bootloader/edk2/BaseTools/Source/C'
Attempting to detect ARCH from 'uname -m': x86_64
Detected ARCH of X64 using uname.
mkdir -p .
make -C Common
make[3]: Entering directory '/home/sdduser/code/android_O/bootable/bootloader/edk2/BaseTools/Source/C/Common'
make[3]: *** No rule to make target '/usr/include/x86_64-linux-gnu/bits/predefs.h', needed by 'BasePeCoff.o'. Stop.
make[3]: Leaving directory '/home/sdduser/code/android_O/bootable/bootloader/edk2/BaseTools/Source/C/Common'
GNUmakefile:79: recipe for target 'Common' failed
make[2]: *** [Common] Error 2
make[2]: Leaving directory '/home/sdduser/code/android_O/bootable/bootloader/edk2/BaseTools/Source/C'
GNUmakefile:25: recipe for target 'Source/C' failed
make[1]: *** [Source/C] Error 2
make[1]: Leaving directory '/home/sdduser/code/android_O/bootable/bootloader/edk2/BaseTools'
makefile:49: recipe for target 'EDK_TOOLS_BIN' failed
make: *** [EDK_TOOLS_BIN] Error 2
make: Leaving directory '/home/sdduser/code/android_O/bootable/bootloader/edk2'
▲ 해결 방법
$ cd android/bootable/bootloader/edk2
$ . edksetup.sh
$ rm -rf Conf/BuildEnv.sh
$ unset EDK_TOOLS_PATH
$ . ./edksetup.sh BaseTools
$ cd BaseTools
$ make clean
우분투 설치하고 처음에 빌드하려고 했을 때 발생했던 에러였는데,
왜 났는지는 모르겠다..
구글링 하다가 발견했다.!
이렇게 하니 지금까지 몇개월간? 에러 발생 안하고 있음!
수정 된 것 같당!
끄읐~!