Quagga 移植

一 Quagga 编译的依赖包

  • libcares
  • libncurses
  • libreadline
    其中libreadline是需要libncurses支持的,如果没有ncurses,在编译quagga时会出现如下错误
     **/libreadline.so: undefined reference to `PC'
     **/libreadline.so: undefined reference to `tgetflag' 
     **/libreadline.so: undefined reference to `tgetent' 
     **/libreadline.so: undefined reference to `UP' 
     **/libreadline.so: undefined reference to `tputs' 
     **/libreadline.so: undefined reference to `tgoto' 
     **/libreadline.so: undefined reference to `tgetnum' 
     **/libreadline.so: undefined reference to `BC' 
     **/libreadline.so: undefined reference to `tgetstr' 
    

二 先交叉编译三个依赖包

  • libcares
    anzye@anzye:c-ares-1.15.0$ ./configure --host=arm-linux --prefix=/opt/arm_lib
    anzye@anzye:c-ares-1.15.0$ make && make install
    
  • libncurses
    anzye@anzye:ncurses-6.1$ ./configure --host=arm-linux  --prefix=/opt/arm_lib --with-shared
    anzye@anzye:ncurses-6.1$ make && make install
    
  • libreadline
    说明:如果是readline-6.3版 ,配置时要加上bash_cv_wcwidth_broken=yes一项,或注释掉configure中的对应报错项,否则报错。如下
    anzye@anzye:readline-6.3$ ./configure --host=arm-linux --prefix=/opt/arm_lib
    *** ***
    checking for wcwidth broken with unicode combining characters... 
    configure: error: in `/.../readline-6.3': configure: error: cannot run test program while cross compiling
    anzye@anzye:readline-6.3$ ./configure --host=arm-linux --prefix=/opt/arm_lib bash_cv_wcwidth_broken=yes
    anzye@anzye:readline-6.3$ make && make install
    
    or
    anzye@anzye:readline-7.0$ ./configure --host=arm-linux --prefix=/opt/arm_lib
    anzye@anzye:readline-7.0$ make && make install
    

三 编译Quagga

anzye@anzye:quagga-1.2.4$./configure \
	--prefix=`pwd`/install \
	--host=arm-linux \
	--disable-doc \
	--enable-static=no \
	--enable-user=root \
	--enable-group=root \
	--enable-vty-group=root \
	CFLAGS=-L/opt/arm_lib/lib \
	CPPFLAGS=-I/opt/arm_lib/include
anzye@anzye:c-ares-1.15.0$ make && make install

不指明“CFLAGS=-L/opt/arm_lib/lib\ CPPFLAGS=-I/opt/arm_lib/include”会报找不到头文件或库,因为上面编译安装的都在“/opt/arm_lib/”目录下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值