Need help fixing my toolchain (qca-ssdk compile fails)

I've setup a new system and installed an Arch Linux on it. I've installed all requirements according to OpenWrt Wiki to prepare the system for compiling OpenWrt.

I'm able to compile tools and toolchain without any error. I want to compile for device NBG7815/IPQ8074. The process is stopping at qca-ssdk (a kmod is required from it to build for this device).

Normally I'm able to find a fix or workaround for such cases. But not this time because the error is so "I tell you nothing". On top of that it is compiling on my old system (running Arch Linux also; the installation is up to date also). The main "difference" is the "new" system is AMD based the other is Intel based.

I cannot track this:

If I look into the log I see that all patches are applied correctly before compilation begins. Short after it is stopping with (make -j1 V=sc package/kernel/qca-ssdk/{clean,compile} > my.log 2>&1):

make[4]: *** No rule to make target '/home/user/openwrt-src-builds/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-ssdk-2022-09-12-628b22bc/build/linux/KSLIB/adpt.d', needed by 'adpt.o'.  Stop.
make[4]: Leaving directory '/home/user/openwrt-src-builds/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-ssdk-2022-09-12-628b22bc/src/adpt'
make[3]: *** [Makefile:27: kslib_o] Error 1
make[3]: Leaving directory '/home/user/openwrt-src-builds/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-ssdk-2022-09-12-628b22bc'
make[2]: *** [Makefile:85: /home/user/openwrt-src-builds/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-ssdk-2022-09-12-628b22bc/.built] Error 2
make[2]: Leaving directory '/home/user/openwrt-src-builds/openwrt/package/kernel/qca-ssdk'
time: package/kernel/qca-ssdk/compile#2.64#1.33#3.93
    ERROR: package/kernel/qca-ssdk failed to build.
make[1]: *** [package/Makefile:116: package/kernel/qca-ssdk/compile] Error 1
make[1]: Leaving directory '/home/user/openwrt-src-builds/openwrt'
make: *** [/home/user/openwrt-src-builds/openwrt/include/toplevel.mk:231: package/kernel/qca-ssdk/compile] Error 2

My idea in first place was trying to catch the tools are used during compilation process (like: sed, ar, awk, python-xyz, perl-xyz, etc.). I did that with ps (0.1 sec interval) piping it to a logfile. But this is to much to go through and compare with tools installed. I tried to compare with my old installation also but there is so much stuff on it and I gave up this path too. While I have no clue if this is the "real" cause for my issue.

The full log is here: https://0bin.net/paste/-hUFN+w7#PnkgrFHC6Wh0VftzCjUjjjnwi-Ygsm5vX2LKeAFYPcE ... In case anyone is willing to help out.

If just have a guess or sth. let me know I will try anything. :slight_smile:

I have the exact same problem :frowning: did you find any solution?

(Running EndeavourOS, e.g. Arch)

Just compile the qca-ssdk package without clean again and again, and it will success in the end.

I think it is a problem related to parallel compiling and race condition.

I just set up my build environment in a docker container as a solution...

1 Like

Found the root cause.

It is related to latest GNU make. Downgrade make to 4.3 solved the problem. Maybe it is a breaking change or bug in make?

(Running Manjaro)

1 Like

Are you talking host or buildroot make? I've been seeing plenty of multithreaded build failures too lately, but on Debian Testing.

Cool. AFAIR I've downgraded a lot of tools including make on the Arch host in the past. Maybe I've missed the right one.

Could you specify to which make you've downgraded? I've counted 6 minor versions for 4.3.

I'll try to find time tomorrow to build on Arch again and will give feedback.

I was not aware that there is a buildroot make available/used at all. Because it's not within tools or toolchain. I thought cmake is used here.

For me it's a host system issue. We cannot compile just a specific package (qca-ssdk; tools/toolchain is compiled without any issue also) on Arch Linux host systems (and its derivates). Even with j=1 (for me; so multithread is not the issue here). While it is working on other systems (like Ubuntu 22.04 for me). And it was working (for me until ~ early January on Arch also).

I'm using an Ubuntu VM currently. Tried docker as well. But I found it a bit more work to maintain everything. But it depends on your workflow.

1 Like

I've just tested it. I've downgraded to the first version of 4.3 (make-4.3-1-x86_64).

Arch Linux latest of today 04-18-2023.

Qca-ssdk is compiling without any issue. Thx @xsm1997 for this find! :slight_smile:

So one question is left. Do we have to file a bug and if where we have to file? Sooner or later 4.4 will hit other distributions as well. ^^

Well, it hit me as well on Fedora 38 now.

Its probably time to fix this as I sporadically had it even on make 4.3 but it was rare enough not to care.

1 Like

Arch Linux users are not alone anymore. :smiley:

I have to say that I was pretty lost as nobody else had issues four month ago.

Do you take care about it (I saw that you've wrote the most patches for this package) or do I have to open an issue on OpenWrt/Github?

Open an issue to track it, I still need to try and look into it as I am far from any kind of make expert.
Maybe somebody else can chime in as well.

Done.

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