# ppp install "error: field ‘pppol2tp’ has incomplete type"

## zasdfgbnm

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]

```
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'

```

----------

## Simba7

Here's a possible fix: http://www.city-fan.org/tips/PaulHowarth/Blog/2012-05-29

```
--- 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.

----------

## HMC

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.

----------

## zasdfgbnm

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

----------

