Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208134 - net-dialup/rp-pppoe-3.8-r2 doesn't compile w/ linux-headers-2.6.24
Summary: net-dialup/rp-pppoe-3.8-r2 doesn't compile w/ linux-headers-2.6.24
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 211045 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-30 04:55 UTC by nightmare
Modified: 2008-04-20 20:41 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nightmare 2008-01-30 04:55:50 UTC
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....
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2008-01-30 08:48:54 UTC
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.
Comment 2 nightmare 2008-01-30 16:37:50 UTC
(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.
Comment 3 Simone Piunno 2008-02-03 13:06:40 UTC
Same problem over here
Comment 4 kouyu 2008-02-08 08:32:37 UTC
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 :)
Comment 5 Ivan Anishchuk 2008-02-12 07:50:56 UTC
+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....
Comment 6 Ivan Anishchuk 2008-02-12 07:57:40 UTC
Of course, movin' in.h has helped me, but I think that isn't good idea...
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2008-02-21 22:54:09 UTC
*** Bug 211045 has been marked as a duplicate of this bug. ***
Comment 8 tonich 2008-04-11 13:01:57 UTC
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
Comment 9 Alin Năstac (RETIRED) gentoo-dev 2008-04-11 19:08:13 UTC
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.
Comment 10 tonich 2008-04-12 19:07:09 UTC
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
...
Comment 11 tonich 2008-04-12 19:18:53 UTC
incorrect patch at lines 745-750 of file 09_all_include-other-linux-headers.patch from gentoo-headers-2.6.24-1.tar.bz2
Comment 12 SpanKY gentoo-dev 2008-04-20 20:41:10 UTC
fixed with linux-2.6.25-r1