Yaffs2 cannot be compiled with GCC 14.2 on Main branch
Open
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: I cannot find it. (find it by checking history of the package Makefile)
Description: YAFFS2 fails to compile on Main branch with GCC 14.2
@neheb
printenv: executable
install -d -m0755 /home/debian/openwrt-RB5009UG/bin/targets/mvebu/cortexa72/packages/tmp
mkdir -p /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-2024.07/ipkg-aarch64_cortex-a72/uboot-envtools/CONTROL
(cd /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-2024.07/ipkg-aarch64_cortex-a72/uboot-envtools/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm; echo "$V_Package_uboot_envtools_conffiles" > conffiles; )
/home/debian/openwrt-RB5009UG/staging_dir/host/bin/fakeroot /home/debian/openwrt-RB5009UG/staging_dir/host/bin/bash /home/debian/openwrt-RB5009UG/scripts/ipkg-build -m "" /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-2024.07/ipkg-aarch64_cortex-a72/uboot-envtools /home/debian/openwrt-RB5009UG/bin/targets/mvebu/cortexa72/packages
/home/debian/openwrt-RB5009UG/staging_dir/host/bin/find: '/home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-2024.07/ipkg-aarch64_cortex-a72/uboot-envtools/etc/config/ubootenv': No such file or directory
/home/debian/openwrt-RB5009UG/staging_dir/host/bin/find: '/home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-2024.07/ipkg-aarch64_cortex-a72/uboot-envtools/etc/fw_env.config': No such file or directory
/home/debian/openwrt-RB5009UG/staging_dir/host/bin/find: '/home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-2024.07/ipkg-aarch64_cortex-a72/uboot-envtools/etc/fw_sys.config': No such file or directory
Packaged contents of /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-2024.07/ipkg-aarch64_cortex-a72/uboot-envtools into /home/debian/openwrt-RB5009UG/bin/targets/mvebu/cortexa72/packages/uboot-envtools_2024.07-r1_aarch64_cortex-a72.ipk
echo "uboot-envtools" >> /home/debian/openwrt-RB5009UG/staging_dir/target-aarch64_cortex-a72_musl/pkginfo/uboot-envtools.default.install
make[3]: Leaving directory '/home/debian/openwrt-RB5009UG/package/boot/uboot-envtools'
time: package/boot/uboot-envtools/compile#9.02#10.53#27.29
make[3]: Entering directory '/home/debian/openwrt-RB5009UG/package/boot/uboot-mvebu'
rm -f /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-rb5009/u-boot-2024.10/.built
touch /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-rb5009/u-boot-2024.10/.built_check
make -C /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-rb5009/u-boot-2024.10 CROSS_COMPILE=aarch64-openwrt-linux-musl- DTC="/home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/linux-6.6.58/scripts/dtc/dtc" PATH=/home/debian/openwrt-RB5009UG/staging_dir/host/bin:/home/debian/openwrt-RB5009UG/staging_dir/target-aarch64_cortex-a72_musl/host/bin:/home/debian/openwrt-RB5009UG/staging_dir/hostpkg/bin:/home/debian/openwrt-RB5009UG/staging_dir/toolchain-aarch64_cortex-a72_gcc-14.2.0_musl/bin:/home/debian/openwrt-RB5009UG/staging_dir/toolchain-aarch64_cortex-a72_gcc-14.2.0_musl/bin:/home/debian/openwrt-RB5009UG/staging_dir/host/bin:/home/debian/openwrt-RB5009UG/staging_dir/toolchain-aarch64_cortex-a72_gcc-14.2.0_musl/bin:/home/debian/openwrt-RB5009UG/staging_dir/host/bin:/home/debian/openwrt-RB5009UG/staging_dir/host/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/debian/.dotnet/tools HOSTCC="ccache /home/debian/openwrt-RB5009UG/staging_dir/host/bin/gcc" HOSTCFLAGS="-O2 -I/home/debian/openwrt-RB5009UG/staging_dir/host/include -I/home/debian/openwrt-RB5009UG/staging_dir/hostpkg/include -I/home/debian/openwrt-RB5009UG/staging_dir/target-aarch64_cortex-a72_musl/host/include -I/home/debian/openwrt-RB5009UG/staging_dir/host/include -I/home/debian/openwrt-RB5009UG/staging_dir/hostpkg/include -I/home/debian/openwrt-RB5009UG/staging_dir/target-aarch64_cortex-a72_musl/host/include -std=gnu11" HOSTLDFLAGS="-L/home/debian/openwrt-RB5009UG/staging_dir/host/lib -L/home/debian/openwrt-RB5009UG/staging_dir/hostpkg/lib -L/home/debian/openwrt-RB5009UG/staging_dir/target-aarch64_cortex-a72_musl/host/lib" LOCALVERSION="-OpenWrt-r27903-27657050d0" STAGING_PREFIX="/home/debian/openwrt-RB5009UG/staging_dir/host" PKG_CONFIG_PATH="/home/debian/openwrt-RB5009UG/staging_dir/host/lib/pkgconfig" PKG_CONFIG_LIBDIR="/home/debian/openwrt-RB5009UG/staging_dir/host/lib/pkgconfig" PKG_CONFIG_EXTRAARGS="--static" V=1
make[4]: Entering directory '/home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-rb5009/u-boot-2024.10'
set -e; mkdir -p include/config/; KERNELVERSION=2024.10 /bin/bash ./scripts/setlocalversion . < include/config/auto.conf > include/config/uboot.release.tmp; if [ -r include/config/uboot.release ] && cmp -s include/config/uboot.release include/config/uboot.release.tmp; then rm -f include/config/uboot.release.tmp; else : ' UPD include/config/uboot.release'; mv -f include/config/uboot.release.tmp include/config/uboot.release; fi
set -e; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2024.10-OpenWrt-r27903-27657050d0\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define U_BOOT_VERSION_NUM 2024; echo \#define U_BOOT_VERSION_NUM_PATCH $(echo 10 | sed -e "s/^0*//"); echo \#define HOST_ARCH 0xaa64; echo \#define CC_VERSION_STRING \"$(LC_ALL=C aarch64-openwrt-linux-musl-gcc --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C aarch64-openwrt-linux-musl-ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : ' UPD include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
set -e; mkdir -p include/generated/; (if test -n "${SOURCE_DATE_EPOCH}"; then SOURCE_DATE="@${SOURCE_DATE_EPOCH}"; DATE=""; for date in gdate date.gnu date; do ${date} -u -d "${SOURCE_DATE}" >/dev/null 2>&1 && DATE="${date}"; done; if test -n "${DATE}"; then LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_EPOCH %s'; else return 42; fi; else LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; LC_ALL=C date +'#define U_BOOT_TIME "%T"'; LC_ALL=C date +'#define U_BOOT_TZ "%z"'; LC_ALL=C date +'#define U_BOOT_EPOCH %s'; fi) < Makefile > include/generated/timestamp_autogenerated.h.tmp; if [ -r include/generated/timestamp_autogenerated.h ] && cmp -s include/generated/timestamp_autogenerated.h include/generated/timestamp_autogenerated.h.tmp; then rm -f include/generated/timestamp_autogenerated.h.tmp; else : ' UPD include/generated/timestamp_autogenerated.h'; mv -f include/generated/timestamp_autogenerated.h.tmp include/generated/timestamp_autogenerated.h; fi
set -e; mkdir -p include/generated/; (if test -n "${DEVICE_TREE}"; then echo \#define DEVICE_TREE \"\"; else echo \#define DEVICE_TREE CONFIG_DEFAULT_DEVICE_TREE; fi) < Makefile > include/generated/dt.h.tmp; if [ -r include/generated/dt.h ] && cmp -s include/generated/dt.h include/generated/dt.h.tmp; then rm -f include/generated/dt.h.tmp; else : ' UPD include/generated/dt.h'; mv -f include/generated/dt.h.tmp include/generated/dt.h; fi
make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.build obj=.
set -e; mkdir -p include/generated/; (set -e; echo "#ifndef __GENERIC_ASM_OFFSETS_H__"; echo "#define __GENERIC_ASM_OFFSETS_H__"; echo "/*"; echo " * DO NOT MODIFY."; echo " *"; echo " * This file was generated by Kbuild"; echo " */"; echo ""; sed -ne "s:[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\":\1:; /^->/{s:->#\(.*\):/* \1 */:; s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; echo ""; echo "#endif" ) < lib/asm-offsets.s > include/generated/generic-asm-offsets.h.tmp; if [ -r include/generated/generic-asm-offsets.h ] && cmp -s include/generated/generic-asm-offsets.h include/generated/generic-asm-offsets.h.tmp; then rm -f include/generated/generic-asm-offsets.h.tmp; else : ' UPD include/generated/generic-asm-offsets.h'; mv -f include/generated/generic-asm-offsets.h.tmp include/generated/generic-asm-offsets.h; fi
set -e; mkdir -p include/generated/; (set -e; echo "#ifndef __ASM_OFFSETS_H__"; echo "#define __ASM_OFFSETS_H__"; echo "/*"; echo " * DO NOT MODIFY."; echo " *"; echo " * This file was generated by Kbuild"; echo " */"; echo ""; sed -ne "s:[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\":\1:; /^->/{s:->#\(.*\):/* \1 */:; s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; echo ""; echo "#endif" ) < arch/arm/lib/asm-offsets.s > include/generated/asm-offsets.h.tmp; if [ -r include/generated/asm-offsets.h ] && cmp -s include/generated/asm-offsets.h include/generated/asm-offsets.h.tmp; then rm -f include/generated/asm-offsets.h.tmp; else : ' UPD include/generated/asm-offsets.h'; mv -f include/generated/asm-offsets.h.tmp include/generated/asm-offsets.h; fi
if test "/home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/linux-6.6.58/scripts/dtc/dtc" = "./scripts/dtc/dtc"; then \
make -f ./scripts/Makefile.build obj=scripts/dtc; \
else \
if ! /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/linux-6.6.58/scripts/dtc/dtc -v >/dev/null; then \
echo '*** Failed to check dtc version: /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/linux-6.6.58/scripts/dtc/dtc'; \
false; \
else \
if test "010601" -lt 010406; then \
echo '*** Your dtc is too old, please upgrade to dtc 010406 or newer'; \
false; \
else \
if [ -n "" ]; then \
if ! echo "import libfdt" | python3 2>/dev/null; then \
echo '*** pylibfdt does not seem to be available with python3'; \
false; \
fi; \
fi; \
fi; \
fi; \
fi
make -f ./scripts/Makefile.build obj=scripts
make -f ./scripts/Makefile.build obj=tools
make -f ./scripts/Makefile.build obj=arch/arm/cpu
make -f ./scripts/Makefile.build obj=arch/arm/cpu/armv8
make -f ./scripts/Makefile.build obj=arch/arm/lib
make -f ./scripts/Makefile.build obj=arch/arm/mach-mvebu
make -f ./scripts/Makefile.build obj=arch/arm/mach-mvebu/armada8k
make -f ./scripts/Makefile.build obj=board/Marvell/mvebu_armada-8k
make -f ./scripts/Makefile.build obj=boot
make -f ./scripts/Makefile.build obj=cmd
make -f ./scripts/Makefile.build obj=cmd/arm
make -f ./scripts/Makefile.build obj=cmd/mvebu
aarch64-openwrt-linux-musl-gcc -Wp,-MD,cmd/.yaffs2.o.d -nostdinc -isystem /home/debian/openwrt-RB5009UG/staging_dir/toolchain-aarch64_cortex-a72_gcc-14.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/14.2.0/include -Iinclude -I./arch/arm/include -include ./include/linux/kconfig.h -I./dts/upstream/include -D__KERNEL__ -D__UBOOT__ -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE -Os -fno-stack-protector -fno-delete-null-pointer-checks -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-maybe-uninitialized -fmacro-prefix-map=./= -gdwarf-4 -fstack-usage -Wno-format-nonliteral -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=date-time -Wno-packed-not-aligned -D__ARM__ -fno-pic -mstrict-align -ffunction-sections -fdata-sections -fno-common -ffixed-x18 -mgeneral-regs-only -mbranch-protection=none -pipe -march=armv8-a+crc -D__LINUX_ARM_ARCH__=8 -I./arch/arm/mach-mvebu/include -DKBUILD_BASENAME='"yaffs2"' -DKBUILD_MODNAME='"yaffs2"' -c -o cmd/yaffs2.o cmd/yaffs2.c
cmd/yaffs2.c: In function 'do_ytrace':
cmd/yaffs2.c:47:40: error: implicit declaration of function 'simple_strtol' [-Wimplicit-function-declaration]
47 | cmd_yaffs_tracemask(1, simple_strtol(argv[1], NULL, 16));
| ^~~~~~~~~~~~~
cmd/yaffs2.c: In function 'do_ywr':
cmd/yaffs2.c:166:17: error: implicit declaration of function 'hextoul'; did you mean 'htonl'? [-Wimplicit-function-declaration]
166 | value = hextoul(argv[2], NULL);
| ^~~~~~~
| htonl
make[5]: *** [scripts/Makefile.build:257: cmd/yaffs2.o] Error 1
make[4]: *** [Makefile:1895: cmd] Error 2
make[4]: Leaving directory '/home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-rb5009/u-boot-2024.10'
make[3]: *** [Makefile:95: /home/debian/openwrt-RB5009UG/build_dir/target-aarch64_cortex-a72_musl/u-boot-rb5009/u-boot-2024.10/.built] Error 2
make[3]: Leaving directory '/home/debian/openwrt-RB5009UG/package/boot/uboot-mvebu'
time: package/boot/uboot-mvebu/rb5009/compile#0.92#0.82#2.01
ERROR: package/boot/uboot-mvebu failed to build (build variant: rb5009).
make[2]: *** [package/Makefile:177: package/boot/uboot-mvebu/compile] Error 1
make[2]: Leaving directory '/home/debian/openwrt-RB5009UG'
make[1]: *** [package/Makefile:171: /home/debian/openwrt-RB5009UG/staging_dir/target-aarch64_cortex-a72_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/debian/openwrt-RB5009UG'
make: *** [/home/debian/openwrt-RB5009UG/include/toplevel.mk:248: world] Error 2
For reference - https://forum.openwrt.org/t/building-kernel-6-6-for-mikrotik-rb5009ug/193213/34?u=sppmaster
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking the history of the package Makefile, as the issue suggests, then reproduce the YAFFS2 build with GCC 14.2 and identify the actual compiler failure in the build output. Done means the YAFFS2 package compiles successfully on the main branch with GCC 14.2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100