[CRIU] [PATCH 2/2] build: Add verbose message on packages needed for CRIU building

Cyrill Gorcunov gorcunov at openvz.org
Thu Mar 10 11:19:52 PST 2016


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/Makefile | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/criu/Makefile b/criu/Makefile
index 9f1dd382dee9..508f72fdec91 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -56,7 +56,27 @@ ccflags-y		+= -I/usr/include/libnl3
 export ccflags-y
 
 LIBS			:= -lrt -lpthread -lprotobuf-c -ldl -lnl-3
-REQ-LIBS-NAMES          := libpthread libprotobuf-c libnl-3
+
+REQ-RPM-PKG-NAMES	+= protobuf
+REQ-RPM-PKG-NAMES	+= protobuf-c
+REQ-RPM-PKG-NAMES	+= protobuf-c-devel
+REQ-RPM-PKG-NAMES	+= protobuf-compiler
+REQ-RPM-PKG-NAMES	+= protobuf-devel
+REQ-RPM-PKG-NAMES	+= protobuf-python
+REQ-RPM-PKG-NAMES	+= libnl3-devel
+
+REQ-DEB-PKG-NAMES	+= libprotobuf-dev
+REQ-DEB-PKG-NAMES	+= libprotobuf-c0-dev
+REQ-DEB-PKG-NAMES	+= protobuf-c-compiler
+REQ-DEB-PKG-NAMES	+= protobuf-compiler
+REQ-DEB-PKG-NAMES	+= python-protobuf
+REQ-DEB-PKG-NAMES	+= libnl-3-dev
+
+REQ-RPM-PKG-TEST-NAMES  += libaio-devel
+REQ-RPM-PKG-TEST-NAMES  += libcap-devel
+
+REQ-DEB-PKG-TEST-NAMES  += libaio-dev
+REQ-DEV-PKG-TEST-NAMES  += libcap-dev
 
 #
 # Make sure all required libs are installed
@@ -66,7 +86,14 @@ ifneq ($(MAKECMDGOALS),clean)
                         echo "int main(int argc, char *argv[]) { return 0; }" |         \
                         "$(CC)" -x c - $(LIBS) -o "$$TMP" > /dev/null 2>&1 && echo y;   \
                         rm -f "$$TMP"'),y)
-                $(error "Make sure '$(REQ-LIBS-NAMES)' libraries are installed")
+                $(warning "Couldn't find some of the required libraries")
+                $(warning "Make sure the following packages are installed")
+                $(warning "RPM based distros: $(REQ-RPM-PKG-NAMES)")
+                $(warning "DEB based distros: $(REQ-DEB-PKG-NAMES)")
+                $(warning "To run tests the following packages are needed")
+                $(warning "RPM based distros: $(REQ-RPM-PKG-TEST-NAMES)")
+                $(warning "DEB based distros: $(REQ-DEB-PKG-TEST-NAMES)")
+                $(error "Compilation aborted")
         endif
 endif
 ifeq ($(GMON),1)
-- 
2.5.0



More information about the CRIU mailing list