LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-29-2016, 03:45 AM   #1
corbis_demon
Member
 
Registered: Jun 2004
Location: India
Distribution: CLFS
Posts: 515

Rep: Reputation: 36
Conflict between kernel and glibc headers when compiling PPP


Hi,
I'm trying to compile PPP-2.4.7, with 4.8.11 kernel headers and Glibc 2.24. I get the following error:
Code:
In file included from pppoe-discovery.c:18:0:
pppoe-discovery.c: In function 'sendPADI':
pppoe.h:299:2: warning: implicit declaration of function 'error' [-Wimplicit-function-declaration]
  error("Would create too-long packet"); \
  ^
pppoe-discovery.c:455:5: note: in expansion of macro 'CHECK_ROOM'
     CHECK_ROOM(cursor, packet.payload, plen);
     ^~~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/linux/in.h:28:3: error: redeclaration of enumerator 'IPPROTO_IP'
   IPPROTO_IP = 0,  /* Dummy protocol for TCP  */
   ^
/usr/include/netinet/in.h:42:5: note: previous definition of 'IPPROTO_IP' was here
     IPPROTO_IP = 0,    /* Dummy protocol for TCP.  */
     ^~~~~~~~~~
/usr/include/linux/in.h:30:3: error: redeclaration of enumerator 'IPPROTO_ICMP'
   IPPROTO_ICMP = 1,  /* Internet Control Message Protocol */
   ^
/usr/include/netinet/in.h:44:5: note: previous definition of 'IPPROTO_ICMP' was here
     IPPROTO_ICMP = 1,    /* Internet Control Message Protocol.  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:32:3: error: redeclaration of enumerator 'IPPROTO_IGMP'
   IPPROTO_IGMP = 2,  /* Internet Group Management Protocol */
   ^
/usr/include/netinet/in.h:46:5: note: previous definition of 'IPPROTO_IGMP' was here
     IPPROTO_IGMP = 2,    /* Internet Group Management Protocol. */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:34:3: error: redeclaration of enumerator 'IPPROTO_IPIP'
   IPPROTO_IPIP = 4,  /* IPIP tunnels (older KA9Q tunnels use 94) */
   ^
/usr/include/netinet/in.h:48:5: note: previous definition of 'IPPROTO_IPIP' was here
     IPPROTO_IPIP = 4,    /* IPIP tunnels (older KA9Q tunnels use 94).  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:36:3: error: redeclaration of enumerator 'IPPROTO_TCP'
   IPPROTO_TCP = 6,  /* Transmission Control Protocol */
   ^
/usr/include/netinet/in.h:50:5: note: previous definition of 'IPPROTO_TCP' was here
     IPPROTO_TCP = 6,    /* Transmission Control Protocol.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:38:3: error: redeclaration of enumerator 'IPPROTO_EGP'
   IPPROTO_EGP = 8,  /* Exterior Gateway Protocol  */
   ^
/usr/include/netinet/in.h:52:5: note: previous definition of 'IPPROTO_EGP' was here
     IPPROTO_EGP = 8,    /* Exterior Gateway Protocol.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:40:3: error: redeclaration of enumerator 'IPPROTO_PUP'
   IPPROTO_PUP = 12,  /* PUP protocol    */
   ^
/usr/include/netinet/in.h:54:5: note: previous definition of 'IPPROTO_PUP' was here
     IPPROTO_PUP = 12,    /* PUP protocol.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:42:3: error: redeclaration of enumerator 'IPPROTO_UDP'
   IPPROTO_UDP = 17,  /* User Datagram Protocol  */
   ^
/usr/include/netinet/in.h:56:5: note: previous definition of 'IPPROTO_UDP' was here
     IPPROTO_UDP = 17,    /* User Datagram Protocol.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:44:3: error: redeclaration of enumerator 'IPPROTO_IDP'
   IPPROTO_IDP = 22,  /* XNS IDP protocol   */
   ^
