Summary: | net-misc/dhcpcd-6.8.1[ipv6] invalid application of 'sizeof' to incomplete type 'struct in6_pktinfo' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Yannick Schaeffer <yannick.schaeffer> |
Component: | Current packages | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | ar, base-system, bugs+gentoo, callum90ish, eXt, floppym, hlein, hwoarang, javran.c, jbowler, leonchik1976, orzel, remi, roy, StormByte |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build log
output of emerge --info '=net-misc/dhcpcd-6.8.1::gentoo' |
Description
Yannick Schaeffer
2015-04-16 07:57:16 UTC
Created attachment 401316 [details]
build log
Created attachment 401318 [details]
output of emerge --info '=net-misc/dhcpcd-6.8.1::gentoo'
Do earlier versions compile on the same system with ipv4 set? Got it too. Looks like the struct decl is hidden behind __USE_GNU which is activated by _GNU_SOURCE. I can't add __GNU_SOURCE because that would conflict with __BSD_SOURCE for UDP headers. Is there another workaround? What kernel headers and glibc are you using? *** Bug 546860 has been marked as a duplicate of this bug. *** (In reply to Roy Marples from comment #5) > I can't add __GNU_SOURCE because that would conflict with __BSD_SOURCE for > UDP headers. I think you are already hacking around this by defining __FAVOR_BSD in dhcp.c? In any case, it looks like __FAVOR_BSD does nothing in netinet/udp.h since glibc-2.19. https://sourceware.org/git/?p=glibc.git;a=commit;h=7011c2622fe3e10a29dbe74f06aaebd07710127d (In reply to Roy Marples from comment #5) > Is there another workaround? What kernel headers and glibc are > you using? I'm running into this with linux-headers-4.0 and glibc-2.20-r2. I was able to build this version of dhcpcd in the past, so it would seem that something else on my system has changed. Downgrading to linux-headers-3.19 makes dhcpcd build again. Here's the relevant commit in the kernel. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include/uapi/linux/libc-compat.h?id=3b50d9029809b60a5081d90c282aa04d438d3ea1 Before this, linux/ipv6.h would define struct in6_pktinfo unconditionally. Sorry, here's a better link. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3b50d9029809b60a5081d90c282aa04d438d3ea1 (In reply to Mike Gilbert from comment #7) > (In reply to Roy Marples from comment #5) > > I can't add __GNU_SOURCE because that would conflict with __BSD_SOURCE for > > UDP headers. > > I think you are already hacking around this by defining __FAVOR_BSD in > dhcp.c? > > In any case, it looks like __FAVOR_BSD does nothing in netinet/udp.h since > glibc-2.19. > > https://sourceware.org/git/?p=glibc.git;a=commit; > h=7011c2622fe3e10a29dbe74f06aaebd07710127d I still get bug reports about dhcpcd not compiling on old OS's like RedHat-5, so my current hackery is going no-where. I could not find a better fix - I just hope older Linux machines still work with using _GNU_SOURCE. http://roy.marples.name/projects/dhcpcd/ci/c32714545158ca83?sbs=0 (In reply to Roy Marples from comment #13) > I could not find a better fix - I just hope older Linux machines still work > with using _GNU_SOURCE. > http://roy.marples.name/projects/dhcpcd/ci/c32714545158ca83?sbs=0 As a temporary work round on Gentoo Linux (armv7a) I added CPPFLAGS=-D_GNU_SOURCE using package.env and the build succeeded. I.e. everything compiled with both _BSD_SOURCE and _GNU_SOURCE. This is with the linux-4.0 headers of course. I haven't been able to see whether the result seems to work yet, but at least my "emerge -e" is able to make progress. Note, bug #547678 appears to duplicate this one, but that one has a WORKSFORME patch attached; I suggest followers of this bug go check that one out. And now I realize this has gone full circle - the upstream maintainer, Roy Marples, is/was participating in this bug's thread, and it is his upstream patch that someone else based the fix attached to #547678 on :-P (In reply to Hank Leininger from comment #16) > the upstream maintainer, Roy Marples, is/was participating in this bug's > thread Definitely is :) A new dhcpcd release is taking a little longer than anticipated unfortunately. *** Bug 547678 has been marked as a duplicate of this bug. *** Fixed in dhcpcd-6.8.2 (In reply to Roy Marples from comment #5) assuming those are typos as there is no __GNU_SOURCE/__BSD_SOURCE defines -- they both have a single _ prefix. hopefully you aren't using __USE_XXX defines as those are internal only. (In reply to SpanKY from comment #20) > (In reply to Roy Marples from comment #5) > > assuming those are typos as there is no __GNU_SOURCE/__BSD_SOURCE defines -- > they both have a single _ prefix. They are typo's. > hopefully you aren't using __USE_XXX > defines as those are internal only. I do abuse the internal __FAVOR_BSD macro still as I can't find a way of doing this otherwise. See below. #define __FAVOR_BSD /* Nasty glibc hack so we can use BSD semantics for UDP */ #include <netinet/udp.h> #undef __FAVOR_BSD dhcpcd-6 is long gone. |