Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ppp install "error: field ‘pppol2tp’ has incomplete type"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zasdfgbnm
n00b
n00b


Joined: 06 Apr 2012
Posts: 43

PostPosted: Sat Jul 28, 2012 2:36 am    Post subject: ppp install "error: field ‘pppol2tp’ has incomplete typ Reply with quote

I'm using ACCEPT_KEYWORDS="~amd64". An error occured while emerging net-dialup/ppp-2.4.5-r2. I have searched for solution and found this issue:
https://bugs.gentoo.org/show_bug.cgi?id=334047
It seems this is a bug[/quote]

Code:
In file included from plugin.c:53:0:
/usr/include/linux/if_pppox.h:84:26: error: field ‘pppol2tp’ has incomplete type
/usr/include/linux/if_pppox.h:99:28: error: field ‘pppol2tp’ has incomplete type
make[2]: *** [plugin.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-dialup/ppp-2.4.5-r2/work/ppp-2.4.5/pppd/plugins/rp-pppoe'
/bin/sh: line 0: exit: minconn.so: numeric argument required
make[1]: *** [all] Error 255
make[1]: Leaving directory `/var/tmp/portage/net-dialup/ppp-2.4.5-r2/work/ppp-2.4.5/pppd/plugins'
make: *** [all] Error 2
emake failed
 * ERROR: net-dialup/ppp-2.4.5-r2 failed (compile phase):
 *   compile failed
 *
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 3188:  Called die
 * The specific snippet of code:
 *       emake COPTS="${CFLAGS} -D_GNU_SOURCE" || die "compile failed";
 *
 * If you need support, post the output of `emerge --info '=net-dialup/ppp-2.4.5-r2'`,
 * the complete build log and the output of `emerge -pqv '=net-dialup/ppp-2.4.5-r2'`.
 * The complete build log is located at '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/work/ppp-2.4.5'
 * S: '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/work/ppp-2.4.5'

>>> Failed to emerge net-dialup/ppp-2.4.5-r2, Log file:

>>>  '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/temp/build.log'

 * Messages for package net-dialup/ppp-2.4.5-r2:

 * ERROR: net-dialup/ppp-2.4.5-r2 failed (compile phase):
 *   compile failed
 *
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 3188:  Called die
 * The specific snippet of code:
 *       emake COPTS="${CFLAGS} -D_GNU_SOURCE" || die "compile failed";
 *
 * If you need support, post the output of `emerge --info '=net-dialup/ppp-2.4.5-r2'`,
 * the complete build log and the output of `emerge -pqv '=net-dialup/ppp-2.4.5-r2'`.
 * The complete build log is located at '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/work/ppp-2.4.5'
 * S: '/var/tmp/portage/net-dialup/ppp-2.4.5-r2/work/ppp-2.4.5'
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 684
Location: Billings, MT, USA

PostPosted: Mon Jul 30, 2012 8:04 pm    Post subject: Reply with quote

Here's a possible fix: http://www.city-fan.org/tips/PaulHowarth/Blog/2012-05-29
Code:
--- ppp-2.4.5/include/linux/if_pppol2tp.h
+++ ppp-2.4.5/include/linux/if_pppol2tp.h
@@ -32,6 +32,45 @@
        __u16 d_tunnel, d_session;      /* For sending outgoing packets */
 };
 
+/* Structure used to connect() the socket to a particular tunnel UDP
+ *  * socket over IPv6.
+ *   */
+struct pppol2tpin6_addr {
+       __kernel_pid_t  pid;            /* pid that owns the fd.
+                                        * 0 => current */
+       int     fd;                     /* FD of UDP socket to use */
+
+       __u16 s_tunnel, s_session;      /* For matching incoming packets */
+       __u16 d_tunnel, d_session;      /* For sending outgoing packets */
+
+       struct sockaddr_in6 addr;       /* IP address and port to send to */
+};
+

+/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
+ * bits. So we need a different sockaddr structure.
+ */
+struct pppol2tpv3_addr {
+       pid_t   pid;                    /* pid that owns the fd.
+                                        * 0 => current */
+       int     fd;                     /* FD of UDP or IP socket to use */
+
+       struct sockaddr_in addr;        /* IP address and port to send to */
+
+       __u32 s_tunnel, s_session;      /* For matching incoming packets */
+       __u32 d_tunnel, d_session;      /* For sending outgoing packets */
+};
+

+struct pppol2tpv3in6_addr {
+       __kernel_pid_t  pid;            /* pid that owns the fd.
+                                        * 0 => current */
+       int     fd;                     /* FD of UDP or IP socket to use */
+
+       __u32 s_tunnel, s_session;      /* For matching incoming packets */
+       __u32 d_tunnel, d_session;      /* For sending outgoing packets */
+
+       struct sockaddr_in6 addr;       /* IP address and port to send to */
+};
+
 /* Socket options:
  * DEBUG       - bitmask of debug message categories
  * SENDSEQ     - 0 => don't send packets with sequence numbers

The second section isn't needed due to it already being there. You do need the 1st and 3rd sections.
_________________
Router(PE1750,4GB RAM,3x36GB HDDs,2xIntel Pro/1000+GT Quad Port) | MyDT(PhmIIx3 720@3.3GHz,8GB RAM,2TB+2TB+1.5TB HDDs,GFGTX560Ti,LG BD-RE,Win7)
MyLT(Asus G53SX,32GB RAM,2x2TB HDDs,BD-RE,Intel 6230,Win7) | Wife(C2D@2.4GHz,4GB RAM,250GB HDD,DVDRW,Win7)
Back to top
View user's profile Send private message
HMC
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jul 2005
Posts: 76
Location: Australia

PostPosted: Tue Jul 31, 2012 3:50 am    Post subject: Reply with quote

File naming is a little deceptive... The link above suggests eaptls-mppe-0.99.patch when there is a very similarly named eaptls-mppe-0.991-gentoo.patch. The file to change is ppol2tpv3-2.6.35.patch

For those wondering how to do this...

1. Copy the ebuild into your local overlay.
2. Create <your_local_overlay_dir>/files/ppol2tpv3-2.6.35.patch and copy/paste the above patch.
3. Edit ebuild... remove line epatch "${WORKDIR}/patch/ppol2tpv3-2.6.35.patch" and insert epatch "${FILESDIR}/ppol2tpv3-2.6.35.patch" .
4. Run "ebuild ppp-2.4.5-r2 digest" and emerge.

It compiles fine and seems to work okay.
Back to top
View user's profile Send private message
zasdfgbnm
n00b
n00b


Joined: 06 Apr 2012
Posts: 43

PostPosted: Sun Aug 05, 2012 5:47 pm    Post subject: Reply with quote

The patch above without modification causes epatch error.
I have modified this file and the new patch file is here:
https://bugs.gentoo.org/show_bug.cgi?id=430048

Thanks for reply
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum