Skip to content

Commit d6f297f

Browse files
committed
external/ffspart: Avoid makefile race condition
In ffspart we assign this make variable: FFSPART_VERSION ?= $(shell ./make_version.sh $(EXE)) However, ./make_version.sh is actually a make target, and whether it exists or not at the time of this assignment is by chance, depending on how the make concurrency works out. In practice, this intermittently causes CI build failure: make -j${MAKE_J} check + make -j4 check ... [ RUN-TEST ] check-ffspart ... make[1]: ./make_version.sh: No such file or directory ... make[1]: *** [Makefile:13: check] Error 1 make[1]: Entering directory '/build/external/ffspart' ... running test/tests/00-usage running test/tests/01-param-sanity Fatal error, cannot execute binary './ffspart'. Did you make? make[1]: Leaving directory '/build/external/ffspart' make: *** [/build/external/Makefile.check:21: check-ffspart] Error 2 make: *** Waiting for unfinished jobs.... The rule for make_version.sh is just a symlink: make_version.sh: $(Q_LN)ln -sf ../../make_version.sh To avoid the race, call make_version.sh from its actual location instead of relying on the link to be created. The same thing was done for gard in commit 8ab0caf ("external/gard: Fix make dist target"). Signed-off-by: Reza Arbab <[email protected]>
1 parent cce3a04 commit d6f297f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

external/ffspart/rules.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sbindir = $(prefix)/sbin
1515

1616
CC = $(CROSS_COMPILE)gcc
1717

18-
FFSPART_VERSION ?= $(shell ./make_version.sh $(EXE))
18+
FFSPART_VERSION ?= $(shell ../../make_version.sh $(EXE))
1919

2020
version.c: make_version.sh .version
2121
@(if [ "a$(FFSPART_VERSION)" = "a" ]; then \

0 commit comments

Comments
 (0)