nathanchance / android-kernel-clang

Information on compiling Android kernels with Clang
291 stars 83 forks source link

Faild to build flame kernel #14

Closed taotaodong527 closed 4 years ago

taotaodong527 commented 4 years ago

Hi there: I tried to build the floral_defconfig (from my understanding is used for coral and flame) Everything seems going well when following your guide “How to compile the kernel with Clang (standalone)".

Unfortunately I got a error as below: aarch64-linux-android-ld.gold: error: LLVMgold.so: could not load plugin library: LLVMgold.so: cannot open shared object file: No such file or directory ../scripts/Makefile.build:613: recipe for target 'arch/arm64/lib/lib-ksyms.o' failed make[2]: [arch/arm64/lib/lib-ksyms.o] Error 1 /home/dongtaotao/msm/Makefile:1153: recipe for target 'arch/arm64/lib' failed make[1]: [arch/arm64/lib] Error 2

Would you mind let me know anything I need to check?

taotaodong527 commented 4 years ago

Hi: After export LD_LIBRARY_PATH=/WORKING_DIRECTORY/prebuilts/clang/host/linux-x86/clang-r353983c/lib64/. LLVMgold.so: could not load plugin library no longer exists. The build process failed with: GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.o AR built-in.o LTO vmlinux.o ../scripts/link-vmlinux.sh: line 101: 18716 Killed ${LD} ${LDFLAGS} -r -o ${1} $(modversions) ${objects} /home/dongtaotao/msm/Makefile:1134: recipe for target 'vmlinux' failed make[1]: [vmlinux] Error 137 make[1]: Leaving directory '/home/dongtaotao/msm/out' Makefile:146: recipe for target 'sub-make' failed make: [sub-make] Error 2 Any suggestions?

nathanchance commented 4 years ago

You should use LD=ld.lld for floral, they do not use ld.gold.

taotaodong527 commented 4 years ago

@nathanchance Thanks. You are right. The issue has been fixed with LD=ld.lld

bola980 commented 1 year ago

You should use LD=ld.lld for floral, they do not use ld.gold.

How to use bro whats you mean

sampleuserjohn commented 9 months ago

@nathanchance Hi... How and where to use LD=ld.lld while compiling kernel for Pixel 4 Please reply...