plan44 / plan44-feed

OpenWrt feed containing plan44 packages
29 stars 9 forks source link

p44-ledchain compiling from MT7628AN Target profile. #7

Closed halidaltuner closed 3 months ago

halidaltuner commented 3 months ago

Hello,

I have a WS2812 IC that I am trying to use on the MT7628AN.

I started a compilation process for it.

However, I get the following error.

make[4]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134' for subdir in .; do realdir=$(readlink -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain); grep -F /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; [ "/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" = "$realdir" ] || grep -F $realdir /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; done; sort -u /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp > /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers; mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers; mv /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-ledchain.symvers grep: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./Module.symvers: No such file or directory touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built rm -rf /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain ERROR: module '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.ko' is missing. make[3]: *** [Makefile:61: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed] Error 1 make[3]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/package/p44-ledchain' time: package/p44-ledchain/compile#56.82#11.32#66.88 ERROR: package/p44-ledchain failed to build. make[2]: *** [package/Makefile:120: package/p44-ledchain/compile] Error 1 make[2]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt' make[1]: *** [package/Makefile:114: /home/halid/OpenWRT_Projects/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt' make: *** [/home/halid/OpenWRT_Projects/openwrt/include/toplevel.mk:232: world] Error 2

What am I doing wrong?

plan44 commented 3 months ago

Hmm, I don't see what could be the problem - apparently p44-ledchain.ko, the actual binary, does not get produced as it should be.

What is the command line you used to start the build? Is the module enabled in menuconfig?

halidaltuner commented 3 months ago

Yes, I think it can't mv because it can't be produced.

Our line in the config file is actually like this;

CONFIG_PACKAGE_kmod-p44-ledchain=y

Is that enough?

halidaltuner commented 3 months ago

I try the compilation in these 2 ways.

Generic compile; make -j $(nproc) defconfig download clean world

Package compile; make package/p44-ledchain/compile V=99

plan44 commented 3 months ago

What OpenWrt version are you on?

I assume you have:

CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt76x8=y

What is your CONFIG_TARGET_ramips_mt76x8_DEVICE_xxx? Not that it should matter, it should work as long as you have CONFIG_TARGET_ramips_mt76x8.

When I run

gmake package/p44-ledchain/compile V=s

then the output I get is:

