Bug 994265

Summary: <linux/if_bridge.h> is broken
Product: Red Hat Enterprise Linux 6 Reporter: Eric Blake <eblake>
Component: kernelAssignee: Thomas Graf <tgraf>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: eblake, rkhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-07 10:36:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 895141, 1002735    
Bug Blocks:    

Description Eric Blake 2013-08-06 22:44:32 UTC
Description of problem:
Attempts to build libvirt 1.1.1 out of the box on RHEL 6.5 nightlies fail, because of a bug in the <linux/if_bridge.h> header.

Version-Release number of selected component (if applicable):
glibc-2.12-1.128.el6.x86_64
kernel-headers-2.6.32-407.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. cat foo.c
2. gcc -o foo -Wall foo.c
3. wget ftp://libvirt.org/libvirt/libvirt-1.1.1.tar.gz; tar xvf libvirt-1.1.1.tar.gz; cd libvirt-1.1.1
4. ./configure

Actual results:
1.
#include <netinet/in.h>
#include <linux/if_bridge.h>
int main(void) { return 0; }
2.
In file included from /usr/include/linux/if_bridge.h:17,
                 from foo.c:2:
/usr/include/linux/in6.h:31: error: redefinition of ‘struct in6_addr’
/usr/include/linux/in6.h:48: error: redefinition of ‘struct sockaddr_in6’
/usr/include/linux/in6.h:56: error: redefinition of ‘struct ipv6_mreq’
3. ...
4. checking for linux/sockios.h... yes
checking for linux/if_bridge.h... no
configure: error: You must install kernel-headers in order to compile libvirt with QEMU or LXC support


Expected results:
The same program compiles just fine on Fedora 19 (glibc-2.17-11.fc19.x86_64, kernel-headers-3.10.4-300.fc19.x86_64).  libvirt 1.1.1 should compile just fine for RHEL 6.5.


Additional info:
Libvirt.git installed a workaround patch, but we shouldn't have to play games to avoid problems with broken kernel headers:
https://www.redhat.com/archives/libvir-list/2013-August/msg00272.html

Comment 1 Eric Blake 2013-08-06 22:47:17 UTC
This issue first started appearing with bug 895141 in rawhide in Jan 2013; obviously the fact that Fedora 19 does not have the problem means that upstream has managed to figure out a way to avoid the conflict, and that fix needs to be backported to either kernel-headers or glibc (or both) for RHEL.

Comment 3 Thomas Graf 2013-08-07 10:36:50 UTC

*** This bug has been marked as a duplicate of bug 981325 ***