Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地/云编译错误unused variable 'irq' [-Werror=unused-variable] unsigned int irq, min_delta #13251

Closed
1 task done
TongKwun opened this issue Jan 2, 2025 · 1 comment

Comments

@TongKwun
Copy link

TongKwun commented Jan 2, 2025

详细叙述

我用本地虚拟机Ubuntu22.04 / Debian12和Github Action云编译斐讯K2(psg1218a)的固件都是同一个错误,请问下大佬们是什么问题?

重复 issue

  • 没有类似的 issue

具体型号

ramips_mt7620_phicomm_psg1218a

详细日志

make[2]: Entering directory '/workdir/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/workdir/openwrt/scripts/config'
make[1] world
make[2] tools/compile
make[2] package/cleanup
make[3] -C tools/flock compile
make[3] -C tools/libdeflate compile
make[3] -C tools/zstd compile
make[3] -C tools/sed compile
make[3] -C tools/patch compile
make[3] -C tools/tar compile
make[3] -C tools/m4 compile
make[3] -C tools/autoconf-archive compile
make[3] -C tools/ninja compile
make[3] -C tools/xz compile
make[3] -C tools/gnulib compile
make[3] -C tools/expat compile
make[3] -C tools/zlib compile
make[3] -C tools/cpio compile
make[3] -C tools/lzma compile
make[3] -C tools/make-ext4fs compile
make[3] -C tools/mtools compile
make[3] -C tools/patch-image compile
make[3] -C tools/squashfs4 compile
make[3] -C tools/sstrip compile
make[3] -C tools/zip compile
make[3] -C tools/autoconf compile
make[3] -C tools/meson compile
make[3] -C tools/pkgconf compile
make[3] -C tools/missing-macros compile
make[3] -C tools/automake compile
make[3] -C tools/libressl compile
make[3] -C tools/dosfstools compile
make[3] -C tools/libtool compile
make[3] -C tools/elfutils compile
make[3] -C tools/flex compile
make[3] -C tools/fakeroot compile
make[3] -C tools/gengetopt compile
make[3] -C tools/mklibs compile
make[3] -C tools/patchelf compile
make[3] -C tools/gmp compile
make[3] -C tools/bison compile
make[3] -C tools/cmake compile
make[3] -C tools/bc compile
make[3] -C tools/util-linux compile
make[3] -C tools/findutils compile
make[3] -C tools/mkimage compile
make[3] -C tools/mpfr compile
make[3] -C tools/e2fsprogs compile
make[3] -C tools/padjffs2 compile
make[3] -C tools/quilt compile
make[3] -C tools/mpc compile
make[3] -C tools/mtd-utils compile
make[3] -C tools/firmware-utils compile
make[2] toolchain/compile
make[3] -C toolchain/gdb compile
make[3] -C toolchain/binutils compile
make[3] -C toolchain/fortify-headers compile
make[3] -C toolchain/gcc/initial compile
make[3] -C toolchain/musl compile
make[3] -C toolchain/kernel-headers compile
make[3] -C toolchain/gcc/final compile
make[2] target/compile
make[3] -C target/linux compile
ERROR: target/linux failed to build.
make: *** [/workdir/openwrt/include/toplevel.mk:231: 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[2]: Entering directory '/workdir/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/workdir/openwrt/scripts/config'
make[1] world
make[2] target/compile
make[3] -C target/linux compile
ERROR: target/linux 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:231: world] Error 1
make[2]: Entering directory '/workdir/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/workdir/openwrt/scripts/config'
make[1]: Entering directory '/workdir/openwrt'
make[2]: Entering directory '/workdir/openwrt'
make[3]: Entering directory '/workdir/openwrt/target/linux'
make[4]: Entering directory '/workdir/openwrt/target/linux/ramips'
rm -f /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/localversion
/workdir/openwrt/scripts/kconfig.pl + /workdir/openwrt/target/linux/generic/config-5.10 /workdir/openwrt/target/linux/ramips/mt7620/config-5.10 > /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.target
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' /workdir/openwrt/.config >> /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.target
echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.target
/workdir/openwrt/scripts/package-metadata.pl kconfig /workdir/openwrt/tmp/.packageinfo /workdir/openwrt/.config 5.10 > /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.override
/workdir/openwrt/scripts/kconfig.pl 'm+' '+' /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.target /dev/null /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.override > /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set
mv /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.old
grep -v INITRAMFS /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.old > /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set
echo 'CONFIG_INITRAMFS_SOURCE=""' >> /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set
echo '# CONFIG_INITRAMFS_FORCE is not set' >> /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set
rm -rf /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/modules
cmp -s /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.prev || { cp /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config; cp /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.prev; }
export MAKEFLAGS= ; [ -d /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/user_headers ] || make -C /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232 KCFLAGS="-fmacro-prefix-map=/workdir/openwrt/build_dir/target-mipsel_24kc_musl=target-mipsel_24kc_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/workdir/openwrt/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="mipsel-openwrt-linux-musl-" ARCH="mips" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Tue Dec 31 14:00:08 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/workdir/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V='' cmd_syscalls= KERNELRELEASE=5.10.232 CC="mipsel-openwrt-linux-musl-gcc" INSTALL_HDR_PATH=/workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/user_headers headers_install
grep '=[ym]' /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.config.set | LC_ALL=C sort | /workdir/openwrt/staging_dir/host/bin/mkhash md5 > /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.vermagic
touch /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.configured
rm -f /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/vmlinux /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/System.map
make -C /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232 KCFLAGS="-fmacro-prefix-map=/workdir/openwrt/build_dir/target-mipsel_24kc_musl=target-mipsel_24kc_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/workdir/openwrt/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="mipsel-openwrt-linux-musl-" ARCH="mips" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Tue Dec 31 14:00:08 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/workdir/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V='' cmd_syscalls= KERNELRELEASE=5.10.232 CC="mipsel-openwrt-linux-musl-gcc" olddefconfig
make[5]: Entering directory '/workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232'
net/sched/Kconfig:45: warning: menuconfig statement without prompt
net/Kconfig:484:warning: multi-line strings not supported
No change to .config
make[5]: Leaving directory '/workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232'
make -C /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232 KCFLAGS="-fmacro-prefix-map=/workdir/openwrt/build_dir/target-mipsel_24kc_musl=target-mipsel_24kc_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/workdir/openwrt/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="mipsel-openwrt-linux-musl-" ARCH="mips" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Tue Dec 31 14:00:08 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/workdir/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V='' cmd_syscalls= KERNELRELEASE=5.10.232 CC="mipsel-openwrt-linux-musl-gcc" all modules
make[5]: Entering directory '/workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232'
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
CHK include/generated/compile.h
CC arch/mips/kernel/cevt-r4k.o
arch/mips/kernel/cevt-r4k.c: In function 'r4k_clockevent_init':
arch/mips/kernel/cevt-r4k.c:329:15: error: unused variable 'irq' [-Werror=unused-variable]
unsigned int irq, min_delta;
^~~
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:286: arch/mips/kernel/cevt-r4k.o] Error 1
make[6]: *** [scripts/Makefile.build:503: arch/mips/kernel] Error 2
make[5]: *** [Makefile:1832: arch/mips] Error 2
make[5]: Leaving directory '/workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232'
make[4]: *** [Makefile:25: /workdir/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.10.232/.modules] Error 2
make[4]: Leaving directory '/workdir/openwrt/target/linux/ramips'
make[3]: *** [Makefile:11: compile] Error 2
make[3]: Leaving directory '/workdir/openwrt/target/linux'
time: target/linux/compile#1.56#0.61#2.02
ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:30: target/linux/compile] Error 1
make[2]: Leaving directory '/workdir/openwrt'
make[1]: *** [target/Makefile:23: /workdir/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.target_compile] Error 2
make[1]: Leaving directory '/workdir/openwrt'
make: *** [/workdir/openwrt/include/toplevel.mk:231: world] Error 2
Error: Process completed with exit code 2.

@TongKwun
Copy link
Author

TongKwun commented Jan 2, 2025

试了下编译K2P的固件是没问题的,只有K2的会报错

467815891a pushed a commit to 467815891a/lede that referenced this issue Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant