There is no explicit rule in the top-level Makefile to build libipvs.a. It is built by the phony target `libs`. However, there is no guarantee of the order in which the prerequisites of the `all` target are built, so make may attempt to link ipvsadm to libipvs.a before it has finished building libipvs.a. Add a rule to express the dependency of `$(STATIC_LIBS)` on `libs`. Signed-off-by: Jeremy Sowden <azazel@xxxxxxxxxx> --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index d79f72496000..2dda19072365 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,8 @@ libs: ipvsadm: $(OBJS) $(STATIC_LIBS) $(CC) $(DEFAULT_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) +$(STATIC_LIBS): libs + install: all if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi $(INSTALL) -m 0755 ipvsadm $(SBIN) -- 2.45.2