Quagga 移植

Quagga 移植文章目录一 Quagga 编译的依赖包二先交叉编译三个依赖包三编译 Quagga 一 Quagga 编译的依赖包 libcareslibn 其中 libreadline 是需要 libncurses 支持的 如果没有 ncurses 在编译 quagga 时会出现如下错误 libreadline so undefinedref PC

一 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/”目录下

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/198213.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月26日 下午3:33
下一篇 2026年3月26日 下午3:34


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号