Hi,

again.

On 05/24/2016 09:20 AM, Alexander Aring wrote:
> 
> Hi,
> 
> I think I know what's going on here. :-)
> 
> On 05/22/2016 01:55 AM, Clemens Gruber wrote:
>> Hi,
>>
>> I need some features from the new iproute2 4.6, but there seem to be
>> some kernel header vs glibc header incompatibilities occuring when
>> building the new iproute2 4.6 for ptxdist.
>>
>> Two examples of the numerous build errors on ptxdist 2016.04.0, a
>> toolchain with glibc 2.22 and kernel + kernel-headers version 4.6.
>>
>> In file included from m_ipt.c:17:0:
>> ../include/linux/if.h:106:19: error: redeclaration of enumerator 'IFF_UP'
>>  #define IFF_UP    IFF_UP
>>                    ^
>> ../include/linux/if.h:79:2: note: previous definition of 'IFF_UP' was here
>>   IFF_UP    = 1<<0,  /* sysfs */
>>   ^~~~~~
>>
>> In file included from ../include/xtables.h:16:0,
>>                  from ../include/iptables.h:5,
>>                  from m_ipt.c:18:
>> TOOLCHAIN/sysroot-arm-v7a-linux-gnueabihf/usr/include/net/if.h:111:8: error: 
>> redefinition of 'struct ifmap'
> 
> here, you already replaced the TOOLCHAIN path and it uses the
> kernel-headers from toolchain, not ptxdist.
> 
>>  struct ifmap
>>         ^~~~~
>> In file included from m_ipt.c:17:0:
>> ../include/linux/if.h:189:8: note: originally defined here
> 
> I suppose it's a relative include from your TOOLCHAIN kernel-headers.
> 
> The solution would be that you need to tell the iproute2 buildsystem
> where the kernel-headers are which you want to use.
> 
> E.g. (running fast grep on ptxdist dir)
> 
> rules/bridge-utils.make: --with-linux-headers=$(KERNEL_HEADERS_DIR)
> 
> which can be checked by:
> 
> ptxdist print KERNEL_HEADERS_DIR
> 
> in your BSP and this directory should be use to search kernel headers.
> 

Maybe to add KERNEL_INCLUDE=${KERNEL_HEADERS_DIR) in IPROUTE2_MAKE_OPT is
enough here, or leave it empty to use maybe the fallback?

I think to updating to use KERNEL_INCLUDE=${KERNEL_HEADERS_DIR) would be
nice in ptxdist, if this solves your issue.

See [0].

- Alex

[0] 
http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/tree/Makefile#n9

_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to