I'm installing a new gentoo x86-64 linux system. After emerging system, and continue to emerge rp-pppoe, it happened. It looks like there's some headers conflicting with rp-pppoe-3.8-r2. As I downgrade linux-headers-2.6.23-r3, it passed emerging rp-pppoe. Reproducible: Always Actual Results: x86_64-pc-linux-gnu-gcc -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o In file included from /usr/include/linux/if_pppol2tp.h:19, from /usr/include/linux/if_pppox.h:26, from plugin.c:55: /usr/include/linux/in.h:26: error: redeclaration of enumerator 'IPPROTO_IP' /usr/include/gentoo-multilib/amd64/netinet/in.h:34: error: previous definition of 'IPPROTO_IP' was here /usr/include/linux/in.h:27: error: redeclaration of enumerator 'IPPROTO_ICMP' /usr/include/gentoo-multilib/amd64/netinet/in.h:38: error: previous definition of 'IPPROTO_ICMP' was here /usr/include/linux/in.h:28: error: redeclaration of enumerator 'IPPROTO_IGMP' /usr/include/gentoo-multilib/amd64/netinet/in.h:40: error: previous definition of 'IPPROTO_IGMP' was here /usr/include/linux/in.h:29: error: redeclaration of enumerator 'IPPROTO_IPIP' /usr/include/gentoo-multilib/amd64/netinet/in.h:42: error: previous definition of 'IPPROTO_IPIP' was here /usr/include/linux/in.h:30: error: redeclaration of enumerator 'IPPROTO_TCP' /usr/include/gentoo-multilib/amd64/netinet/in.h:44: error: previous definition of 'IPPROTO_TCP' was here . . . /usr/include/linux/in.h:56: error: redefinition of 'struct in_addr' /usr/include/linux/in.h:116: error: redefinition of 'struct ip_mreq' /usr/include/linux/in.h:122: error: redefinition of 'struct ip_mreqn' /usr/include/linux/in.h:128: error: redefinition of 'struct ip_mreq_source' /usr/include/linux/in.h:134: error: redefinition of 'struct ip_msfilter' /usr/include/linux/in.h:147: error: redefinition of 'struct group_req' /usr/include/linux/in.h:153: error: redefinition of 'struct group_source_req' /usr/include/linux/in.h:160: error: redefinition of 'struct group_filter' /usr/include/linux/in.h:173: error: redefinition of 'struct in_pktinfo' /usr/include/linux/in.h:181: error: redefinition of 'struct sockaddr_in' make: *** [plugin/plugin.o] Error 1 make: *** Waiting for unfinished jobs....
See if re-emerging glibc after you update linux-headers fixes your problem. In any case, this is not net-dialup's problem. Reassigned to toolchain team.
(In reply to comment #1) > See if re-emerging glibc after you update linux-headers fixes your problem. > > In any case, this is not net-dialup's problem. Reassigned to toolchain team. > After Re-emerging glibc, the problem is still there.
Same problem over here
I have this problem too. But according to the error message: /usr/include/linux/in.h:26: error: redeclaration of enumerator 'IPPROTO_IP' /usr/include/gentoo-multilib/amd64/netinet/in.h:34: error: previous definition of 'IPPROTO_IP' was here The error indicates some symbols are redeclared in two files -- /usr/include/linux/in.h and /usr/include/gentoo-multilib/amd64/netinet/in.h. The former belongs to linux-headers and the latter belongs to glibc So I ran these two commands in order to compile rp-pppoe. 1. mv /usr/include/gentoo-multilib/amd64/netinet/in.h /usr/include/gentoo-multilib/amd64/netinet/in.h.bak 2. touch /usr/include/gentoo-multilib/amd64/netinet/in.h Then rp-pppoe is merged successfully on my mechine. Of course, don't forget to restore /usr/include/gentoo-multilib/amd64/netinet/in.h Have a try :)
+1 on 32-bit pc In file included from /usr/include/linux/if_pppol2tp.h:19, from /usr/include/linux/if_pppox.h:26, from plugin.c:55: /usr/include/linux/in.h:26: error: redeclaration of enumerator ‘IPPROTO_IP’ /usr/include/netinet/in.h:34: error: previous definition of ‘IPPROTO_IP’ was here ................ /usr/include/linux/in.h:52: error: redeclaration of enumerator ‘IPPROTO_MAX’ /usr/include/netinet/in.h:89: error: previous definition of ‘IPPROTO_MAX’ was here /usr/include/linux/in.h:56: error: redefinition of ‘struct in_addr’ ................................. /usr/include/linux/in.h:181: error: redefinition of ‘struct sockaddr_in’ i686-pc-linux-gnu-gcc -o pppoe-server pppoe-server.o if.o debug.o common.o md5.o -Llibevent -levent make: *** [plugin/plugin.o] Error 1 make: *** Waiting for unfinished jobs....
Of course, movin' in.h has helped me, but I think that isn't good idea...
*** Bug 211045 has been marked as a duplicate of this bug. ***
this patch (prevent include <linux/in.h>) solves the problem. --- plugin.c.orig 2008-04-11 21:29:09.000000000 +0400 +++ plugin.c 2008-04-11 21:28:08.000000000 +0400 @@ -52,6 +52,7 @@ #include <net/if_arp.h> #include <linux/ppp_defs.h> #include <linux/if_ppp.h> +#define _LINUX_IN_H #include <linux/if_pppox.h> #ifndef _ROOT_PATH
This is a workaround, not a solution. The solution would be either removing the definition from one of the header file that defines it, either the one installed by glibc or the one installed by linux-headers.
This is difference betwen if_pppol2tp.h file in current linux-headers-2.6.24 and original header, founded in linux kernel source tree. --- /usr/include/linux/if_pppol2tp.h 2008-04-11 22:44:46.000000000 +0400 +++ include/linux/if_pppol2tp.h 2008-01-25 01:58:37.000000000 +0300 @@ -15,8 +15,11 @@ #ifndef __LINUX_IF_PPPOL2TP_H #define __LINUX_IF_PPPOL2TP_H -#include <linux/types.h> +#include <asm/types.h> + +#ifdef __KERNEL__ #include <linux/in.h> +#endif /* Structure used to connect() the socket to a particular tunnel UDP * socket. ----------------------------------- This block should be as in linux-headers-2.6.23: ... #ifndef __LINUX_IF_PPPOL2TP_H #define __LINUX_IF_PPPOL2TP_H #include <asm/types.h> /* Structure used to connect() the socket to a particular tunnel UDP ...
incorrect patch at lines 745-750 of file 09_all_include-other-linux-headers.patch from gentoo-headers-2.6.24-1.tar.bz2
fixed with linux-2.6.25-r1