Commit e2fb30d0 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

make, soccr: let CRIU depend on libsoccr

As -lsoccr now is in $(LIBS) in Makefile.packages, it should be
build before criu objects. Otherwise, we try to compile
feature-tests with $(LIBS) and the succesful features fails with:
  <stdin>:1:25: warning: extra tokens at end of #include directive
  /usr/bin/ld: cannot find -lsoccr
  collect2: error: ld returned 1 exit status
Which lead to later problems:
  criu/sk-tcp.c:50:8: error: redefinition of 'struct tcp_repair_opt'
   struct tcp_repair_opt {
          ^
  In file included from criu/sk-tcp.c:1:0:
  /usr/include/netinet/tcp.h:259:8: note: originally defined here
   struct tcp_repair_opt
Because of fails in really-sucessful feture-tests.

P.S.
Maybe we should unbound feature-tests compilation from $(LIBS),
specified in Makefile.packages - that looks right after all.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent e44320ec
...@@ -188,8 +188,7 @@ endif ...@@ -188,8 +188,7 @@ endif
# #
# Configure variables. # Configure variables.
CONFIG_HEADER_REL := criu/include/config.h export CONFIG_HEADER := criu/include/config.h
export CONFIG_HEADER := $(SRC_DIR)/$(CONFIG_HEADER_REL)
ifeq ($(filter clean mrproper,$(MAKECMDGOALS)),) ifeq ($(filter clean mrproper,$(MAKECMDGOALS)),)
include $(SRC_DIR)/Makefile.config include $(SRC_DIR)/Makefile.config
endif endif
...@@ -211,7 +210,7 @@ include Makefile.compel ...@@ -211,7 +210,7 @@ include Makefile.compel
SOCCR_A := soccr/libsoccr.a SOCCR_A := soccr/libsoccr.a
SOCCR_CONFIG := $(SRC_DIR)/soccr/config.h SOCCR_CONFIG := $(SRC_DIR)/soccr/config.h
$(SOCCR_CONFIG): $(CONFIG_HEADER) $(SOCCR_CONFIG): $(CONFIG_HEADER)
$(Q) test -f $@ || ln -s ../$(CONFIG_HEADER_REL) $@ $(Q) test -f $@ || ln -s ../$(CONFIG_HEADER) $@
soccr/%: $(SOCCR_CONFIG) .FORCE soccr/%: $(SOCCR_CONFIG) .FORCE
$(Q) $(MAKE) $(build)=soccr $@ $(Q) $(MAKE) $(build)=soccr $@
soccr/built-in.o: $(SOCCR_CONFIG) .FORCE soccr/built-in.o: $(SOCCR_CONFIG) .FORCE
...@@ -226,9 +225,9 @@ $(SOCCR_A): |soccr/built-in.o ...@@ -226,9 +225,9 @@ $(SOCCR_A): |soccr/built-in.o
# #
# But note that we're already included # But note that we're already included
# the nmk so we can reuse it there. # the nmk so we can reuse it there.
criu/%: images/built-in.o compel/compel-host $(VERSION_HEADER) $(CONFIG_HEADER) .FORCE criu/%: images/built-in.o compel/compel-host $(VERSION_HEADER) .FORCE
$(Q) $(MAKE) $(build)=criu $@ $(Q) $(MAKE) $(build)=criu $@
criu: images/built-in.o compel/compel-host $(SOCCR_A) $(VERSION_HEADER) $(CONFIG_HEADER) criu: images/built-in.o compel/compel-host $(SOCCR_A) $(VERSION_HEADER)
$(Q) $(MAKE) $(build)=criu all $(Q) $(MAKE) $(build)=criu all
.PHONY: criu .PHONY: criu
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment