[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] check device-mapper when building without storage mpath

于 2011年02月18日 16:46, Jiri Denemark 写道:
On Fri, Feb 18, 2011 at 16:21:20 +0800, Osier Yang wrote:
于 2011年02月18日 11:00, Wen Congyang 写道:
+if test "$DEVMAPPER_FOUND" = "no"; then
+  # devmapper is missing pkg-config files in ubuntu, suse, etc
+  save_LIBS="$LIBS"
+  save_CFLAGS="$CFLAGS"
+  AC_CHECK_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no])
+  AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no])
+  DEVMAPPER_LIBS="-ldevmapper"
+  LIBS="$save_LIBS"
+  CFLAGS="$save_CFLAGS"
+if test "$DEVMAPPER_FOUND" = "no" ; then
+  AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper>= $DEVMAPPER_REQUIRED to compile libvirt])

Thanks for the fix, actually It can be reproduced simply by:
% ./autogen.sh --with-storage-mpath=no
% make

As src/util/util.c invokes "dm_is_dm_major".

Yes it does, but I'm not convinced this is the right approach to fix it. Why
should libvirt always require device-mapper libraries? It only needs it for
disk and mpath storage drivers so if neither of them is built, we shouldn't
check for the library and we shouldn't call dm_is_dm_major.

Yes, it's better.

NACK to the current patch.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]