Nexx WT3020 (mt7620) 24.10.4 build fail

Try to build 24.10.4 as it is in the repo.

Building machine (Debian 12) is up to date according https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

standard build fails with

make download && make -j12

ERROR: package/feeds/telephony/dahdi-linux failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/include/toplevel.mk:233 : world] Erreur 1

build with details fails with

make -j1 V=s

cc1: all warnings being treated as errors
make[8]: *** [scripts/Makefile.build:243: /media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/dahdi-linux-2024.04.12~83d89b64/drivers/dahdi/wctdm24xxp/base.o] Error 1
make[7]: *** [scripts/Makefile.build:480: /media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/dahdi-linux-2024.04.12~83d89b64/drivers/dahdi/wctdm24xxp] Error 2
make[6]: *** [/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-6.6.110/Makefile:1924: /media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/dahdi-linux-2024.04.12~83d89b64/drivers/dahdi] Error 2
make[5]: *** [Makefile:234: __sub-make] Error 2
make[5]: Leaving directory '/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-6.6.110'
make[4]: *** [Makefile:74: modules] Error 2
make[4]: Leaving directory '/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/dahdi-linux-2024.04.12~83d89b64'
make[3]: *** [Makefile:111: /media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/dahdi-linux-2024.04.12~83d89b64/.built] Error 2
make[3]: Leaving directory '/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/feeds/telephony/libs/dahdi-linux'
time: package/feeds/telephony/dahdi-linux/compile#1.74#0.09#1.76
    ERROR: package/feeds/telephony/dahdi-linux failed to build.
make[2]: *** [package/Makefile:176: package/feeds/telephony/dahdi-linux/compile] Error 1
make[2]: Leaving directory '/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt'
make[1]: *** [package/Makefile:170: /media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt'
make: *** [/media/LINDATA/francis-1000/Applications/OpenWRT/openwrt/include/toplevel.mk:233 : world] Erreur 2

As I don’t find any clear indication regarding the root cause of the error, I hope some of you can help

THX

BR

I very much doubt that you need Digium Asterisk Hardware Device Interfaces on an 8/64 mt7620 device…
The buildbots are configured to ignore packages failing to build (because that happens all the time, especially with exotic out-of-tree kernel modules like DAHDI), so yes (presumably) the same will happen on the official buildbots as well, just that no one cares about this package (especially on mt7620).

Disable it from being built, rinse and repeat - and while at it, reconsider your configuration approach. Yes, you can use a default build config, building everything and the kitchen sink, including lots of 'crap' you're never going to use - or you could be a little more selective and only build what what you're actually going to use. The difference is only measured in 80+ GB of scratch space for building and a couple of hours build time, so 10 minutes spent on your build config (starting fresh, selecting only your target, your exact device and luci-ssl, plus the optional stuff you'd usually install) will pay off big time.

The other alternatives would be either fixing the build error (great, but what for?!) or mimicking the buildbots and ignoring failing packages (you can do that, but that would still waste hours of time, gigabytes of storage and kilowatts of electricity, for nothing).

Strange reply, I’ll try to understand

I very much doubt that you need Digium Asterisk Hardware Device Interfaces on an 8/64 mt7620 device…

Yes you are right I don’t need Asterix

The buildbots are configured to ignore packages failing to build (because that happens all the time, especially with exotic out-of-tree kernel modules like DAHDI), so yes (presumably) the same will happen on the official buildbots as well, just that no one cares about this package (especially on mt7620).

Disable it from being built, rinse and repeat - and while at it, reconsider your configuration approach.

Checking my config shows that Asterix is NOT selected, therefore I don’t understand why it is considered and generate a killing error. In addition the failure is not ignored by the buildbot, why?

Yes, you can use a default build config, building everything and the kitchen sink, including lots of 'crap' you're never going to use - or you could be a little more selective and only build what what you're actually going to use. 

From what I understand using the default build config doesn’t build everything it only build a basic configuration with Luci interface (less than one hour with my old Pc). From my knowledge, this is the only way to obtain even a customized build having the same vermagic number as the official distribution in order to be capable of downloading additional packages later on.

If I make a full custom build from scratch as you recommend I will have to rebuild each time I want to add a package.

Any guidance to have the same vermagic number as the official repo and build a light customized config?

THX

We're not talking about asterisk itself, but DAHDI - an out-of-tree (asterisk adjacent) kernel module for the aforementioned hardware - and it kills your build, because it fails to build.

Not quite, it's builds a lot more than necessary via CONFIG_ALL_NONSHARED and CONFIG_ALL_KMODS, the later is what causes you grief, because it instructs the buildsystem to build all kernel modules (including kmod-dahdi, kmod-dahdi-dummy, kmod-dahdi-echocan-oslec and kmod-dahdi-hfcs), most of which you're never going to need (and in regards to DAHDI can't even use on mt7620 at all).

There is a significant difference between

CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7620=y
CONFIG_TARGET_ramips_mt7620_DEVICE_nexx_wt3020-8m=y
CONFIG_PACKAGE_luci-ssl=y

plus the other packages you usually install, and the buildbot config.

Correct, you still save considerable time (and efforts, if packages you don't even care about fail to build) by only building the things you do need, rather than a lot more than necessary, just in case.

That you indeed can't do, without sticking to the buildbot config exactly, as all kernel/ kmod config options go into the vermagic, as those do influence the kernel ABI.

1 Like

OK, it’s more clear now

I build my custom version (16MB modified device) just with the requested packages (faster 24’)

And it was not that much difficult to rebuild due to some forgotten ones, just a few minutes.

I just have one remaining question regarding the builds in the repo. How did they succeed to build with this config?

THX

BR

They (probably, didn't check) don't, DAHDI is (presumably) broken in 24.10 on mt7620, as mentioned the buildbots are merely ignoring the build failure and 'silently' skip (well, try and forget) the broken package.