[libvirt] Latest git tree doesn't compile

Hello everyone, I just got the latest and grooviest libvirt from the git tree at : git://git.et.redhat.com/libvirt.git but compiling fails: /bin/bash ../mylibtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../qemud -I/usr/include/libxml2 -DLIBDIR=\""/usr/local/lib"\" -DBINDIR=\""/usr/local/libexec"\" -DSBINDIR=\""/usr/local/sbin"\" -DSYSCONF_DIR="\"/usr/local/etc\"" -DLOCALEBASEDIR=\""/usr/local/share/locale"\" -DLOCAL_STATE_DIR=\""/usr/local/var"\" -DGETTEXT_PACKAGE=\"libvirt\" -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -g -O2 -MT lxc_driver.lo -MD -MP -MF .deps/lxc_driver.Tpo -c -o lxc_driver.lo lxc_driver.c (CC) -o lxc_driver.lo lxc_driver.c lxc_container.c: In function 'lxcContainerDropCapabilities': lxc_container.c:657: error: 'PR_CAPBSET_DROP' undeclared (first use in this function) lxc_container.c:657: error: (Each undeclared identifier is reported only once lxc_container.c:657: error: for each function it appears in.) Apparently, my machine doesn't have the PR_CAPBSET_DROP flag defined. It's inexistent in sys/capability.h and "man prctl". I run a Ubuntu 8.04, kernel is 2.6.24-24-openvz. Am I missing headers that are not tested for in the ./configure ? If not, any way that functionality could be disabled on distros that don't support it ? Thanks, Florian

On Wed, May 13, 2009 at 05:50:42PM +0200, Florian Vichot wrote:
Hello everyone,
I just got the latest and grooviest libvirt from the git tree at : git://git.et.redhat.com/libvirt.git but compiling fails:
lxc_container.c: In function 'lxcContainerDropCapabilities': lxc_container.c:657: error: 'PR_CAPBSET_DROP' undeclared (first use in this function) lxc_container.c:657: error: (Each undeclared identifier is reported only once lxc_container.c:657: error: for each function it appears in.)
Apparently, my machine doesn't have the PR_CAPBSET_DROP flag defined. It's inexistent in sys/capability.h and "man prctl".
I have it in /usr/include/linux/prctl.h #define PR_CAPBSET_DROP 24
I run a Ubuntu 8.04, kernel is 2.6.24-24-openvz.
2.6.24 is probably too old I see the patch from Nov 2007 http://lkml.indiana.edu/hypermail/linux/kernel/0711.3/0496.html
Am I missing headers that are not tested for in the ./configure ? If not, any way that functionality could be disabled on distros that don't support it ?
We could possibly make the #ifndef / #endif and let the call fail if someone used the driver instead of breaking at compile time. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

I run a Ubuntu 8.04, kernel is 2.6.24-24-openvz.
2.6.24 is probably too old I see the patch from Nov 2007 http://lkml.indiana.edu/hypermail/linux/kernel/0711.3/0496.html
Am I missing headers that are not tested for in the ./configure ? If not, any way that functionality could be disabled on distros that don't support it ?
We could possibly make the #ifndef / #endif and let the call fail if someone used the driver instead of breaking at compile time.
Bah, after some thought, IMHO, no need to bother. For the time being, I can compile libvirt fine by disabling LXC, which is just as good since I don't use it. I notified the bug because I'm using the latest Ubuntu distro with LTS (Long Term Support), which is the one we usually advise to our clients, and there won't be a new LTS before April 2010. So that would have been a long time to wait to get the LXC functionnality in libvirt on a LTS version. But such is life :) So if I have clients that *really* want LXC, they will have to depart from Ubuntu 8.04, and use one of the more recent, non-LTS distros. Florian
participants (2)
-
Daniel Veillard
-
Florian Vichot