/usr/include/netinet/in.h:58:5: note: previous definition of 'IPPROTO_IDP' was here
     IPPROTO_IDP = 22,    /* XNS IDP protocol.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:46:3: error: redeclaration of enumerator 'IPPROTO_TP'
   IPPROTO_TP = 29,  /* SO Transport Protocol Class 4 */
   ^
/usr/include/netinet/in.h:60:5: note: previous definition of 'IPPROTO_TP' was here
     IPPROTO_TP = 29,    /* SO Transport Protocol Class 4.  */
     ^~~~~~~~~~
/usr/include/linux/in.h:48:3: error: redeclaration of enumerator 'IPPROTO_DCCP'
   IPPROTO_DCCP = 33,  /* Datagram Congestion Control Protocol */
   ^
/usr/include/netinet/in.h:62:5: note: previous definition of 'IPPROTO_DCCP' was here
     IPPROTO_DCCP = 33,    /* Datagram Congestion Control Protocol.  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:50:3: error: redeclaration of enumerator 'IPPROTO_IPV6'
   IPPROTO_IPV6 = 41,  /* IPv6-in-IPv4 tunnelling  */
   ^
/usr/include/netinet/in.h:64:5: note: previous definition of 'IPPROTO_IPV6' was here
     IPPROTO_IPV6 = 41,     /* IPv6 header.  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:52:3: error: redeclaration of enumerator 'IPPROTO_RSVP'
   IPPROTO_RSVP = 46,  /* RSVP Protocol   */
   ^
/usr/include/netinet/in.h:66:5: note: previous definition of 'IPPROTO_RSVP' was here
     IPPROTO_RSVP = 46,    /* Reservation Protocol.  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:54:3: error: redeclaration of enumerator 'IPPROTO_GRE'
   IPPROTO_GRE = 47,  /* Cisco GRE tunnels (rfc 1701,1702) */
   ^
/usr/include/netinet/in.h:68:5: note: previous definition of 'IPPROTO_GRE' was here
     IPPROTO_GRE = 47,    /* General Routing Encapsulation.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:56:3: error: redeclaration of enumerator 'IPPROTO_ESP'
   IPPROTO_ESP = 50,  /* Encapsulation Security Payload protocol */
   ^
/usr/include/netinet/in.h:70:5: note: previous definition of 'IPPROTO_ESP' was here
     IPPROTO_ESP = 50,      /* encapsulating security payload.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:58:3: error: redeclaration of enumerator 'IPPROTO_AH'
   IPPROTO_AH = 51,  /* Authentication Header protocol */
   ^
/usr/include/netinet/in.h:72:5: note: previous definition of 'IPPROTO_AH' was here
     IPPROTO_AH = 51,       /* authentication header.  */
     ^~~~~~~~~~
/usr/include/linux/in.h:60:3: error: redeclaration of enumerator 'IPPROTO_MTP'
   IPPROTO_MTP = 92,  /* Multicast Transport Protocol  */
   ^
/usr/include/netinet/in.h:74:5: note: previous definition of 'IPPROTO_MTP' was here
     IPPROTO_MTP = 92,    /* Multicast Transport Protocol.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:62:3: error: redeclaration of enumerator 'IPPROTO_BEETPH'
   IPPROTO_BEETPH = 94,  /* IP option pseudo header for BEET */
   ^
/usr/include/netinet/in.h:76:5: note: previous definition of 'IPPROTO_BEETPH' was here
     IPPROTO_BEETPH = 94,   /* IP option pseudo header for BEET.  */
     ^~~~~~~~~~~~~~
/usr/include/linux/in.h:64:3: error: redeclaration of enumerator 'IPPROTO_ENCAP'
   IPPROTO_ENCAP = 98,  /* Encapsulation Header   */
   ^
/usr/include/netinet/in.h:78:5: note: previous definition of 'IPPROTO_ENCAP' was here
     IPPROTO_ENCAP = 98,    /* Encapsulation Header.  */
     ^~~~~~~~~~~~~
