[CRIU] [PATCH 3/3] make, soccr: let CRIU depend on libsoccr

Dmitry Safonov dsafonov at virtuozzo.com
Fri Sep 23 07:20:34 PDT 2016


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 at openvz.org>
Cc: Pavel Emelyanov <xemul at virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2661dd6923f0..334ec6e273f6 100644
--- a/Makefile
+++ b/Makefile
@@ -203,7 +203,7 @@ $(SOCCR_A): |soccr/built-in.o
 #
 # But note that we're already included
 # the nmk so we can reuse it there.
-criu/%: images/built-in.o compel/compel-host $(VERSION_HEADER) .FORCE
+criu/%: images/built-in.o compel/compel-host $(SOCCR_A) $(VERSION_HEADER) .FORCE
 	$(Q) $(MAKE) $(build)=criu $@
 criu: images/built-in.o compel/compel-host $(SOCCR_A) $(VERSION_HEADER)
 	$(Q) $(MAKE) $(build)=criu all
-- 
2.10.0



More information about the CRIU mailing list