From 9e57490bcf2bc7db1fa296e13b98d98c4bc00aa4 Mon Sep 17 00:00:00 2001 From: Maxim Mikityanskiy Date: Thu, 12 Dec 2024 19:11:57 +0200 Subject: [PATCH] build: Filter out --jobserver-auth from MAKEFLAGS [ upstream commit cdecbcbb97929fc685104f63cfb9bd3c570c7f5d ] [ backporter's notes: manual conflict resolution ] GNU make on the host may use --jobserver-style=fifo (default on my machine). It also implies --jobserver-auth=fifo:/tmp/GMfifo$MAKE_PID, an undocumented flag, used internally by make and passed to the child instances of make. This flag appears in $(MAKEFLAGS). The cilium-build target in Documentation/Makefile passes MAKEFLAGS to another make instance, called in a docker image. The problem is that --jobserver-auth passed to make inside docker points to a file that doesn't exist in the container filesystem namespace, and make fails with an error like this: make: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo361142'. Stop. make: *** [Makefile:48: cilium-build] Error 2 make: Leaving directory '/home/max/.opt/go/src/github.com/cilium/cilium-snat/Documentation' Fix this by filtering out --jobserver-auth=... from MAKEFLAGS when passing it to make inside docker. Signed-off-by: Maxim Mikityanskiy --- Documentation/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 215e8f9cf2408..8c95ef507be08 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -42,7 +42,7 @@ endif # documentation to be generated correctly. cilium-build: ifndef SKIP_BUILD - ../contrib/scripts/builder.sh env MAKEFLAGS="$(MAKEFLAGS)" make build + ../contrib/scripts/builder.sh env MAKEFLAGS="$(filter-out --jobserver-auth=%,$(MAKEFLAGS))" make build else echo "SKIP_BUILD set, assuming all build artifacts are already present." endif