Coova-chilli fails to built for ath79/tiny OpenWrt 23.05.0

Hi there!
I'm trying to build OpenWrt 23.05.0 but the build always fails with the following error:

make -C /home/kanister/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-5.15.134 M=$PWD modules_install;
  INSTALL /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/lib/modules/5.15.134/extra/xt_coova.ko
  DEPMOD  /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/lib/modules/5.15.134
depmod: ERROR: could not open directory /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib/modules/99.98.5.15.134: No such file or directory

Unfortunately, I have no idea what is going on. What I understand is that there is supposed to be a directory but it isn't there. I don't even understand why it is trying to compile coova-chilli, since it does not appear to be selected in the config. Here are some details of my system, if that helps:

# depmod --version
kmod version 31
+ZSTD +XZ +ZLIB +LIBCRYPTO -EXPERIMENTAL
# gcc --version
gcc (SUSE Linux) 13.2.1 20230912 [revision b96e66fd4ef3e36983969fb8cdd1956f551a074b]
# ld --version
GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.40.0.20230412-5

I checked out tag v23.05.0. My .config looks like this (after piping it through ./scripts/diffconfig.sh:

CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_tiny=y
CONFIG_TARGET_ath79_tiny_DEVICE_tplink_tl-wr841-v9-16m=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IB=y
CONFIG_IMAGEOPT=y
CONFIG_KERNEL_BUILD_DOMAIN="buildhost"
CONFIG_KERNEL_BUILD_USER="builder"
CONFIG_KERNEL_DEBUG_INFO=y
CONFIG_KERNEL_DEBUG_INFO_REDUCED=y
CONFIG_KERNEL_DEBUG_KERNEL=y
# CONFIG_PKG_ASLR_PIE_NONE is not set
CONFIG_PKG_ASLR_PIE_REGULAR=y
CONFIG_REPRODUCIBLE_DEBUG_INFO=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_BUG_URL=""
CONFIG_VERSION_CODE=""
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_FILENAMES=y
CONFIG_VERSION_HOME_URL=""
CONFIG_VERSION_HWREV=""
CONFIG_VERSION_MANUFACTURER=""
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_PRODUCT=""
CONFIG_VERSION_REPO="https://downloads.openwrt.org/releases/23.05.0"
CONFIG_VERSION_SUPPORT_URL=""
# CONFIG_IB_STANDALONE is not set

Here is a more complete output of make -j1 V=s:

make[3]: Entering directory '/home/kanister/openwrt/feeds/packages/net/coova-chilli'
rm -f /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/.built
touch /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/.built_check
CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -ffile-prefix-map=/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6=coova-chilli-1.6 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Wno-error  -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/usr/include -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include/fortify -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -ffile-prefix-map=/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6=coova-chilli-1.6 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Wno-error -mips16 -minterlink-mips16  -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/usr/include -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include/fortify -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include " LDFLAGS="-L/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/usr/lib -L/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib -znow -zrelro " make -j1 -C /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/. AR="mips-openwrt-linux-musl-gcc-ar" AS="mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -ffile-prefix-map=/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6=coova-chilli-1.6 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Wno-error" LD=mips-openwrt-linux-musl-ld NM="mips-openwrt-linux-musl-gcc-nm" CC="mips-openwrt-linux-musl-gcc" GCC="mips-openwrt-linux-musl-gcc" CXX="mips-openwrt-linux-musl-g++" RANLIB="mips-openwrt-linux-musl-gcc-ranlib" STRIP=mips-openwrt-linux-musl-strip OBJCOPY=mips-openwrt-linux-musl-objcopy OBJDUMP=mips-openwrt-linux-musl-objdump SIZE=mips-openwrt-linux-musl-size CROSS="mips-openwrt-linux-musl-" ARCH="mips" ARCH="mips" KERNEL_DIR="/home/kanister/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-5.15.134" ;
make[4]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
make  all-recursive
make[5]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
Making all in bstring
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/bstring'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/bstring'
Making all in src
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src'
Making all in linux
make[7]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src/linux'
make -C /home/kanister/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-5.15.134 M=$PWD;
  MODPOST /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src/linux/Module.symvers
make[7]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src/linux'
make[7]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src'
make[7]: Nothing to be done for 'all-am'.
make[7]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src'
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src'
Making all in doc
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/doc'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/doc'
Making all in www
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/www'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/www'
Making all in conf
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/conf'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/conf'
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
make[5]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
make[4]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -ffile-prefix-map=/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6=coova-chilli-1.6 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Wno-error  -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/usr/include -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include/fortify -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -ffile-prefix-map=/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6=coova-chilli-1.6 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Wno-error -mips16 -minterlink-mips16  -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/usr/include -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include/fortify -I/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/include " LDFLAGS="-L/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/usr/lib -L/home/kanister/openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib -znow -zrelro " make -C /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/. AR="mips-openwrt-linux-musl-gcc-ar" AS="mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -ffile-prefix-map=/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6=coova-chilli-1.6 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Wno-error" LD=mips-openwrt-linux-musl-ld NM="mips-openwrt-linux-musl-gcc-nm" CC="mips-openwrt-linux-musl-gcc" GCC="mips-openwrt-linux-musl-gcc" CXX="mips-openwrt-linux-musl-g++" RANLIB="mips-openwrt-linux-musl-gcc-ranlib" STRIP=mips-openwrt-linux-musl-strip OBJCOPY=mips-openwrt-linux-musl-objcopy OBJDUMP=mips-openwrt-linux-musl-objdump SIZE=mips-openwrt-linux-musl-size CROSS="mips-openwrt-linux-musl-" ARCH="mips" ARCH="mips" KERNEL_DIR="/home/kanister/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-5.15.134" DESTDIR="/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install" ARCH="mips" KERNEL_DIR="/home/kanister/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-5.15.134" INSTALL_MOD_PATH="/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install"  install;
make[4]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
Making install in bstring
make[5]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/bstring'
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/bstring'
 /usr/bin/mkdir -p '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib'
 /bin/sh ../libtool   --mode=install /home/kanister/openwrt/staging_dir/host/bin/install -c   libbstring.la '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib'
OpenWrt-libtool: install: /home/kanister/openwrt/staging_dir/host/bin/install -c .libs/libbstring.so.0.0.0 /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib/libbstring.so.0.0.0
OpenWrt-libtool: install: (cd /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib && { ln -s -f libbstring.so.0.0.0 libbstring.so.0 || { rm -f libbstring.so.0 && ln -s libbstring.so.0.0.0 libbstring.so.0; }; })
OpenWrt-libtool: install: (cd /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib && { ln -s -f libbstring.so.0.0.0 libbstring.so || { rm -f libbstring.so && ln -s libbstring.so.0.0.0 libbstring.so; }; })
OpenWrt-libtool: install: /home/kanister/openwrt/staging_dir/host/bin/install -c .libs/libbstring.lai /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib/libbstring.la
OpenWrt-libtool: install: /home/kanister/openwrt/staging_dir/host/bin/install -c .libs/libbstring.a /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib/libbstring.a
OpenWrt-libtool: install: chmod 644 /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib/libbstring.a
OpenWrt-libtool: install: mips-openwrt-linux-musl-gcc-ranlib /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib/libbstring.a
libtool: warning: remember to run 'libtool --finish /usr/lib'
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/bstring'
make[5]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/bstring'
Making install in src
make[5]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src'
Making install in linux
make[6]: Entering directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src/linux'
make -C /home/kanister/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-5.15.134 M=$PWD modules_install;
  INSTALL /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/lib/modules/5.15.134/extra/xt_coova.ko
  DEPMOD  /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/lib/modules/5.15.134
depmod: ERROR: could not open directory /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/ipkg-install/usr/lib/modules/99.98.5.15.134: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
make[7]: *** [Makefile:1839: modules_install] Error 1
make[6]: *** [Makefile:13: modules_install] Error 2
make[6]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src/linux'
make[5]: *** [Makefile:1013: install-recursive] Error 1
make[5]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/src'
make[4]: *** [Makefile:413: install-recursive] Error 1
make[4]: Leaving directory '/home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6'
make[3]: *** [Makefile:152: /home/kanister/openwrt/build_dir/target-mips_24kc_musl/coova-chilli-1.6/.built] Error 2
make[3]: Leaving directory '/home/kanister/openwrt/feeds/packages/net/coova-chilli'
time: package/feeds/packages/coova-chilli/compile#2.79#1.33#3.93
    ERROR: package/feeds/packages/coova-chilli failed to build.
make[2]: *** [package/Makefile:120: package/feeds/packages/coova-chilli/compile] Error 1
make[2]: Leaving directory '/home/kanister/openwrt'
make[1]: *** [package/Makefile:114: /home/kanister/openwrt/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/kanister/openwrt'
make: *** [/home/kanister/openwrt/include/toplevel.mk:232: world] Error 2

Should I open a ticket on OpenWrts gitub?

No.
4/32 are below minimum system requirements - and apart from being basically dead, coova-chili is large, news at 11.

--
If you can provide a patch/ PR, chances are that it will be applied, but chances that an IR will get much (any) attention are minimal at best.

Why is it trying to compile coova-chilli? Here ist the config that I'm using now:

CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_tiny=y
CONFIG_TARGET_ath79_tiny_DEVICE_tplink_tl-wr841-v9-16m=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IMAGEOPT=y
CONFIG_KERNEL_BUILD_DOMAIN="buildhost"
CONFIG_KERNEL_BUILD_USER="builder"
CONFIG_KERNEL_DEBUG_INFO=y
CONFIG_KERNEL_DEBUG_INFO_REDUCED=y
CONFIG_KERNEL_DEBUG_KERNEL=y

Inside the expanded .config-file, I find:

# CONFIG_PACKAGE_coova-chilli is not set

Still, it tries to compile it and fails. How can I tell the build system to not compile coova-chilli? I don't need it.

I need to use the build system to create an image for the wr841 where I replaced the 4MiB flash with a 16MiB flash. I've got about 15 of these devices.

Is it selected in the make menuconfig options? Check that.

It is showing in menuconfig as not selected.

Are there any packages that have dependencies on it (such as a luci-app or similar)? Otherwise, I don't know why it would be trying to compile a package that is not selected.

In this case, I would expect it to have -*- next to it. But it has < >. What is strange though is that it has ---- on the right side and when I hit return on it it shows an empty submenu.

I guess, this is the problem:
CONFIG_ALL_KMODS=y
There is an optional, seldom used kernel mod for coova. Which might cause a dependency here, because being (unnecessarily ?) included.

Unfortunately, I need to set this option, because otherwise I will not get the same kernel vermagic as the official one and thus will not be able to opkg-install any packages that have dependencies on the kernel.
I have reset the whole build system with make distclean and tried building ath79/tiny with the official config.buildinfo. I got the same error again.

You can manually override the vermagic at build time. Might save you some time, even «fix» your problem.
Just search the forum.

A wild guess: Search for COOVA and coova in the build environment. And manually remove the coova stuff. The optional kernel module for coova-chilli is called xt_coova. In case you find the Make file for it, you might edit it and delete the dependecy to coova-chilli. Overall, it looks like a bug to me, that xt_coova has a dependency to coova-chilli. Functionally, no reason to include xt_coova into kernel, in case package coova-chilli not used. Vice versa, you can even use coova-chilli as a package without xt_coova, which needs some serious black magic to be used correctly, anyway. You might file a bug; however, I very doubt you can expect a fix within reasonable time.

I found that the commit coova-chilli: fix kernel >= 5.17 compile is after the the tag v23.05.0 that I was building. I should have checked this earlier. I manually applied this commit aaaand... same error.
I then manually created the folder whose non-existance depmod was complaining about.
Then it compiled.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.