Re: Kernel build fail with 'btf_encoder__encode: btf__dedup failed!'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 22, 2023 at 10:48:44AM -0700, Daniel Xu wrote:
> Hi,
> 
> I'm getting the following error during build:
> 
>         $ ./tools/testing/selftests/bpf/vmtest.sh -j30
>         [...]
>           BTF     .btf.vmlinux.bin.o
>         btf_encoder__encode: btf__dedup failed!
>         Failed to encode BTF
>           LD      .tmp_vmlinux.kallsyms1
>           NM      .tmp_vmlinux.kallsyms1.syms
>           KSYMS   .tmp_vmlinux.kallsyms1.S
>           AS      .tmp_vmlinux.kallsyms1.S
>           LD      .tmp_vmlinux.kallsyms2
>           NM      .tmp_vmlinux.kallsyms2.syms
>           KSYMS   .tmp_vmlinux.kallsyms2.S
>           AS      .tmp_vmlinux.kallsyms2.S
>           LD      .tmp_vmlinux.kallsyms3
>           NM      .tmp_vmlinux.kallsyms3.syms
>           KSYMS   .tmp_vmlinux.kallsyms3.S
>           AS      .tmp_vmlinux.kallsyms3.S
>           LD      vmlinux
>           BTFIDS  vmlinux
>         FAILED: load BTF from vmlinux: No such file or directory
>         make[1]: *** [scripts/Makefile.vmlinux:35: vmlinux] Error 255
>         make[1]: *** Deleting file 'vmlinux'
>         make: *** [Makefile:1264: vmlinux] Error 2
> 
> This happens on both bpf-next/master (84150795a49) and 6.2-rc5
> (2241ab53cb).
> 
> I've also tried arch linux pahole 1:1.24+r29+g02d67c5-1 as well as
> upstream pahole on master (02d67c5176) and upstream pahole on
> next (2ca56f4c6f659).
> 
> Of the above 6 combinations, I think I've tried all of them (maybe
> missing 1 or 2).
> 
> Looks like GCC got updated recently on my machine, so perhaps
> it's related?
> 
>         CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.2.1 20230111"
> 
> I'll try some debugging, but just wanted to report it first.

hi,
I can't reproduce that.. can you reproduce it outside vmtest.sh?

there will be lot of output with patch below, but could contain
some more error output

jirka


---
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 32e573943cf0..05ac3ced89e7 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -125,7 +125,7 @@ gen_btf()
 	vmlinux_link ${1}
 
 	info "BTF" ${2}
-	LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${PAHOLE_FLAGS} ${1}
+	LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -V -J ${PAHOLE_FLAGS} ${1}
 
 	# Create ${2} which contains just .BTF section but no symbols. Add
 	# SHF_ALLOC because .BTF will be part of the vmlinux image. --strip-all



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux