From 0e779e44d639fce411c71dc3f27cfe002659216b Mon Sep 17 00:00:00 2001 From: slimwang Date: Thu, 11 Jun 2026 10:43:59 +0800 Subject: [PATCH] Fix nproc not found on non-Linux hosts in beacon build The beacon src_beacon Makefile called `nproc` unconditionally to set parallel jobs, which fails on macOS (and other systems without GNU coreutils) with `nproc: No such file or directory`. The build still succeeded but printed a spurious error. Fall back to `sysctl -n hw.ncpu` on macOS, then to 4, so the job count is resolved cleanly on all platforms. --- AdaptixServer/extenders/beacon_agent/src_beacon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AdaptixServer/extenders/beacon_agent/src_beacon/Makefile b/AdaptixServer/extenders/beacon_agent/src_beacon/Makefile index e3bc7efed..3c6e65db2 100644 --- a/AdaptixServer/extenders/beacon_agent/src_beacon/Makefile +++ b/AdaptixServer/extenders/beacon_agent/src_beacon/Makefile @@ -47,7 +47,7 @@ MINIZ_TRIM_FLAGS := -DMINIZ_NO_STDIO -DMINIZ_NO_ARCHIVE_APIS -DMINIZ_NO_ARCHIVE_ .PHONY: all clean pre x64 x86 -NPROC := $(shell nproc) +NPROC := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4) ifeq ($(MAKELEVEL), 0) MAKEFLAGS += -j$(NPROC) --no-print-directory endif