coolsnowwolf / lede

Lean's LEDE source
Other
29.82k stars 19.53k forks source link

x86 最新源码 ERROR: toolchain/kernel-headers failed to build #9808

Closed zhangguanzhang closed 2 years ago

zhangguanzhang commented 2 years ago

反馈bug/问题模板,提建议请删除

1.关于你要提交的问题

Q:是否搜索了issue (使用 "x" 选择)

2. 详细叙述

(1) 具体问题

A:

(2) 路由器型号和固件版本

A:x86_64 ,19.20 拉的源码

(3) 详细日志

A:

make[3] -C toolchain/musl compile
    ERROR: toolchain/kernel-headers failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/workdir/openwrt/include/toplevel.mk:[230](https://github.com/zhangguanzhang/Actions-OpenWrt/runs/7427767093?check_suite_focus=true#step:18:231): world] Error 1
failed: try to V=s
 make[1] world
 make[2] toolchain/compile
 make[3] -C toolchain/gdb compile
 make[3] -C toolchain/binutils compile
 make[3] -C toolchain/gcc/initial compile
 make[3] -C toolchain/kernel-headers compile
    ERROR: toolchain/kernel-headers failed to build.
make: *** [/workdir/openwrt/include/toplevel.mk:230: world] Error 1
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make[1]: Entering directory '/workdir/openwrt'
make[2]: Entering directory '/workdir/openwrt'
+ mkdir -p /workdir/openwrt/staging_dir/target-x86_64_musl
+ cd /workdir/openwrt/staging_dir/target-x86_64_musl
+ mkdir -p bin lib stamp usr/include usr/lib
mkdir -p /workdir/openwrt/build_dir/target-x86_64_musl/stamp
touch /workdir/openwrt/staging_dir/target-x86_64_musl/.prepared
make[3]: Entering directory '/workdir/openwrt/toolchain/gdb'
make[3]: Nothing to be done for 'compile'.
make[3]: Leaving directory '/workdir/openwrt/toolchain/gdb'
time: toolchain/gdb/compile#0.00#0.00#0.01
make[3]: Entering directory '/workdir/openwrt/toolchain/binutils'
make[3]: Nothing to be done for 'compile'.
make[3]: Leaving directory '/workdir/openwrt/toolchain/binutils'
time: toolchain/binutils/compile#0.00#0.00#0.01
make[3]: Entering directory '/workdir/openwrt/toolchain/gcc/initial'
make[3]: Nothing to be done for 'compile'.
make[3]: Leaving directory '/workdir/openwrt/toolchain/gcc/initial'
time: toolchain/gcc/initial/compile#0.01#0.00#0.02
make[3]: Entering directory '/workdir/openwrt/toolchain/kernel-headers'
rm -rf /workdir/openwrt/build_dir/toolchain-x86_64_gcc-8.4.0_musl/linux-*
xzcat /workdir/openwrt/dl/linux-5.15.55.tar.xz | tar -C /workdir/openwrt/build_dir/toolchain-x86_64_gcc-8.4.0_musl -xf -
cp -fpR "/workdir/openwrt/target/linux/generic/files"/. /workdir/openwrt/build_dir/toolchain-x86_64_gcc-8.4.0_musl/linux-5.15.55/
find /workdir/openwrt/build_dir/toolchain-x86_64_gcc-8.4.0_musl/linux-5.15.55/ -name \*.rej -or -name \*.orig | xargs -r rm -f
if [ -d /workdir/openwrt/target/linux/generic/patches ]; then echo "generic patches directory is present. please move your patches to the pending directory" ; exit 1; fi
Applying /workdir/openwrt/target/linux/generic/backport-5.15/011-kbuild-export-SUBARCH.patch using plaintext: 
patching file Makefile
Applying /workdir/openwrt/target/linux/generic/backport-5.15/050-v5.16-00-MIPS-uasm-Enable-muhu-opcode-for-MIPS-R6.patch using plaintext: 
patching file arch/mips/include/asm/uasm.h
patching file arch/mips/mm/uasm-mips.c
patching file arch/mips/mm/uasm.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/050-v5.16-01-mips-uasm-Add-workaround-for-Loongson-2F-nop-CPU-err.patch using plaintext: 
patching file arch/mips/include/asm/uasm.h
Applying /workdir/openwrt/target/linux/generic/backport-5.15/050-v5.16-02-mips-bpf-Add-eBPF-JIT-for-32-bit-MIPS.patch using plaintext: 
patching file arch/mips/net/Makefile
patching file arch/mips/net/bpf_jit_comp.c
patching file arch/mips/net/bpf_jit_comp.h
patching file arch/mips/net/bpf_jit_comp32.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/050-v5.16-03-mips-bpf-Add-new-eBPF-JIT-for-64-bit-MIPS.patch using plaintext: 
patching file arch/mips/net/bpf_jit_comp64.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/050-v5.16-04-mips-bpf-Add-JIT-workarounds-for-CPU-errata.patch using plaintext: 
patching file arch/mips/net/bpf_jit_comp.c
patching file arch/mips/net/bpf_jit_comp.h
patching file arch/mips/net/bpf_jit_comp64.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch using plaintext: 
patching file MAINTAINERS
patching file arch/mips/Kconfig
patching file arch/mips/net/Makefile
Applying /workdir/openwrt/target/linux/generic/backport-5.15/050-v5.16-06-mips-bpf-Remove-old-BPF-JIT-implementations.patch using plaintext: 
patching file arch/mips/net/bpf_jit.h
patching file arch/mips/net/bpf_jit_asm.S
Applying /workdir/openwrt/target/linux/generic/backport-5.15/081-net-next-regmap-allow-to-define-reg_update_bits-for-no-bus.patch using plaintext: 
patching file drivers/base/regmap/regmap.c
patching file include/linux/regmap.h
Applying /workdir/openwrt/target/linux/generic/backport-5.15/300-v5.18-pinctrl-qcom-Return--EINVAL-for-setting-affinity-if-no-IRQ-parent.patch using plaintext: 
patching file drivers/pinctrl/qcom/pinctrl-msm.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch using plaintext: 
patching file net/netfilter/nf_flow_table_core.c
patching file net/netfilter/nft_flow_offload.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/410-mtd-next-mtd-parsers-trx-allow-to-use-on-MediaTek-MIPS-SoCs.patch using plaintext: 
patching file drivers/mtd/parsers/Kconfig
Applying /workdir/openwrt/target/linux/generic/backport-5.15/700-net-next-net-dsa-introduce-tagger-owned-storage-for-private.patch using plaintext: 
patching file include/net/dsa.h
patching file net/dsa/dsa2.c
patching file net/dsa/dsa_priv.h
patching file net/dsa/switch.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/701-net-dsa-make-tagging-protocols-connect-to-individual-switches.patch using plaintext: 
patching file include/net/dsa.h
patching file net/dsa/dsa2.c
patching file net/dsa/dsa_priv.h
patching file net/dsa/switch.c
Applying /workdir/openwrt/target/linux/generic/backport-5.15/702-v5.19-34-eth-mtk_ppe-fix-up-after-merge.patch using plaintext: 
patching file drivers/net/ethernet/mediatek/mtk_ppe_offload.c
Hunk #1 FAILED at 90.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/ethernet/mediatek/mtk_ppe_offload.c.rej
make[3]: *** [Makefile:121: /workdir/openwrt/build_dir/toolchain-x86_64_gcc-8.4.0_musl/linux-5.15.55/.prepared] Error 1
Patch failed!  Please fix /workdir/openwrt/target/linux/generic/backport-5.15/702-v5.19-34-eth-mtk_ppe-fix-up-after-merge.patch!
make[3]: Leaving directory '/workdir/openwrt/toolchain/kernel-headers'
time: toolchain/kernel-headers/compile#11.46#7.26#19.36
    ERROR: toolchain/kernel-headers failed to build.
make[2]: *** [toolchain/Makefile:97: toolchain/kernel-headers/compile] Error 1
make[2]: Leaving directory '/workdir/openwrt'
make[1]: *** [toolchain/Makefile:93: /workdir/openwrt/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp/.toolchain_compile] Error 2
make[1]: Leaving directory '/workdir/openwrt'
make: *** [/workdir/openwrt/include/toplevel.mk:230: world] Error 2
peeweep commented 2 years ago

这个补丁有问题,5.15 上打不进去。https://github.com/coolsnowwolf/lede/commit/14f31f2a2b919d87231b3b4655f1b02fc3703c7f

doumeki commented 2 years ago

一样的错, 源文件里都没这段代码

peeweep commented 2 years ago

@aiamadeus 帮忙看看咋回事

luhe222 commented 2 years ago

5.15内核的x86、RK都有这个问题

chaoxiaodi commented 2 years ago

我也是遇到了这个问题 报错日志: Applying /data/lede/target/linux/generic/backport-5.15/702-v5.19-34-eth-mtk_ppe-fix-up-after-merge.patch using plaintext: patching file drivers/net/ethernet/mediatek/mtk_ppe_offload.c Hunk #1 FAILED at 90. 1 out of 1 hunk FAILED -- saving rejects to file drivers/net/ethernet/mediatek/mtk_ppe_offload.c.rej Patch failed! Please fix /data/lede/target/linux/generic/backport-5.15/702-v5.19-34-eth-mtk_ppe-fix-up-after-merge.patch! make[3]: [Makefile:121: /data/lede/build_dir/toolchain-x86_64_gcc-8.4.0_musl/linux-5.15.55/.prepared] Error 1 make[3]: Leaving directory '/data/lede/toolchain/kernel-headers' time: toolchain/kernel-headers/compile#9.46#6.99#12.19 ERROR: toolchain/kernel-headers failed to build. make[2]: [toolchain/Makefile:97: toolchain/kernel-headers/compile] Error 1 make[2]: Leaving directory '/data/lede' make[1]: [toolchain/Makefile:93: /data/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp/.toolchain_compile] Error 2 make[1]: Leaving directory '/data/lede' make: [/data/lede/include/toplevel.mk:230: world] Error 2

内核: Linux openwrt 5.10.0-16-amd64 #1 SMP Debian 5.10.127-1 (2022-06-30) x86_64 GNU/Linux

make menuconfig 没有做任何配置

tony198911 commented 2 years ago

手动切换内核到5.18后,错误消失,编译正常

Jejz168 commented 2 years ago

702-v5.19-34-eth-mtk_ppe-fix-up-after-merge.patch这个文件的问题

ecrasy commented 2 years ago

手动切换内核到5.18后,错误消失,编译正常

请问下在actions里编译怎么切换下到5.18?

chaoxiaodi commented 2 years ago

pull 到最新代码,成功编译完成

zhangguanzhang commented 2 years ago

跑了下,是正常的