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
@toolchain: Any suggestions here?
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.
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.
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.
Reported to systemd upstream.
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.
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 +