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可执行程序,但放到板子上运行之后,总是出现如下的错误。
总是报错:
[cc lang=”php”]
# pppd
pppd: can’t resolve symbol ‘__ctype_b_loc’
~ # pppd –help
pppd: can’t resolve symbol ‘__ctype_b_loc’
~ #
[/cc]
4、__ctype_b_loc这个symbol到底是什么东西?
原来,代码有问题,把所有ppp-2.4.7/pppd目录下的源代码里面的#include <ctype.h>注释掉,重新编译,出来的pppd就可以完美运行了,chat源代码也按照pppd的方法如法炮制。
[cc lang=”php”]
/usr/sbin # pppd –help
pppd version 2.4.7
Usage: pppd [ options ], where options are:
Communicate over the named device
Set the baud rate to
: Set the local and/or remote interface IP
addresses. Either one may be omitted.
asyncmap Set the desired async map to hex
auth Require authentication from peer
connect
Invoke shell command
to set up the serial line
crtscts Use hardware RTS/CTS flow control
defaultroute Add default route through interface
file Take options from file
modem Use modem control lines
mru Set MRU value to for negotiation
See pppd(8) for more options
[/cc]
原创文章,作者:老D,如若转载,请注明出处:https://laod.cn/2552.html