gmake[2]: Entering directory '/Volumes/CaseSens/openwrt-2/scripts/config'
gmake[2]: 'conf' is up to date.
gmake[2]: Leaving directory '/Volumes/CaseSens/openwrt-2/scripts/config'
gmake[1]: Entering directory '/Volumes/CaseSens/openwrt-2'
gmake[2]: Entering directory '/Volumes/CaseSens/openwrt-2/feeds/plan44/p44-ledchain'
touch /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.prepared_8a412dcfc1010b4999553dc44c982b44_6664517399ebbbc92a37c5bb081b5c53_check
mkdir -p /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain
cp -fpR ./src/* /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/
touch /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.prepared_8a412dcfc1010b4999553dc44c982b44_6664517399ebbbc92a37c5bb081b5c53
rm -f /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.configured_*
rm -f /Volumes/CaseSens/openwrt-2/staging_dir/target-mipsel_24kc_musl/stamp/.p44-ledchain_installed
(cd /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./; if [ -x ./configure ]; then find /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.guess | xargs -r chmod u+w; find /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.guess | xargs -r -n1 cp --remove-destination /Volumes/CaseSens/openwrt-2/scripts/config.guess; find /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.sub | xargs -r chmod u+w; find /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.sub | xargs -r -n1 cp --remove-destination /Volumes/CaseSens/openwrt-2/scripts/config.sub; AR="mipsel-openwrt-linux-musl-gcc-ar" AS="mipsel-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -fmacro-prefix-map=/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=mipsel-openwrt-linux-musl-ld NM="mipsel-openwrt-linux-musl-gcc-nm" CC="mipsel-openwrt-linux-musl-gcc" GCC="mipsel-openwrt-linux-musl-gcc" CXX="mipsel-openwrt-linux-musl-g++" RANLIB="mipsel-openwrt-linux-musl-gcc-ranlib" STRIP=mipsel-openwrt-linux-musl-strip OBJCOPY=mipsel-openwrt-linux-musl-objcopy OBJDUMP=mipsel-openwrt-linux-musl-objdump SIZE=mipsel-openwrt-linux-musl-size CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/Volumes/CaseSens/openwrt-2/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/usr/include -I/Volumes/CaseSens/openwrt-2/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/include/fortify -I/Volumes/CaseSens/openwrt-2/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/include " LDFLAGS="-L/Volumes/CaseSens/openwrt-2/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/usr/lib -L/Volumes/CaseSens/openwrt-2/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib -znow -zrelro "   ./configure --target=mipsel-openwrt-linux --host=mipsel-openwrt-linux --build=aarch64-apple-darwin23.5.0 --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  ; fi; )
touch /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
touch /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built_check
gmake -C "/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.10.176" KCFLAGS="-fmacro-prefix-map=/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl=target-mipsel_24kc_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/Volumes/CaseSens/openwrt-2/staging_dir/host/include -I/Volumes/CaseSens/openwrt-2/staging_dir/hostpkg/include -I/Volumes/CaseSens/openwrt-2/staging_dir/target-mipsel_24kc_musl/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="Thu Apr 27 20:28:15 2023" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/Volumes/CaseSens/openwrt-2/staging_dir/host/lib" KBUILD_HOSTLDLIBS="-L/Volumes/CaseSens/openwrt-2/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls= KBUILD_EXTRA_SYMBOLS="/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/gpio-button-hotplug.symvers /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/mac80211.symvers /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/mt76.symvers /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-counter.symvers /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-ledchain.symvers /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-stepper.symvers /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44dbr.symvers" KERNELRELEASE=5.10.176 M="/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" modules
egrep: warning: egrep is obsolescent; using ggrep -E
  CC [M]  /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.o
/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c: In function 'p44ledchain_read':
/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c:1010:3: warning: ISO C90 forbids array 'ans' whose size cannot be evaluated [-Wvla]
 1010 |   char ans[ansBufferSize];
      |   ^~~~
  MODPOST /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers
  CC [M]  /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.mod.o
  LD [M]  /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.ko
for subdir in .; do realdir=$(readlink -f /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain); grep -F /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; [ "/Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" = "$realdir" ] || grep -F $realdir /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; done; sort -u /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp > /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers; mkdir -p /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers; mv /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-ledchain.symvers
touch /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
rm -rf /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
mkdir -p /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
touch /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed
mkdir -p /Volumes/CaseSens/openwrt-2/staging_dir/target-mipsel_24kc_musl/root-ramips/stamp
SHELL= flock /Volumes/CaseSens/openwrt-2/tmp/.root-copy.flock -c 'cp -fpR /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain/. /Volumes/CaseSens/openwrt-2/staging_dir/target-mipsel_24kc_musl/root-ramips/'
touch /Volumes/CaseSens/openwrt-2/staging_dir/target-mipsel_24kc_musl/root-ramips/stamp/.kmod-p44-ledchain_installed
mkdir -p /Volumes/CaseSens/openwrt-2/bin/targets/ramips/mt76x8/packages /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ipkg-mipsel_24kc/kmod-p44-ledchain/CONTROL /Volumes/CaseSens/openwrt-2/staging_dir/target-mipsel_24kc_musl/pkginfo
find /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ipkg-mipsel_24kc/kmod-p44-ledchain -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
export CROSS="mipsel-openwrt-linux-musl-"  NO_RENAME=1 ; NM="mipsel-openwrt-linux-musl-nm" STRIP="/Volumes/CaseSens/openwrt-2/staging_dir/host/bin/sstrip -z" STRIP_KMOD="/Volumes/CaseSens/openwrt-2/scripts/strip-kmod.sh" PATCHELF="/Volumes/CaseSens/openwrt-2/staging_dir/host/bin/patchelf" /Volumes/CaseSens/openwrt-2/scripts/rstrip.sh /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ipkg-mipsel_24kc/kmod-p44-ledchain
rstrip.sh: /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ipkg-mipsel_24kc/kmod-p44-ledchain/lib/modules/5.10.176/p44-ledchain.ko: relocatable
(cd /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ipkg-mipsel_24kc/kmod-p44-ledchain/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;  )
install -d -m0755 /Volumes/CaseSens/openwrt-2/bin/targets/ramips/mt76x8/packages
/Volumes/CaseSens/openwrt-2/staging_dir/host/bin/fakeroot /Volumes/CaseSens/openwrt-2/staging_dir/host/bin/bash /Volumes/CaseSens/openwrt-2/scripts/ipkg-build -m "" /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ipkg-mipsel_24kc/kmod-p44-ledchain /Volumes/CaseSens/openwrt-2/bin/targets/ramips/mt76x8/packages
Packaged contents of /Volumes/CaseSens/openwrt-2/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ipkg-mipsel_24kc/kmod-p44-ledchain into /Volumes/CaseSens/openwrt-2/bin/targets/ramips/mt76x8/packages/kmod-p44-ledchain_5.10.176+7-11_mipsel_24kc.ipk
echo "kmod-p44-ledchain" >> /Volumes/CaseSens/openwrt-2/staging_dir/target-mipsel_24kc_musl/pkginfo/p44-ledchain.default.install
gmake[2]: Leaving directory '/Volumes/CaseSens/openwrt-2/feeds/plan44/p44-ledchain'
time: package/feeds/plan44/p44-ledchain/compile#0.87#0.55#1.58
gmake[1]: Leaving directory '/Volumes/CaseSens/openwrt-2'

The output you quoted above does not contain the actual build, it starts only after, when it tries to collect the *.ko and does not find it. What happens before that?

halidaltuner commented 3 months ago

OpenWrt version is v23.05.0

arch information in the .config file;

CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt76x8=y
CONFIG_TARGET_ramips_mt76x8_DEVICE_hilink_hlk-7628n=y

First I did clean and then I tried like this;

❯ gmake package/p44-ledchain/compile V=s
gmake[2]: Entering directory '/home/halid/OpenWRT_Projects/openwrt/scripts/config'
gmake[2]: 'conf' is up to date.
gmake[2]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/scripts/config'
gmake[1]: Entering directory '/home/halid/OpenWRT_Projects/openwrt'
gmake[2]: Entering directory '/home/halid/OpenWRT_Projects/openwrt/package/p44-ledchain'
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.prepared_c90cac3ff2219978a483dcf666608ccf_6664517399ebbbc92a37c5bb081b5c53_check
mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain
cp -fpR ./src/* /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.prepared_c90cac3ff2219978a483dcf666608ccf_6664517399ebbbc92a37c5bb081b5c53
rm -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.configured_*
rm -f /home/halid/OpenWRT_Projects/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.p44-ledchain_installed
(cd /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./; if [ -x ./configure ]; then find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.guess | xargs -r chmod u+w; find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.guess | xargs -r -n1 cp --remove-destination /home/halid/OpenWRT_Projects/openwrt/scripts/config.guess; find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.sub | xargs -r chmod u+w; find /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/ -name config.sub | xargs -r -n1 cp --remove-destination /home/halid/OpenWRT_Projects/openwrt/scripts/config.sub; AR="mipsel-openwrt-linux-musl-gcc-ar" AS="mipsel-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=mipsel-openwrt-linux-musl-ld NM="mipsel-openwrt-linux-musl-gcc-nm" CC="mipsel-openwrt-linux-musl-gcc" GCC="mipsel-openwrt-linux-musl-gcc" CXX="mipsel-openwrt-linux-musl-g++" RANLIB="mipsel-openwrt-linux-musl-gcc-ranlib" STRIP=mipsel-openwrt-linux-musl-strip OBJCOPY=mipsel-openwrt-linux-musl-objcopy OBJDUMP=mipsel-openwrt-linux-musl-objdump SIZE=mipsel-openwrt-linux-musl-size CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -mips16 -minterlink-mips16 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain=p44-ledchain -mips16 -minterlink-mips16 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -mips16 -minterlink-mips16 " CPPFLAGS="-I/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include " LDFLAGS="-L/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/lib -L/home/halid/OpenWRT_Projects/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/lib -znow -zrelro "   ./configure --target=mipsel-openwrt-linux --host=mipsel-openwrt-linux --build=x86_64-pc-linux-gnu --disable-dependency-tracking --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  ; fi; )
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built_check
gmake -C "/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134" ARCH="mips" CROSS_COMPILE="mipsel-openwrt-linux-musl-" SUBDIRS="/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" modules
gmake[3]: Entering directory '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134'
  SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n32.h
  SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n64.h
  SYSHDR  arch/mips/include/generated/uapi/asm/unistd_o32.h
  SYSTBL  arch/mips/include/generated/asm/syscall_table_n32.h
  SYSTBL  arch/mips/include/generated/asm/syscall_table_n64.h
  SYSTBL  arch/mips/include/generated/asm/syscall_table_o32.h
  SYSNR   arch/mips/include/generated/asm/unistd_nr_n32.h
  SYSNR   arch/mips/include/generated/asm/unistd_nr_n64.h
  SYSNR   arch/mips/include/generated/asm/unistd_nr_o32.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  arch/mips/tools/elf-entry
  HOSTCC  arch/mips/boot/tools/relocs_32.o
  HOSTCC  arch/mips/boot/tools/relocs_64.o
  HOSTCC  arch/mips/boot/tools/relocs_main.o
  HOSTLD  arch/mips/boot/tools/relocs
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
  HOSTCC  scripts/dtc/libfdt/fdt.o
  HOSTCC  scripts/dtc/libfdt/fdt_ro.o
  HOSTCC  scripts/dtc/libfdt/fdt_wip.o
  HOSTCC  scripts/dtc/libfdt/fdt_sw.o
  HOSTCC  scripts/dtc/libfdt/fdt_rw.o
  HOSTCC  scripts/dtc/libfdt/fdt_strerror.o
  HOSTCC  scripts/dtc/libfdt/fdt_empty_tree.o
  HOSTCC  scripts/dtc/libfdt/fdt_addresses.o
  HOSTCC  scripts/dtc/libfdt/fdt_overlay.o
  HOSTCC  scripts/dtc/fdtoverlay.o
  HOSTLD  scripts/dtc/fdtoverlay
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sorttable
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  CC      kernel/bounds.s
  CC      arch/mips/kernel/asm-offsets.s
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CC [M]  fs/nls/nls_base.o
  CC [M]  crypto/seqiv.o
  CC [M]  crypto/acompress.o
  CC [M]  crypto/scompress.o
  LD [M]  crypto/crypto_acompress.o
  CC [M]  crypto/cmac.o
  CC [M]  crypto/hmac.o
  CC [M]  crypto/sha512_generic.o
  CC [M]  crypto/crc32c_generic.o
  CC [M]  crypto/lzo.o
  CC [M]  crypto/lzo-rle.o
  CC [M]  crypto/drbg.o
  CC [M]  crypto/jitterentropy.o
  CC [M]  crypto/jitterentropy-kcapi.o
  LD [M]  crypto/jitterentropy_rng.o
  CC [M]  drivers/net/ppp/ppp_generic.o
  CC [M]  drivers/net/ppp/ppp_async.o
  CC [M]  drivers/net/ppp/pppox.o
  CC [M]  drivers/net/ppp/pppoe.o
  CC [M]  drivers/net/slip/slhc.o
  CC [M]  drivers/net/usb/usbnet.o
  CC [M]  drivers/net/usb/qmi_wwan.o
  CC [M]  drivers/net/mii.o
  CC [M]  drivers/usb/common/common.o
  LD [M]  drivers/usb/common/usb-common.o
  CC [M]  drivers/usb/core/usb.o
  CC [M]  drivers/usb/core/hub.o
  CC [M]  drivers/usb/core/hcd.o
  CC [M]  drivers/usb/core/urb.o
  CC [M]  drivers/usb/core/message.o
  CC [M]  drivers/usb/core/driver.o
  CC [M]  drivers/usb/core/config.o
  CC [M]  drivers/usb/core/file.o
  CC [M]  drivers/usb/core/buffer.o
  CC [M]  drivers/usb/core/sysfs.o
  CC [M]  drivers/usb/core/endpoint.o
  CC [M]  drivers/usb/core/devio.o
  CC [M]  drivers/usb/core/notify.o
  CC [M]  drivers/usb/core/generic.o
  CC [M]  drivers/usb/core/quirks.o
  CC [M]  drivers/usb/core/devices.o
  CC [M]  drivers/usb/core/phy.o
  CC [M]  drivers/usb/core/port.o
  CC [M]  drivers/usb/core/of.o
  LD [M]  drivers/usb/core/usbcore.o
  CC [M]  drivers/usb/core/ledtrig-usbport.o
  CC [M]  drivers/usb/host/ehci-hcd.o
  CC [M]  drivers/usb/host/ehci-platform.o
  CC [M]  drivers/usb/host/ohci-hcd.o
  CC [M]  drivers/usb/host/ohci-platform.o
  CC [M]  drivers/usb/host/fsl-mph-dr-of.o
  CC [M]  drivers/usb/host/ehci-fsl.o
  CC [M]  drivers/usb/class/cdc-acm.o
  CC [M]  drivers/usb/class/cdc-wdm.o
  CC [M]  drivers/usb/serial/usb-serial.o
  CC [M]  drivers/usb/serial/generic.o
  CC [M]  drivers/usb/serial/bus.o
  LD [M]  drivers/usb/serial/usbserial.o
  CC [M]  drivers/usb/serial/option.o
  CC [M]  drivers/usb/serial/usb_wwan.o
  CC [M]  drivers/leds/leds-gpio.o
  CC [M]  net/netfilter/nfnetlink.o
  CC [M]  net/netfilter/nf_conntrack_core.o
  CC [M]  net/netfilter/nf_conntrack_standalone.o
  CC [M]  net/netfilter/nf_conntrack_expect.o
  CC [M]  net/netfilter/nf_conntrack_helper.o
  CC [M]  net/netfilter/nf_conntrack_proto.o
  CC [M]  net/netfilter/nf_conntrack_proto_generic.o
  CC [M]  net/netfilter/nf_conntrack_proto_tcp.o
  CC [M]  net/netfilter/nf_conntrack_proto_udp.o
  CC [M]  net/netfilter/nf_conntrack_proto_icmp.o
  CC [M]  net/netfilter/nf_conntrack_extend.o
  CC [M]  net/netfilter/nf_conntrack_acct.o
  CC [M]  net/netfilter/nf_conntrack_seqadj.o
  CC [M]  net/netfilter/nf_conntrack_proto_icmpv6.o
  LD [M]  net/netfilter/nf_conntrack.o
  CC [M]  net/netfilter/nf_log_syslog.o
  CC [M]  net/netfilter/nf_nat_core.o
  CC [M]  net/netfilter/nf_nat_proto.o
  CC [M]  net/netfilter/nf_nat_helper.o
  CC [M]  net/netfilter/nf_nat_redirect.o
  CC [M]  net/netfilter/nf_nat_masquerade.o
  LD [M]  net/netfilter/nf_nat.o
  CC [M]  net/netfilter/nf_tables_core.o
  CC [M]  net/netfilter/nf_tables_api.o
  CC [M]  net/netfilter/nft_chain_filter.o
  CC [M]  net/netfilter/nf_tables_trace.o
  CC [M]  net/netfilter/nft_immediate.o
  CC [M]  net/netfilter/nft_cmp.o
  CC [M]  net/netfilter/nft_range.o
  CC [M]  net/netfilter/nft_bitwise.o
  CC [M]  net/netfilter/nft_byteorder.o
  CC [M]  net/netfilter/nft_payload.o
  CC [M]  net/netfilter/nft_lookup.o
  CC [M]  net/netfilter/nft_dynset.o
  CC [M]  net/netfilter/nft_meta.o
  CC [M]  net/netfilter/nft_rt.o
  CC [M]  net/netfilter/nft_exthdr.o
  CC [M]  net/netfilter/nft_last.o
  CC [M]  net/netfilter/nft_chain_route.o
  CC [M]  net/netfilter/nf_tables_offload.o
  CC [M]  net/netfilter/nft_set_hash.o
  CC [M]  net/netfilter/nft_set_bitmap.o
  CC [M]  net/netfilter/nft_set_rbtree.o
  CC [M]  net/netfilter/nft_set_pipapo.o
  LD [M]  net/netfilter/nf_tables.o
  CC [M]  net/netfilter/nft_numgen.o
  CC [M]  net/netfilter/nft_ct.o
  CC [M]  net/netfilter/nft_flow_offload.o
  CC [M]  net/netfilter/nft_limit.o
  CC [M]  net/netfilter/nft_nat.o
  CC [M]  net/netfilter/nft_objref.o
  CC [M]  net/netfilter/nft_quota.o
  CC [M]  net/netfilter/nft_reject.o
  CC [M]  net/netfilter/nft_reject_inet.o
  CC [M]  net/netfilter/nft_counter.o
  CC [M]  net/netfilter/nft_log.o
  CC [M]  net/netfilter/nft_masq.o
  CC [M]  net/netfilter/nft_redir.o
  CC [M]  net/netfilter/nft_hash.o
  CC [M]  net/netfilter/nft_fib.o
  CC [M]  net/netfilter/nft_fib_inet.o
  CC [M]  net/netfilter/nft_chain_nat.o
  CC [M]  net/netfilter/nf_flow_table_core.o
  CC [M]  net/netfilter/nf_flow_table_ip.o
  CC [M]  net/netfilter/nf_flow_table_offload.o
  LD [M]  net/netfilter/nf_flow_table.o
  CC [M]  net/netfilter/nf_flow_table_inet.o
  CC [M]  net/ipv4/netfilter/nf_defrag_ipv4.o
  CC [M]  net/ipv4/netfilter/nf_reject_ipv4.o
  CC [M]  net/ipv4/netfilter/nft_reject_ipv4.o
  CC [M]  net/ipv4/netfilter/nft_fib_ipv4.o
  CC [M]  net/ipv4/netfilter/nf_flow_table_ipv4.o
  CC [M]  net/ipv6/netfilter/nf_defrag_ipv6_hooks.o
  CC [M]  net/ipv6/netfilter/nf_conntrack_reasm.o
  LD [M]  net/ipv6/netfilter/nf_defrag_ipv6.o
  CC [M]  net/ipv6/netfilter/nf_reject_ipv6.o
  CC [M]  net/ipv6/netfilter/nft_reject_ipv6.o
  CC [M]  net/ipv6/netfilter/nft_fib_ipv6.o
  CC [M]  net/ipv6/netfilter/nf_flow_table_ipv6.o
  CC [M]  lib/lzo/lzo1x_compress.o
  LD [M]  lib/lzo/lzo_compress.o
  CC [M]  lib/lzo/lzo1x_decompress_safe.o
  LD [M]  lib/lzo/lzo_decompress.o
  CC [M]  lib/crc-ccitt.o
  CC [M]  lib/libcrc32c.o
  LDS     scripts/module.lds
WARNING: Symbol version dump "vmlinux.symvers" is missing.
         Modules may not have dependencies or modversions.
         You may get many unresolved symbol warnings.
  MODPOST modules-only.symvers
WARNING: modpost: "memset" [lib/lzo/lzo_decompress.ko] undefined!
WARNING: modpost: "memset" [lib/lzo/lzo_compress.ko] undefined!
WARNING: modpost: "crypto_destroy_tfm" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "crypto_alloc_shash" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "__stack_chk_fail" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "crypto_shash_update" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "__stack_chk_guard" [lib/libcrc32c.ko] undefined!
WARNING: modpost: "skb_copy_bits" [net/ipv6/netfilter/nft_fib_ipv6.ko] undefined!
WARNING: modpost: "ip6_route_lookup" [net/ipv6/netfilter/nft_fib_ipv6.ko] undefined!
WARNING: modpost: "__stack_chk_fail" [net/ipv6/netfilter/nft_fib_ipv6.ko] undefined!
WARNING: modpost: suppressed 1622 unresolved symbol warnings because there were too many)
  CC [M]  crypto/cmac.mod.o
  LD [M]  crypto/cmac.ko
  CC [M]  crypto/crc32c_generic.mod.o
  LD [M]  crypto/crc32c_generic.ko
  CC [M]  crypto/crypto_acompress.mod.o
  LD [M]  crypto/crypto_acompress.ko
  CC [M]  crypto/drbg.mod.o
  LD [M]  crypto/drbg.ko
  CC [M]  crypto/hmac.mod.o
  LD [M]  crypto/hmac.ko
  CC [M]  crypto/jitterentropy_rng.mod.o
  LD [M]  crypto/jitterentropy_rng.ko
  CC [M]  crypto/lzo-rle.mod.o
  LD [M]  crypto/lzo-rle.ko
  CC [M]  crypto/lzo.mod.o
  LD [M]  crypto/lzo.ko
  CC [M]  crypto/seqiv.mod.o
  LD [M]  crypto/seqiv.ko
  CC [M]  crypto/sha512_generic.mod.o
  LD [M]  crypto/sha512_generic.ko
  CC [M]  drivers/leds/leds-gpio.mod.o
  LD [M]  drivers/leds/leds-gpio.ko
  CC [M]  drivers/net/mii.mod.o
  LD [M]  drivers/net/mii.ko
  CC [M]  drivers/net/ppp/ppp_async.mod.o
  LD [M]  drivers/net/ppp/ppp_async.ko
  CC [M]  drivers/net/ppp/ppp_generic.mod.o
  LD [M]  drivers/net/ppp/ppp_generic.ko
  CC [M]  drivers/net/ppp/pppoe.mod.o
  LD [M]  drivers/net/ppp/pppoe.ko
  CC [M]  drivers/net/ppp/pppox.mod.o
  LD [M]  drivers/net/ppp/pppox.ko
  CC [M]  drivers/net/slip/slhc.mod.o
  LD [M]  drivers/net/slip/slhc.ko
  CC [M]  drivers/net/usb/qmi_wwan.mod.o
  LD [M]  drivers/net/usb/qmi_wwan.ko
  CC [M]  drivers/net/usb/usbnet.mod.o
  LD [M]  drivers/net/usb/usbnet.ko
  CC [M]  drivers/usb/class/cdc-acm.mod.o
  LD [M]  drivers/usb/class/cdc-acm.ko
  CC [M]  drivers/usb/class/cdc-wdm.mod.o
  LD [M]  drivers/usb/class/cdc-wdm.ko
  CC [M]  drivers/usb/common/usb-common.mod.o
  LD [M]  drivers/usb/common/usb-common.ko
  CC [M]  drivers/usb/core/ledtrig-usbport.mod.o
  LD [M]  drivers/usb/core/ledtrig-usbport.ko
  CC [M]  drivers/usb/core/usbcore.mod.o
  LD [M]  drivers/usb/core/usbcore.ko
  CC [M]  drivers/usb/host/ehci-fsl.mod.o
  LD [M]  drivers/usb/host/ehci-fsl.ko
  CC [M]  drivers/usb/host/ehci-hcd.mod.o
  LD [M]  drivers/usb/host/ehci-hcd.ko
  CC [M]  drivers/usb/host/ehci-platform.mod.o
  LD [M]  drivers/usb/host/ehci-platform.ko
  CC [M]  drivers/usb/host/fsl-mph-dr-of.mod.o
  LD [M]  drivers/usb/host/fsl-mph-dr-of.ko
  CC [M]  drivers/usb/host/ohci-hcd.mod.o
  LD [M]  drivers/usb/host/ohci-hcd.ko
  CC [M]  drivers/usb/host/ohci-platform.mod.o
  LD [M]  drivers/usb/host/ohci-platform.ko
  CC [M]  drivers/usb/serial/option.mod.o
  LD [M]  drivers/usb/serial/option.ko
  CC [M]  drivers/usb/serial/usb_wwan.mod.o
  LD [M]  drivers/usb/serial/usb_wwan.ko
  CC [M]  drivers/usb/serial/usbserial.mod.o
  LD [M]  drivers/usb/serial/usbserial.ko
  CC [M]  fs/nls/nls_base.mod.o
  LD [M]  fs/nls/nls_base.ko
  CC [M]  lib/crc-ccitt.mod.o
  LD [M]  lib/crc-ccitt.ko
  CC [M]  lib/libcrc32c.mod.o
  LD [M]  lib/libcrc32c.ko
  CC [M]  lib/lzo/lzo_compress.mod.o
  LD [M]  lib/lzo/lzo_compress.ko
  CC [M]  lib/lzo/lzo_decompress.mod.o
  LD [M]  lib/lzo/lzo_decompress.ko
  CC [M]  net/ipv4/netfilter/nf_defrag_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nf_defrag_ipv4.ko
  CC [M]  net/ipv4/netfilter/nf_flow_table_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nf_flow_table_ipv4.ko
  CC [M]  net/ipv4/netfilter/nf_reject_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nf_reject_ipv4.ko
  CC [M]  net/ipv4/netfilter/nft_fib_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nft_fib_ipv4.ko
  CC [M]  net/ipv4/netfilter/nft_reject_ipv4.mod.o
  LD [M]  net/ipv4/netfilter/nft_reject_ipv4.ko
  CC [M]  net/ipv6/netfilter/nf_defrag_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nf_defrag_ipv6.ko
  CC [M]  net/ipv6/netfilter/nf_flow_table_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nf_flow_table_ipv6.ko
  CC [M]  net/ipv6/netfilter/nf_reject_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nf_reject_ipv6.ko
  CC [M]  net/ipv6/netfilter/nft_fib_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nft_fib_ipv6.ko
  CC [M]  net/ipv6/netfilter/nft_reject_ipv6.mod.o
  LD [M]  net/ipv6/netfilter/nft_reject_ipv6.ko
  CC [M]  net/netfilter/nf_conntrack.mod.o
  LD [M]  net/netfilter/nf_conntrack.ko
  CC [M]  net/netfilter/nf_flow_table.mod.o
  LD [M]  net/netfilter/nf_flow_table.ko
  CC [M]  net/netfilter/nf_flow_table_inet.mod.o
  LD [M]  net/netfilter/nf_flow_table_inet.ko
  CC [M]  net/netfilter/nf_log_syslog.mod.o
  LD [M]  net/netfilter/nf_log_syslog.ko
  CC [M]  net/netfilter/nf_nat.mod.o
  LD [M]  net/netfilter/nf_nat.ko
  CC [M]  net/netfilter/nf_tables.mod.o
  LD [M]  net/netfilter/nf_tables.ko
  CC [M]  net/netfilter/nfnetlink.mod.o
  LD [M]  net/netfilter/nfnetlink.ko
  CC [M]  net/netfilter/nft_chain_nat.mod.o
  LD [M]  net/netfilter/nft_chain_nat.ko
  CC [M]  net/netfilter/nft_counter.mod.o
  LD [M]  net/netfilter/nft_counter.ko
  CC [M]  net/netfilter/nft_ct.mod.o
  LD [M]  net/netfilter/nft_ct.ko
  CC [M]  net/netfilter/nft_fib.mod.o
  LD [M]  net/netfilter/nft_fib.ko
  CC [M]  net/netfilter/nft_fib_inet.mod.o
  LD [M]  net/netfilter/nft_fib_inet.ko
  CC [M]  net/netfilter/nft_flow_offload.mod.o
  LD [M]  net/netfilter/nft_flow_offload.ko
  CC [M]  net/netfilter/nft_hash.mod.o
  LD [M]  net/netfilter/nft_hash.ko
  CC [M]  net/netfilter/nft_limit.mod.o
  LD [M]  net/netfilter/nft_limit.ko
  CC [M]  net/netfilter/nft_log.mod.o
  LD [M]  net/netfilter/nft_log.ko
  CC [M]  net/netfilter/nft_masq.mod.o
  LD [M]  net/netfilter/nft_masq.ko
  CC [M]  net/netfilter/nft_nat.mod.o
  LD [M]  net/netfilter/nft_nat.ko
  CC [M]  net/netfilter/nft_numgen.mod.o
  LD [M]  net/netfilter/nft_numgen.ko
  CC [M]  net/netfilter/nft_objref.mod.o
  LD [M]  net/netfilter/nft_objref.ko
  CC [M]  net/netfilter/nft_quota.mod.o
  LD [M]  net/netfilter/nft_quota.ko
  CC [M]  net/netfilter/nft_redir.mod.o
  LD [M]  net/netfilter/nft_redir.ko
  CC [M]  net/netfilter/nft_reject.mod.o
  LD [M]  net/netfilter/nft_reject.ko
  CC [M]  net/netfilter/nft_reject_inet.mod.o
  LD [M]  net/netfilter/nft_reject_inet.ko
gmake[3]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134'
for subdir in .; do realdir=$(readlink -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain); grep -F /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; [ "/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" = "$realdir" ] || grep -F $realdir /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; done; sort -u /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp > /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers; mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers; mv /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-ledchain.symvers
grep: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./Module.symvers: No such file or directory
touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
rm -rf /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
grep: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134/modules.builtin: No such file or directory
ERROR: module '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.ko' is missing.
gmake[2]: *** [Makefile:61: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed] Error 1
gmake[2]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/package/p44-ledchain'
time: package/p44-ledchain/compile#56.28#10.78#65.67
    ERROR: package/p44-ledchain failed to build.
gmake[1]: *** [package/Makefile:120: package/p44-ledchain/compile] Error 1
gmake[1]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt'
gmake: *** [/home/halid/OpenWRT_Projects/openwrt/include/toplevel.mk:232: package/p44-ledchain/compile] Error 2

But bin/packages and bin/targets/ramips/ folder is empty. Because I got the same error again.

plan44 commented 3 months ago

I am not at all a OpenWrt build system expert, so maybe I just don't see something that would be obvious to some of the real OpenWrt devs. Maybe you can ask someone in the openwrt developer forum or mailing list?

I can only try to spot differences:

halidaltuner commented 3 months ago

I will try it as a feed and report back.

halidaltuner commented 3 months ago

@plan44 Can you share the p44-ledchain.ko file you compiled? I can try it directly on the device.

halidaltuner commented 3 months ago

I will try it as a feed and report back.

I downloaded a brand new openwrt repo and added it as a feed.

The same problem persists.

Which OpenWrt version are you using? @plan44

plan44 commented 3 months ago

I am using 22.03.5. I am preparing to update to 23.05, but that'll take a while.

While it could be something in 23.05, I would be surprised because I could not find anything related to a change in the kernel module build process in the release notes.

@plan44 Can you share the p44-ledchain.ko file you compiled? I can try it directly on the device.

I could share my 22.03 binary but I guess that would not help - kernel modules need to be build with the exact same kernel version and config as the kernel itself.

halidaltuner commented 3 months ago

I am using 22.03.5. I am preparing to update to 23.05, but that'll take a while.

While it could be something in 23.05, I would be surprised because I could not find anything related to a change in the kernel module build process in the release notes.

@plan44 Can you share the p44-ledchain.ko file you compiled? I can try it directly on the device.

I could share my 22.03 binary but I guess that would not help - kernel modules need to be build with the exact same kernel version and config as the kernel itself.

I'm going to downgrade to 22.03.05. I can try it that way.

halidaltuner commented 3 months ago

Nope, i can try 22.03.05 version of OpenWrt.

I did a complete build for OpenWrt. I did a clean installation for build-system. But the result is again as below.

 make[3] -C package/system/opkg compile
    ERROR: package/feeds/plan44/p44-ledchain 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: *** [/home/halid/OpenWRT_Projects/tmp/openwrt/include/toplevel.mk:230: world] Error 1

Verbose output

make[4]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.10.138'
for subdir in .; do realdir=$(readlink -f /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain); grep -F /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; [ "/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" = "$realdir" ] || grep -F $realdir /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; done; sort -u /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp > /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers; mkdir -p /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers; mv /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-ledchain.symvers
grep: /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./Module.symvers: No such file or directory
touch /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
rm -rf /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
mkdir -p /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain
ERROR: module '/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.ko' is missing.
make[3]: *** [Makefile:61: /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed] Error 1
make[3]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt/feeds/plan44/p44-ledchain'
time: package/feeds/plan44/p44-ledchain/compile#37.96#8.19#45.33
    ERROR: package/feeds/plan44/p44-ledchain failed to build.
make[2]: *** [package/Makefile:116: package/feeds/plan44/p44-ledchain/compile] Error 1
make[2]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt'
make[1]: *** [package/Makefile:110: /home/halid/OpenWRT_Projects/tmp/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt'
make: *** [/home/halid/OpenWRT_Projects/tmp/openwrt/include/toplevel.mk:230: world] Error 2
❯ git status
HEAD detached at v22.03.0
plan44 commented 3 months ago

Really strange. I'm not sure I can help, as said I'm not an OpenWrt build system expert, but this is clearly some build system or openwrt config problem as the actual module source is not even involved, it simply does not get compiled for some reason.

I can only tell you my steps when starting from at a fresh openwrt:

# do NOT change feeds.conf.default - custom changes belong into feeds.conf!
cp feeds.conf.default feeds.conf

# add plan44.ch feed
echo "src-git plan44 https://github.com/plan44/plan44-feed.git;main" >>feeds.conf

# update feeds
./scripts/feeds update -a

# install the package
./scripts/feeds install -p plan44 kmod-p44-ledchain

# configure
gmake menuconfig
# Now set target, target device etc. and then enable p44-ledchain
# in "Kernel Modules" -> "Other Modules" -> "kmod-p44-ledchain" (set to "*")

# build
gmake package/p44-ledchain/compile V=s
halidaltuner commented 3 months ago

Thank you for your patience.

I will try again step-by-step, I will use 22.03.05 as version and write the result.

halidaltuner commented 3 months ago

I followed exactly what you said, here is the command list.

git clone https://github.com/openwrt/openwrt.git
cd openwrt
ls
git branch -a
git tag
git checkout v22.03.5
cp feeds.conf.default feeds.conf
echo "src-git plan44 https://github.com/plan44/plan44-feed.git;main" >>feeds.conf
./scripts/feeds update -a
./scripts/feeds install -p plan44 kmod-p44-ledchain
gmake menuconfig
gmake -j $(nproc) kernel_menuconfig
gmake package/p44-ledchain/compile V=s

But at this stage I got another error.

❯ gmake package/p44-ledchain/compile V=s
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
gmake[2]: Entering directory '/home/halid/OpenWRT_Projects/tmp/openwrt/scripts/config'
gmake[2]: 'conf' is up to date.
gmake[2]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt/scripts/config'
gmake[1]: Entering directory '/home/halid/OpenWRT_Projects/tmp/openwrt'
gmake[2]: Entering directory '/home/halid/OpenWRT_Projects/tmp/openwrt/feeds/plan44/p44-ledchain'
rm -f /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built
touch /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built_check
gmake -C "/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.10.176" KCFLAGS="-fmacro-prefix-map=/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl=target-mipsel_24kc_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/home/halid/OpenWRT_Projects/tmp/openwrt/staging_dir/host/include -I/home/halid/OpenWRT_Projects/tmp/openwrt/staging_dir/hostpkg/include -I/home/halid/OpenWRT_Projects/tmp/openwrt/staging_dir/target-mipsel_24kc_musl/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="Thu Apr 27 20:28:15 2023" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/halid/OpenWRT_Projects/tmp/openwrt/staging_dir/host/lib" KBUILD_HOSTLDLIBS="-L/home/halid/OpenWRT_Projects/tmp/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls= KBUILD_EXTRA_SYMBOLS="" KERNELRELEASE=5.10.176 M="/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" modules
gmake[3]: Entering directory '/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.10.176'
  CC [M]  /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.o
In file included from ./include/linux/init.h:5,
                 from /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c:11:
./include/linux/compiler.h:216:10: fatal error: asm/rwonce.h: No such file or directory
  216 | #include <asm/rwonce.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
gmake[4]: *** [scripts/Makefile.build:286: /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.o] Error 1
gmake[3]: *** [Makefile:1826: /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain] Error 2
gmake[3]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.10.176'
gmake[2]: *** [Makefile:61: /home/halid/OpenWRT_Projects/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built] Error 2
gmake[2]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt/feeds/plan44/p44-ledchain'
time: package/feeds/plan44/p44-ledchain/compile#0.42#0.14#0.49
    ERROR: package/feeds/plan44/p44-ledchain failed to build.
gmake[1]: *** [package/Makefile:116: package/feeds/plan44/p44-ledchain/compile] Error 1
gmake[1]: Leaving directory '/home/halid/OpenWRT_Projects/tmp/openwrt'
gmake: *** [/home/halid/OpenWRT_Projects/tmp/openwrt/include/toplevel.mk:230: package/p44-ledchain/compile] Error 2
plan44 commented 3 months ago

Maybe it's just that no packages are installed at all? Those non-existing dependencies at the beginning of your build output look curios to me.

Looking at https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem#build_system_usage, I see that they just install everything:

./scripts/feeds install -a

Maybe worth a try?

halidaltuner commented 3 months ago

I have good news.

I downgraded to 22.03.05. I was able to compile it and add it to my image.

But I have another problem. I am adding it to another issue. (#8 )

Thank you so much @plan44

crispyoz commented 2 months ago

I have the same issue on 23.05.03

nux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain mkdir -p /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain ERROR: module '/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.ko' is missing. make[3]: [Makefile:78: /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed] Error 1 make[3]: Leaving directory '/home/chris/openwrt23/feeds/onion/p44-ledchain' time: package/feeds/onion/p44-ledchain/compile#0.08#0.06#0.14 ERROR: package/feeds/onion/p44-ledchain failed to build. make[2]: [package/Makefile:173: package/feeds/onion/p44-ledchain/compile] Error 1

plan44 commented 2 months ago

Hi @crispyoz, from your build output excerpt I realize that you build p44-ledchain from the onion feed, not the plan44-feed. Thing is (I did not know that before today), the makefiles are different. The onion version has an extra non-kernel package also named p44-ledchain on top of the kernel package and some other changes.

@halidaltuner, do you also have the onion feed installed in parallel to plan44-feed? And vice versa, @crispyoz do you have plan44-feed installed?

I'm asking because I know from experience with another case that having a package of the same name, but not exactly same contents in multiple feeds can cause troubles, and here we might have even 3 instances named p44-ledchain- the two kernel packages from each feed and the non-kernel package ALSO named the same.

So please make absolutely sure you have a clean install:

# uninstall the onion non-kernel package
./scripts/feeds uninstall p44-ledchain
# uninstall the kernel package
./scripts/feeds uninstall kmod-p44-ledchain
# now install ONLY the kernel package from the plan44 feed with the original makefile
./scripts/feeds update plan44
./scripts/feeds install -p plan44 kmod-p44-ledchain

That's how I've built p44-ledchain hundred of times on almost any OpenWrt version since 18.x (except for 23.05 so far).

You'd probably need to ask @greenbreakfast about the changes in the onion version and the rationale behind it.

crispyoz commented 2 months ago

Hi @plan44

Yes you are correct I did have the Onion feed installed as well as the plan-44 on also, however that was not the issue. I removed both feeds and then reinstalled the plan-44 feed. This resolved the error about missing p44-ledchain.ko

But then I have more errors. The problem is that they have -Werror CFLAG set, which causes any warnings to be reported as errors. It seems they use that for CI. You can see the errors using

make -j1 V=sc package/p44-ledchain/compile

I just need to work out where they set this flag in the myriad of make files.

plan44 commented 2 months ago

I just need to work out where they set this flag in the myriad of make files.

I believe the correct way is in the package Makefile (i.e. feeds/plan44/p44-ledchain/Makefile) using TARGET_CXXFLAGS, like:

# Opt out of treating "myerror" specifically as an error, despite "-Werror" present
TARGET_CXXFLAGS += -Wno-error=myerror

Of course, the p44-ledchain source should not produce warnings in the first place. I'll have a look as soon as I can.

Is that -Werror build a new thing in OpenWrt 23.05?

plan44 commented 2 months ago

I just pushed a small change that removes the one warning (of type '-Wvla') I see in my builds. Can you check if that helps in your build setup?

crispyoz commented 2 months ago

Thanks @plan44 but didn't make a difference. I wouldn't worry about this too much, it seems the OpenWrt devs switch this on for their CI so they can enforce code quality, but for the rest of us it's a royal pain in the armpit. The flag makes all warnings into errors so that's why the build fails.

p44-ledchain.c has a number of warnings (now errors), some seem to relate to the fact they are now enforcing C99 standard pedantic.

I'll paste it here below for your reference, but I've asked in the OpenWrt forum where the flags are set, because they are not in the usual rules files. I've got better things to do than track it down when I'll bet they are breaking other 3rd party stuff as well.

/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c: In function 'p44ledchain_init_module': ./include/linux/export.h:29:22: error: passing argument 1 of 'class_create' from incompatible pointer type [-Werror=incompatible-pointer-types] 29 #define THIS_MODULE (&__this_module) ~^~~~~~~
struct module *

/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c:1279:42: note: in expansion of macro 'THIS_MODULE' 1279 | p44ledchain_class = class_create(THIS_MODULE, DEVICE_NAME); | ^~~ In file included from ./include/linux/device.h:31, from ./include/linux/cdev.h:8, from ./include/linux/watchdog.h:14, from /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c:24: ./include/linux/device/class.h:230:54: note: expected 'const char ' but argument is of type 'struct module ' 230 | struct class __must_check class_create(const char name); | ~~^~ /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c:1279:29: error: too many arguments to function 'class_create' 1279 | p44ledchain_class = class_create(THIS_MODULE, DEVICE_NAME); | ^~~~ ./include/linux/device/class.h:230:29: note: declared here 230 | struct class __must_check class_create(const char name); | ^~~~ /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c: In function 'p44ledchain_read': /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.c:1040:5: error: ignoring return value of 'copy_to_user' declared with attribute 'warn_unused_result' [-Werror=unused-result] 1040 | copy_to_user(buf, ansP, bytes); | ^~~~~~~~~~ cc1: all warnings being treated as errors make[6]: [scripts/Makefile.build:243: /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.o] Error 1 make[5]: [/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-6.6.32/Makefile:1913: /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain] Error 2 make[4]: [Makefile:234: __sub-make] Error 2 make[4]: Leaving directory '/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-6.6.32' make[3]: [Makefile:61: /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built] Error 2 make[3]: Leaving directory '/home/chris/openwrt23/feeds/plan44/p44-ledchain' time: package/feeds/plan44/p44-ledchain/compile#0.56#0.27#0.78 ERROR: package/feeds/plan44/p44-ledchain failed to build. make[2]: [package/Makefile:173: package/feeds/plan44/p44-ledchain/compile] Error 1 make[2]: Leaving directory '/home/chris/openwrt23' make[1]: [package/Makefile:167: /home/chris/openwrt23/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/chris/openwrt23' make: *** [/home/chris/openwrt23/include/toplevel.mk:233: world] Error 2

crispyoz commented 2 months ago

I made some code changes to fix the errors/warning. One was the result of the bump in kernel version to 6 in this release the others were pedantic warnings being treated as errors. I'll do a pull request.

plan44 commented 2 months ago

Ok, thanks for the info and build logs, and looking forward to the PR ;-)

Anyway, this is an additional issue to what @halidaltuner originally reported - the latter were make dependency problems probably caused by the different packages named p44-ledchain, and occurred on 22.03 as well as 23.05. The former is caused by -Werror in 23.05, which will probably affect other packages in my feed as well (and I will sort them as soon as I am on 23.05 with my projects)

So I guess we can close this issue?

crispyoz commented 2 months ago

Yeah well part of @halidaltuner issue was the same, his error on line 1010 (1010 char ans[ansBufferSize];) is due to the C99 pedantic cflag. I think he also had an issue with his package installation, like I did with having the Onion feed also installed. With the Onion feed installed it broke more stuff, but now I made the minor changes to the code, the Onion feed also works fine.

The basic error message @halidaltuner had was the same but upon a more detailed examination, the root cause was different.

I submitted the PR.

The issue is closed. Thanks.