Ppp installation in Linux and "field 'pppol2tp 'has incomplete type" solution

Source: Internet
Author: User

Ppp installation in Linux and "field 'pppol2tp 'has incomplete type" solution

PPP official website download: https://download.samba.org/pub/ppp/

Compile:

Root @ zhaoxc-VBox:/opt/arm-tools/ppp-2.4.5 #./configure -- prefix =/opt/arm-tools/ppp-2.4.5/install-arm/

Root @ zhaoxc-VBox:/opt/arm-tools/ppp-2.4.5 # make CC = arm-none-linux-gnueabi

Root @ zhaoxc-VBox:/opt/arm-tools/ppp-2.4.5 # make install

Note 1: due to the initial compilation command. /configure -- host = arm-none-linux-gnueabi -- prefix =/opt/arm-tools/ppp-2.4.5/install-arm/actually generated Makefile does not specify the compiler, however, make uses gcc instead of arm-none-linux-gnueabi-gcc, so it cannot run on ARM. Error "pppd-sh: cannot execute binary file"

Note 2: "ppp install" error: field 'pppol2tp 'has incomplete type "error occurred during make, and then search for the cause. Find a great solution on the Internet: add the program in ppp-2.4.5/include/linux/if_pppol2tp.h as follows:

--- Ppp-2.4.5/include/linux/if_pppol2tp.h 2009-11-16 22:26:07. 000000000 + 0000

++ Ppp-2.4.5/include/linux/if_pppol2tp.h 2010-07-16 22:35:22. 000000000 + 0100

@-32, 6 + 32, 45 @@

_ 2010d_tunnel, d_session;

};

+

+ Struct pppol2tpin6_addr {

+ _ Kernel_pid_t pid;

+ Int fd;

+

+ _ 2010s_tunnel, s_session;

+ _ 2010d_tunnel, d_session;

+

+ Struct sockaddr_in6 addr;

+ };

+

+

+ Struct pppol2tpv3_addr {

+ Pid_t pid;

+ Int fd;

+

+ Struct sockaddr_in addr;

+

+ _ U32 s_tunnel, s_session;

+ _ U32 d_tunnel, d_session;

+ };

+

+ Struct pppol2tpv3in6_addr {

+ _ Kernel_pid_t pid;

+ Int fd;

+

+ _ U32 s_tunnel, s_session;

+ _ U32 d_tunnel, d_session;

+

+ Struct sockaddr_in6 addr;

+ };

+

/* Socket options:

* DEBUG-bitmask of debug message categories

* SENDSEQ-0 => don't send packets with sequence numbers

 

Copy to ARM:

After following the above make, the following four files are directly located in the directory due to an error in make install:

Chat pppd pppdump pppstats

Copy to the/usr/sbin directory of ARM

 

Create the/etc/ppp directory:

Copy files from the appropriate ppp-2.4.5 directory and create the following directory structure:

/Etc/ppp/chap-secrets

/Etc/ppp/pap-secrets

/Etc/ppp/ip-up

/Etc/ppp/ip-down

/Etc/ppp/peer/

Dial-up Internet access:

See

Reference page: https://forums.gentoo.org/viewtopic-p-7100056.html

Https://bugs.gentoo.org/attachment.cgi? Id = 320466 & action = edit

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.