Compile nss failed (so lighthttpd is failed as well)

hello,

i started to compile the latest openwrt branch (21.02.0) using a debian bullseye distro, and with previous stable would always compile. but now it shows these errors:

make[8]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/nss/lib/freebl'
make[8]: Entering directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/nss/lib/nss'
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
../../coreconf/rules.mk:202: *** multiple target patterns.  Stop.
make[8]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/nss/lib/nss'
make[7]: *** [../coreconf/rules.mk:44: nss] Error 2
make[7]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/nss/lib'
make[6]: *** [coreconf/rules.mk:44: lib] Error 2
make[6]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/nss'
make[5]: *** [manifest.mn:26: prepare_build] Error 2
make[5]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/nss'
make[4]: *** [Makefile:51: nss_build_all] Error 2
make[4]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/nss'
make[3]: *** [Makefile:164: /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/nss-3.61/.built] Error 2
time: package/feeds/packages/nss/compile#3.03#0.72#3.32

Anyone has an idea what this error could be?

I think you need to look into that. Are you trying on a regular x86_64 box?

linksys wrt -> https://cdn.corifeus.com/openwrt/21.02.0/targets/mvebu/cortexa9/

about 9000 packages work, but these fail:
ERROR: package/feeds/packages/nss failed to build.
ERROR: package/feeds/packages/lighttpd failed to build.

i try to build instead of debian bullseye host, but debian buster host.

it looks like debian buster host build is worse. so building in debian bullseye host is the best, i still have this compilation problem. anyone know what the problem could be?

I prepare my own post about nss build error, but found yours.

Short comment: try to build with "... make -j1 ..." (-j1 option, only one build task).

Longer... I just write down my situation and my question about this problem. Maybe someone answers...
Maybe some time after I repost my text as separate topic, because problem is not about nss, but about parallel build.

package nss (and few others) cannot be build with make multithread (make -j(n greater than one))

This time, as my previous, I try to build all possible packages, -- because of needs customize build system by modifying ath79 based tplink (increase flash, add swap), to be offline-ready with full set of packages, to be more familiar at least with names of present programs and their (build) options etc... So my target is to build all possible in openwrt release (ath79 and x86 legacy tried). For now is git tag v21.02.2 Previous time of my build session it was v19.07, but problem was the same.

So, whey I try to make world in multithreaded mode (parallel make), some packages like nss (nss just first in order) fails with error like..
... for nss-3.61 (and nspr, taken from openwrt v21.02.2 downloaded files and to try build them in clear, without openwrt patches and environment, and got the same result):
make nss_clean_all


USE_64=1 make nss_build_all --- OK
USE_64=1 make -j2 nss_build_all --- error:
...
make[4]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
../../coreconf/rules.mk:202: *** multiple target patterns.  Stop.
make[4]: Leaving directory '/home/master/compile/nss-3.61/nss/lib/nss'
make[3]: *** [../coreconf/rules.mk:44: nss] Error 2
make[3]: Leaving directory '/home/master/compile/nss-3.61/nss/lib'
make[2]: *** [coreconf/rules.mk:44: lib] Error 2
make[2]: Leaving directory '/home/master/compile/nss-3.61/nss'
make[1]: *** [manifest.mn:26: prepare_build] Error 2
make[1]: Leaving directory '/home/master/compile/nss-3.61/nss'
make: *** [Makefile:52: nss_build_all] Error 2

warnings about jobserver... as far as I can understand, when make dive into subdirs, somewhere should be put plus sign in make file, or .PHONY word. And in nss coreconf/rules.mk have such string in the end:
.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs program realclean release $(DIRS)
so make system looks like taskserver-ready. I have no expirience to understand, is it enough or not.

About error
../../coreconf/rules.mk:202: *** multiple target patterns. Stop.
it's about line 202
$(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE) $(SUB_SHLOBJS) | $$(@D)/d

as I understand from this post
[https://unix.stackexchange.com/questions/234976/why-does-make-stop-with-makefile6-multiple-target-patterns-stop]](https://unix.stackexchange.com/questions/234976/why-does-make-stop-with-makefile6-multiple-target-patterns-stop])
error occured while parsing text. and because of some nuances of GNU make. for now I can't understand more to
decide, if makefiles should be edited, as they not ready to taskterver, or problem is in my buildsystem -- version of make and others.

my make is (debian bullseye)

$ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu

And one more thing. When I building openwrt for version 19, I first run make -j8, when error occured (in nss, and
some few others, I dont remember clearly, did not noted), i make single package with
make -j1 package/nss/{clean,compile}
and continue world build with same
make -j8

This time I see, than make start build again, and again and again stucks on nss. So for now I have no choice
other than make world with -j1.

So question, does somebody build openwrt with multiple make tasks successfully? Which openwrt version? Maybe its just matter of make and other build host programs versions?

sorry for my pessimism.
things are still the same.
for ath79 only package nss cannot be build in parallel mode,
for x86-legacy package yate cannot also.
the sequence simple:
start build with (re-read carefully Build System usage, do things you did not yet, if any)
make -j8 for example
in case of error try
make -j1 V=s package/nss/compile (or without V=s, if you sure, it's really parallel build mode probem, and not other like dependency problem, or you enabled logs and read them)
if ok, continue with
make -j8

in my post I build package with {clean,compile} , this also cleans some more things, so process always restart....