Skip to content

Commit

Permalink
build: Filter out --jobserver-auth from MAKEFLAGS
Browse files Browse the repository at this point in the history
[ upstream commit cdecbcb ]
[ 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 <[email protected]>
  • Loading branch information
gentoo-root authored and sayboras committed Jan 14, 2025
1 parent 05100d3 commit 9e57490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e57490

Please sign in to comment.