/usr/include/linux/in.h:66:3: error: redeclaration of enumerator 'IPPROTO_PIM'
   IPPROTO_PIM = 103,  /* Protocol Independent Multicast */
   ^
/usr/include/netinet/in.h:80:5: note: previous definition of 'IPPROTO_PIM' was here
     IPPROTO_PIM = 103,    /* Protocol Independent Multicast.  */
     ^~~~~~~~~~~
/usr/include/linux/in.h:68:3: error: redeclaration of enumerator 'IPPROTO_COMP'
   IPPROTO_COMP = 108,  /* Compression Header Protocol  */
   ^
/usr/include/netinet/in.h:82:5: note: previous definition of 'IPPROTO_COMP' was here
     IPPROTO_COMP = 108,    /* Compression Header Protocol.  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:70:3: error: redeclaration of enumerator 'IPPROTO_SCTP'
   IPPROTO_SCTP = 132,  /* Stream Control Transport Protocol */
   ^
/usr/include/netinet/in.h:84:5: note: previous definition of 'IPPROTO_SCTP' was here
     IPPROTO_SCTP = 132,    /* Stream Control Transmission Protocol.  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:72:3: error: redeclaration of enumerator 'IPPROTO_UDPLITE'
   IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828)   */
   ^
/usr/include/netinet/in.h:86:5: note: previous definition of 'IPPROTO_UDPLITE' was here
     IPPROTO_UDPLITE = 136, /* UDP-Lite protocol.  */
     ^~~~~~~~~~~~~~~
/usr/include/linux/in.h:74:3: error: redeclaration of enumerator 'IPPROTO_MPLS'
   IPPROTO_MPLS = 137,  /* MPLS in IP (RFC 4023)  */
   ^
/usr/include/netinet/in.h:88:5: note: previous definition of 'IPPROTO_MPLS' was here
     IPPROTO_MPLS = 137,    /* MPLS in IP.  */
     ^~~~~~~~~~~~
/usr/include/linux/in.h:76:3: error: redeclaration of enumerator 'IPPROTO_RAW'
   IPPROTO_RAW = 255,  /* Raw IP packets   */
   ^
