Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 577660

Summary: sys-apps/systemd-229 with sys-kernel/linux-headers-4.5 error: redeclaration of enumerator ‘IFF_UP’
Product: Gentoo Linux Reporter: Reuben Martin <reuben.m>
Component: [OLD] Core systemAssignee: Gentoo systemd Team <systemd>
Status: RESOLVED FIXED    
Severity: normal CC: Adrian.Bassett, marduk, toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/F35B3R7LZMWIQNSEFX2AYC4TZYAG4CBP/
See Also: https://bugs.gentoo.org/show_bug.cgi?id=577464
https://bugs.gentoo.org/show_bug.cgi?id=577584
https://github.com/systemd/systemd/issues/2864
https://bugs.gentoo.org/show_bug.cgi?id=577866
https://bugs.gentoo.org/show_bug.cgi?id=578206
Whiteboard:
Package list:
Runtime testing required: ---

Description Reuben Martin 2016-03-17 21:49:05 UTC
Didn't find a Gentoo bug for this yet, but it seems to have come up already in Fedora.

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/F35B3R7LZMWIQNSEFX2AYC4TZYAG4CBP/

This is due to a conflict between linux/if.h and net/if.h. Downgrading to sys-kernel/linux-headers-4.4 allowed systemd to build for me

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2016-03-17 22:00:05 UTC
@toolchain: Any suggestions here?
Comment 2 SpanKY gentoo-dev 2016-03-18 00:56:40 UTC
there's on going work to make the headers play well together, but in the mean time, it's not news that you shouldn't be including both.  if you're using the glibc funcs, then only use glibc headers.
Comment 3 Mike Gilbert gentoo-dev 2016-03-18 02:46:39 UTC
I think the conflict is due to these two lines:

#include <sys/if.h>
#include <linux/netfilter_ipv4/ip_tables.h>

The latter is probably not available via glibc headers.
Comment 4 Mike Gilbert gentoo-dev 2016-03-18 03:04:42 UTC
I have tried eliminating net/if.h and linux/if.h from the clusterfuck of headers, but neither seems to work; they define overlapping sets of data, but neither is a subset of the other.

This will probably remain broken until someone fixes this upstream in systemd, glibc, or the kernel.
Comment 5 Mike Gilbert gentoo-dev 2016-03-18 03:15:41 UTC
Reported to systemd upstream.
Comment 6 Reuben Martin 2016-03-18 04:34:52 UTC
I'm fairly sure systemd devs are already aware of it given that Pottering himself responded directly in the thread I linked to. That said, I'm not certain it's anything he can fix aside from submitting a patch to kernel and / or glibc. Furthermore, a systemd specific patch wouldn't fix the other packages that are also breaking.
Comment 7 Mike Gilbert gentoo-dev 2016-04-10 01:06:15 UTC
commit c008e237dd1dfd1139373e4e6287e95f94c60346
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Sat Apr 9 21:05:07 2016 -0400

    sys-apps/systemd: Add workaround for if.h conflict
    
    Bug: https://bugs.gentoo.org/577660
    
    Package-Manager: portage-2.2.28_p3

 sys-apps/systemd/files/linux-headers-if.h.patch | 34 ++++++++++++++++++++++++++++++++++
 sys-apps/systemd/systemd-229-r100.ebuild        |  1 +
 sys-apps/systemd/systemd-229.ebuild             |  1 +