* Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build. @ 2017-01-13 19:12 Ben Greear 2017-01-13 19:21 ` Ben Greear 2017-01-13 19:41 ` Stephen Hemminger 0 siblings, 2 replies; 7+ messages in thread From: Ben Greear @ 2017-01-13 19:12 UTC (permalink / raw) To: netdev, mikko.rapeli I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with netinet/ip.h. Maybe my build environment is screwed up, but maybe also it would be better to just let the user include appropriate headers before including if_tunnel.h and revert this patch? include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h Fixes userspace compilation errors like: error: field ‘iph’ has incomplete type error: field ‘prefix’ has incomplete type Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net> Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build. 2017-01-13 19:12 Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build Ben Greear @ 2017-01-13 19:21 ` Ben Greear 2017-01-13 19:41 ` Stephen Hemminger 1 sibling, 0 replies; 7+ messages in thread From: Ben Greear @ 2017-01-13 19:21 UTC (permalink / raw) To: netdev, mikko.rapeli On 01/13/2017 11:12 AM, Ben Greear wrote: > I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with > netinet/ip.h. > > Maybe my build environment is screwed up, but maybe also it would be better to > just let the user include appropriate headers before including if_tunnel.h > and revert this patch? > > > include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h > > Fixes userspace compilation errors like: > > error: field ‘iph’ has incomplete type > error: field ‘prefix’ has incomplete type > > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> > Signed-off-by: David S. Miller <davem@davemloft.net> > > Thanks, > Ben > I forgot the full commit ID, my abbreviation was not sufficient to be unique it seems: 1fe8e0f074c77aa41aaa579345a9e675acbebfa9 Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build. 2017-01-13 19:12 Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build Ben Greear 2017-01-13 19:21 ` Ben Greear @ 2017-01-13 19:41 ` Stephen Hemminger 2017-01-13 19:50 ` Ben Greear 1 sibling, 1 reply; 7+ messages in thread From: Stephen Hemminger @ 2017-01-13 19:41 UTC (permalink / raw) To: Ben Greear; +Cc: netdev, mikko.rapeli On Fri, 13 Jan 2017 11:12:32 -0800 Ben Greear <greearb@candelatech.com> wrote: > I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with > netinet/ip.h. > > Maybe my build environment is screwed up, but maybe also it would be better to > just let the user include appropriate headers before including if_tunnel.h > and revert this patch? > > > include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h > > Fixes userspace compilation errors like: > > error: field ‘iph’ has incomplete type > error: field ‘prefix’ has incomplete type > > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> > Signed-off-by: David S. Miller <davem@davemloft.net> > > Thanks, > Ben > What I ended up doing for iproute2 was including all headers used by the source based on sanitized kernel headers. Basically $ git grep '^#include <linux/' | \ awk -F: '{print $2}' | \ sed -e 's/^#include <//' -e 's/>.*$//' | \ sort -u >linux.headers $ for f in $(cat linux.headers) do cp ~/kernel/net-next/usr/include/$f include/$f done You can't take only some of the headers, once you decide to diverge from glibc provided headers, you got to take them all. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build. 2017-01-13 19:41 ` Stephen Hemminger @ 2017-01-13 19:50 ` Ben Greear 2017-01-13 22:08 ` Stephen Hemminger 0 siblings, 1 reply; 7+ messages in thread From: Ben Greear @ 2017-01-13 19:50 UTC (permalink / raw) To: Stephen Hemminger; +Cc: netdev, mikko.rapeli On 01/13/2017 11:41 AM, Stephen Hemminger wrote: > On Fri, 13 Jan 2017 11:12:32 -0800 > Ben Greear <greearb@candelatech.com> wrote: > >> I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with >> netinet/ip.h. >> >> Maybe my build environment is screwed up, but maybe also it would be better to >> just let the user include appropriate headers before including if_tunnel.h >> and revert this patch? >> >> >> include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h >> >> Fixes userspace compilation errors like: >> >> error: field ‘iph’ has incomplete type >> error: field ‘prefix’ has incomplete type >> >> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> >> Signed-off-by: David S. Miller <davem@davemloft.net> >> >> Thanks, >> Ben >> > > What I ended up doing for iproute2 was including all headers used by the source > based on sanitized kernel headers. Basically > $ git grep '^#include <linux/' | \ > awk -F: '{print $2}' | \ > sed -e 's/^#include <//' -e 's/>.*$//' | \ > sort -u >linux.headers > $ for f in $(cat linux.headers) > do cp ~/kernel/net-next/usr/include/$f include/$f > done > > You can't take only some of the headers, once you decide to diverge from glibc provided > headers, you got to take them all. > I do grab a copy of the linux kernel headers and compile against that, but netinet/ip.h is coming from the OS. Do you mean I should not include netinet/ip.h and instead use linux/ip.h? Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build. 2017-01-13 19:50 ` Ben Greear @ 2017-01-13 22:08 ` Stephen Hemminger 2017-01-13 22:11 ` Ben Greear 0 siblings, 1 reply; 7+ messages in thread From: Stephen Hemminger @ 2017-01-13 22:08 UTC (permalink / raw) To: Ben Greear; +Cc: netdev, mikko.rapeli On Fri, 13 Jan 2017 11:50:32 -0800 Ben Greear <greearb@candelatech.com> wrote: > On 01/13/2017 11:41 AM, Stephen Hemminger wrote: > > On Fri, 13 Jan 2017 11:12:32 -0800 > > Ben Greear <greearb@candelatech.com> wrote: > > > >> I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with > >> netinet/ip.h. > >> > >> Maybe my build environment is screwed up, but maybe also it would be better to > >> just let the user include appropriate headers before including if_tunnel.h > >> and revert this patch? > >> > >> > >> include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h > >> > >> Fixes userspace compilation errors like: > >> > >> error: field ‘iph’ has incomplete type > >> error: field ‘prefix’ has incomplete type > >> > >> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> > >> Signed-off-by: David S. Miller <davem@davemloft.net> > >> > >> Thanks, > >> Ben > >> > > > > What I ended up doing for iproute2 was including all headers used by the source > > based on sanitized kernel headers. Basically > > $ git grep '^#include <linux/' | \ > > awk -F: '{print $2}' | \ > > sed -e 's/^#include <//' -e 's/>.*$//' | \ > > sort -u >linux.headers > > $ for f in $(cat linux.headers) > > do cp ~/kernel/net-next/usr/include/$f include/$f > > done > > > > You can't take only some of the headers, once you decide to diverge from glibc provided > > headers, you got to take them all. > > > > I do grab a copy of the linux kernel headers and compile against that, but netinet/ip.h is > coming from the OS. Do you mean I should not include netinet/ip.h and instead use linux/ip.h? I don't think you can mix netinet/ip.h and linux/ip.h, yes that is a mess. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build. 2017-01-13 22:08 ` Stephen Hemminger @ 2017-01-13 22:11 ` Ben Greear 2017-01-14 6:43 ` Mikko Rapeli 0 siblings, 1 reply; 7+ messages in thread From: Ben Greear @ 2017-01-13 22:11 UTC (permalink / raw) To: Stephen Hemminger; +Cc: netdev, mikko.rapeli On 01/13/2017 02:08 PM, Stephen Hemminger wrote: > On Fri, 13 Jan 2017 11:50:32 -0800 > Ben Greear <greearb@candelatech.com> wrote: > >> On 01/13/2017 11:41 AM, Stephen Hemminger wrote: >>> On Fri, 13 Jan 2017 11:12:32 -0800 >>> Ben Greear <greearb@candelatech.com> wrote: >>> >>>> I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with >>>> netinet/ip.h. >>>> >>>> Maybe my build environment is screwed up, but maybe also it would be better to >>>> just let the user include appropriate headers before including if_tunnel.h >>>> and revert this patch? >>>> >>>> >>>> include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h >>>> >>>> Fixes userspace compilation errors like: >>>> >>>> error: field ‘iph’ has incomplete type >>>> error: field ‘prefix’ has incomplete type >>>> >>>> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> >>>> Signed-off-by: David S. Miller <davem@davemloft.net> >>>> >>>> Thanks, >>>> Ben >>>> >>> >>> What I ended up doing for iproute2 was including all headers used by the source >>> based on sanitized kernel headers. Basically >>> $ git grep '^#include <linux/' | \ >>> awk -F: '{print $2}' | \ >>> sed -e 's/^#include <//' -e 's/>.*$//' | \ >>> sort -u >linux.headers >>> $ for f in $(cat linux.headers) >>> do cp ~/kernel/net-next/usr/include/$f include/$f >>> done >>> >>> You can't take only some of the headers, once you decide to diverge from glibc provided >>> headers, you got to take them all. >>> >> >> I do grab a copy of the linux kernel headers and compile against that, but netinet/ip.h is >> coming from the OS. Do you mean I should not include netinet/ip.h and instead use linux/ip.h? > > I don't think you can mix netinet/ip.h and linux/ip.h, yes that is a mess. > Well, I still like the idea of reverting this patch..that way user-space does not have to use linux/ip.h, and that lets them use netinet/ip.h and if_tunnel.h. Anyway, I'll let Dave and/or the original committer decide....I've reverted it in my local tree so I am able to build again... Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build. 2017-01-13 22:11 ` Ben Greear @ 2017-01-14 6:43 ` Mikko Rapeli 0 siblings, 0 replies; 7+ messages in thread From: Mikko Rapeli @ 2017-01-14 6:43 UTC (permalink / raw) To: Ben Greear; +Cc: Stephen Hemminger, netdev On Fri, Jan 13, 2017 at 02:11:41PM -0800, Ben Greear wrote: > On 01/13/2017 02:08 PM, Stephen Hemminger wrote: > >On Fri, 13 Jan 2017 11:50:32 -0800 > >Ben Greear <greearb@candelatech.com> wrote: > > > >>On 01/13/2017 11:41 AM, Stephen Hemminger wrote: > >>>On Fri, 13 Jan 2017 11:12:32 -0800 > >>>Ben Greear <greearb@candelatech.com> wrote: > >>> > >>>>I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with > >>>>netinet/ip.h. > >>>> > >>>>Maybe my build environment is screwed up, but maybe also it would be better to > >>>>just let the user include appropriate headers before including if_tunnel.h > >>>>and revert this patch? > >>>> > >>>> > >>>>include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h > >>>> > >>>> Fixes userspace compilation errors like: > >>>> > >>>> error: field ‘iph’ has incomplete type > >>>> error: field ‘prefix’ has incomplete type > >>>> > >>>> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> > >>>> Signed-off-by: David S. Miller <davem@davemloft.net> > >>>> > >>>>Thanks, > >>>>Ben > >>>> > >>> > >>>What I ended up doing for iproute2 was including all headers used by the source > >>>based on sanitized kernel headers. Basically > >>> $ git grep '^#include <linux/' | \ > >>> awk -F: '{print $2}' | \ > >>> sed -e 's/^#include <//' -e 's/>.*$//' | \ > >>> sort -u >linux.headers > >>> $ for f in $(cat linux.headers) > >>> do cp ~/kernel/net-next/usr/include/$f include/$f > >>> done > >>> > >>>You can't take only some of the headers, once you decide to diverge from glibc provided > >>>headers, you got to take them all. > >>> > >> > >>I do grab a copy of the linux kernel headers and compile against that, but netinet/ip.h is > >>coming from the OS. Do you mean I should not include netinet/ip.h and instead use linux/ip.h? > > > >I don't think you can mix netinet/ip.h and linux/ip.h, yes that is a mess. > > > > Well, I still like the idea of reverting this patch..that way user-space does not have to use > linux/ip.h, and that lets them use netinet/ip.h and if_tunnel.h. I might have patches for glibc compat for your case in https://github.com/mcfrisk/linux/commits/headers_test_v06 if you include glibc headers first and then kernel uapi ones. > Anyway, I'll let Dave and/or the original committer decide....I've reverted it in my local tree > so I am able to build again... My changes make uapi headers compile as they are in userspace. That exposes problems like this for which user space has had workarounds for decades. Sorry for that. The glibc compat fixes should help. -Mikko > Thanks, > Ben > > -- > Ben Greear <greearb@candelatech.com> > Candela Technologies Inc http://www.candelatech.com > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-14 6:43 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-01-13 19:12 Commit 1fe8e0... (include more headers in if_tunnel.h) breaks my user-space build Ben Greear 2017-01-13 19:21 ` Ben Greear 2017-01-13 19:41 ` Stephen Hemminger 2017-01-13 19:50 ` Ben Greear 2017-01-13 22:08 ` Stephen Hemminger 2017-01-13 22:11 ` Ben Greear 2017-01-14 6:43 ` Mikko Rapeli
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.