pppd arm linux 3.10 无法运行

来源:互联网 发布:厦门管家婆软件代理商 编辑:程序博客网 时间:2024/05/13 01:25

为了验证SIMcom的3G模块在linux能实现拨号上网,所以要用到pppd拨号程序,但是使用过程中遇到如下问题:

本文:http://blog.csdn.net/code_style/article/details/52402072

1、编译ppp-2.4.7.tar.gz,针对嵌入式linux平台;

2、按照网上的方法无非是如下:

1) 把ppp的源码解开

   tar zxvf ppp-2.4.5.tar.gz

2) 进入ppp-2.4.5/pppd目录

    修改Makefile.linux

    设置 CC = /usr/local/arm/3.4.1/bin/arm-linux-gcc

3) make -f Makefile.linux  即可编译出pppd

4) 同样进入ppp-2.4.5/chat目录, 并设置

CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc

5)  make -f Makefile.linux  即可编译出chat


3、按照上面的方法编译出来的pppd可执行程序,但放到板子上运行之后,总是出现如下的错误。

总是报错:

<span style="font-size:14px;"> # pppdpppd: can't resolve symbol '__ctype_b_loc'~ # pppd --helppppd: can't resolve symbol '__ctype_b_loc'~ #</span>

4、__ctype_b_loc这个symbol到底是什么东西?

原来,代码有问题,把所有ppp-2.4.7/pppd目录下的源代码里面的#include <ctype.h>注释掉,重新编译,出来的pppd就可以完美运行了,chat源代码也按照pppd的方法如法炮制。


5、好,完美运行了,一点错误也没有

/usr/sbin # pppd --help
pppd version 2.4.7
Usage: pppd [ options ], where options are:
        <device>        Communicate over the named device
        <speed>         Set the baud rate to <speed>
        <loc>:<rem>     Set the local and/or remote interface IP
                        addresses.  Either one may be omitted.
        asyncmap <n>    Set the desired async map to hex <n>
        auth            Require authentication from peer
        connect <p>     Invoke shell command <p> to set up the serial line
        crtscts         Use hardware RTS/CTS flow control
        defaultroute    Add default route through interface
        file <f>        Take options from file <f>
        modem           Use modem control lines
        mru <n>         Set MRU value to <n> for negotiation
See pppd(8) for more options



0 0
原创粉丝点击