/usr/include/netinet/in.h:90:5: note: previous definition of 'IPPROTO_RAW' was here
     IPPROTO_RAW = 255,    /* Raw IP packets.  */
     ^~~~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:78:3: error: redeclaration of enumerator 'IPPROTO_MAX'
   IPPROTO_MAX
   ^~~~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:92:5: note: previous definition of 'IPPROTO_MAX' was here
     IPPROTO_MAX
     ^~~~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:84:8: error: redefinition of 'struct in_addr'
 struct in_addr {
        ^~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:31:8: note: originally defined here
 struct in_addr
        ^~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:166:8: error: redefinition of 'struct ip_mreq'
 struct ip_mreq  {
        ^~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:266:8: note: originally defined here
 struct ip_mreq
        ^~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:171:8: error: redefinition of 'struct ip_mreqn'
 struct ip_mreqn {
        ^~~~~~~~
In file included from /usr/include/netinet/in.h:37:0,
                 from pppoe.h:87,
                 from plugin.c:29:
/usr/include/bits/in.h:148:8: note: originally defined here
 struct ip_mreqn
        ^~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:177:8: error: redefinition of 'struct ip_mreq_source'
 struct ip_mreq_source {
        ^~~~~~~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:275:8: note: originally defined here
 struct ip_mreq_source
        ^~~~~~~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:183:8: error: redefinition of 'struct ip_msfilter'
 struct ip_msfilter {
        ^~~~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:325:8: note: originally defined here
 struct ip_msfilter
        ^~~~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:195:8: error: redefinition of 'struct group_req'
 struct group_req {
        ^~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:302:8: note: originally defined here
 struct group_req
        ^~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:200:8: error: redefinition of 'struct group_source_req'
 struct group_source_req {
        ^~~~~~~~~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:311:8: note: originally defined here
 struct group_source_req
        ^~~~~~~~~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:206:8: error: redefinition of 'struct group_filter'
 struct group_filter {
        ^~~~~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:346:8: note: originally defined here
 struct group_filter
        ^~~~~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:220:8: error: redefinition of 'struct in_pktinfo'
 struct in_pktinfo {
        ^~~~~~~~~~
In file included from /usr/include/netinet/in.h:37:0,
                 from pppoe.h:87,
                 from plugin.c:29:
/usr/include/bits/in.h:156:8: note: originally defined here
 struct in_pktinfo
        ^~~~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:19:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in.h:230:8: error: redefinition of 'struct sockaddr_in'
 struct sockaddr_in {
        ^~~~~~~~~~~
In file included from pppoe.h:47:0,
                 from plugin.c:29:
/usr/include/sys/socket.h:90:17: note: originally defined here
 typedef union { __SOCKADDR_ALLTYPES
                 ^
In file included from /usr/include/linux/if_pppol2tp.h:20:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in6.h:32:8: error: redefinition of 'struct in6_addr'
 struct in6_addr {
        ^~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:211:8: note: originally defined here
 struct in6_addr
        ^~~~~~~~
In file included from /usr/include/linux/if_pppol2tp.h:20:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
 struct sockaddr_in6 {
        ^~~~~~~~~~~~
In file included from pppoe.h:47:0,
                 from plugin.c:29:
/usr/include/sys/socket.h:90:17: note: originally defined here
 typedef union { __SOCKADDR_ALLTYPES
                 ^
In file included from /usr/include/linux/if_pppol2tp.h:20:0,
                 from /usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
/usr/include/linux/in6.h:59:8: error: redefinition of 'struct ipv6_mreq'
 struct ipv6_mreq {
        ^~~~~~~~~
In file included from pppoe.h:87:0,
                 from plugin.c:29:
/usr/include/netinet/in.h:290:8: note: originally defined here
 struct ipv6_mreq
        ^~~~~~~~~
make[2]: *** [Makefile:54: plugin.o] Error 1
Now, the package compiles, but the rp-pppoe.so plugin is not built. A similar thing happens when compiling rp-pppoe 3.12. I didn't encounter this with the 4.4 LTS releases. Can someone suggest a solution here? Thanks.
 
Old 11-29-2016, 05:09 AM   #2
corbis_demon
Member
 
Registered: Jun 2004
Location: India
Distribution: CLFS
Posts: 515

Original Poster
Rep: Reputation: 36
Alright, so I found a workaround for this problem:

Code:
--- a/pppd/plugins/rp-pppoe/plugin.c	2016-11-29 15:39:09.289843383 +0530
+++ b/pppd/plugins/rp-pppoe/plugin.c	2016-11-29 15:39:22.659843111 +0530
@@ -49,6 +49,8 @@
 #include <net/ethernet.h>
 #include <net/if_arp.h>
 #include <linux/ppp_defs.h>
+#define _LINUX_IN_H
+#define _LINUX_IN6_H
 #include <linux/if_pppox.h>
 
 #ifndef _ROOT_PATH
It's not a solution, but at least the plugin compiles. Thanks all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] difference between linux kernel headers and glibc sganta Linux - Newbie 1 05-25-2012 07:10 AM
Which Packages Depend Upon Kernel Headers, glibc, gcc, etc.? Woodsman Slackware 3 06-05-2009 03:05 PM
Glibc Unable to Find Kernel Headers Kenji Miyamoto Linux From Scratch 6 12-30-2008 05:03 PM
kernel headers and glibc BCarey Slackware 9 09-17-2006 10:56 PM
Errors Compiling Kernel 2.6 on Slackware 10.2 - Old kernel headers required? Dave S. Slackware 8 03-04-2006 01:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration