On 08/06/2013 02:41 PM, Eric Blake wrote: > A fresh checkout on a RHEL 6 machine with these packages: > kernel-headers-2.6.32-405.el6.x86_64 > glibc-2.12-1.128.el6.x86_64 > failed to configure with this message: > checking for linux/if_bridge.h... no > configure: error: You must install kernel-headers in order to compile libvirt > with QEMU or LXC support >
> +++ b/configure.ac
> @@ -999,7 +999,14 @@ if test "$with_linux" = "yes"; then
> if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then
> AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h
> linux/if_tun.h],,
> [AC_MSG_ERROR([You must install kernel-headers in order to compile
> libvirt with QEMU or LXC support])],
> - [[#include <netinet/in.h>
> + [[/* The kernel folks broke their headers when used with particular
> + * glibc versions; although the structs are ABI compatible, the
> + * C type system doesn't like struct redefinitions. We work around
> + * the problem here in the same manner as in virnetdevbridge.c. */
Except that v1 didn't EXACTLY match virnetdevbridge.c.
> + #include <netinet/in.h>
> + #define in6_addr in6_addr_
> + #define sockaddr_in6 sockaddr_in6_
> + #define ipv6_mreq ipv6_mreq_
> ]])
This is the missing piece:
diff --git i/configure.ac w/configure.ac
index 4f2a7e9..4d6698d 100644
--- i/configure.ac
+++ w/configure.ac
@@ -1005,6 +1005,7 @@ if test "$with_linux" = "yes"; then
#define in6_addr in6_addr_
#define sockaddr_in6 sockaddr_in6_
#define ipv6_mreq ipv6_mreq_
+ #include <linux/in6.h>
]])
fi
fi
I've now tested fresh checkouts on RHEL5, RHEL6, Fedora 19, and FreeBSD;
since all of them are able to pass configure, I'm going to repost the
patch as a v2; but since the build failed last time around when invoking
the build-breaker rule, this time around I'll wait for a review.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
