Compile error "liblto_plugin.so not found" - noob question

I was trying to building the Linux kernel from source by following the 18.01 release notes
But I got the this error:

Blockquote
$ make -j4 Image.gz dtbs KERNELRELEASE=4.14.0-qcomlt-arm64
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
HOSTCC scripts/kallsyms
CC scripts/mod/empty.o
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
MKELF scripts/mod/elfconfig.h
CHK scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/pnmtologo
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/conmakehash
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/sortextable
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
CHK include/generated/utsrelease.h
CC kernel/bounds.s
CHK include/generated/timeconst.h
HOSTLD scripts/dtc/dtc
CHK include/generated/bounds.h
HOSTLD scripts/mod/modpost
CC arch/arm64/kernel/asm-offsets.s
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
LDS arch/arm64/kernel/vdso/vdso.lds
VDSOA arch/arm64/kernel/vdso/gettimeofday.o
VDSOA arch/arm64/kernel/vdso/note.o
VDSOA arch/arm64/kernel/vdso/sigreturn.o
VDSOL arch/arm64/kernel/vdso/vdso.so.dbg
aarch64-linux-gnu-gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.
arch/arm64/kernel/vdso/Makefile:35: recipe for target ‘arch/arm64/kernel/vdso/vdso.so.dbg’ failed
make[1]: *** [arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
arch/arm64/Makefile:160: recipe for target ‘vdso_prepare’ failed
make: *** [vdso_prepare] Error 2
Blockquote

I can’t seems to find this liblto_plugin.so file. How can I fix this?
Thanks in advance

which toolchain are you using for cross compiling?
this lib should be present in the toolchain directory (locate liblto_plugin.so)

Thanks Loic. I got it working now. locate liblto_plugin.so helps

I am using gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz as the release notes (18.01) suggests.
I found that I had to create a symbolic link in the directory to get it to work:
ln -s liblto_plugin.so.0.0.0 liblto_plugin.so

1 Like

Wil is correct.
I have created that symbolic link and it works perfectly as it should.

Thank you very much wil.