zebra 编译
来源:互联网 发布:淘宝设置国际转运服务 编辑:程序博客网 时间:2024/05/21 03:21
1、Linux本机下的编译
(1)、下载安装包zebra-0.95a.tar
(2)、解压到当前的目录下:tar zxf zebra-0.95a.tar
(3)、./configure
[root@localhost zebra-0.95a]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
........................................
zebra configuration
-------------------
zebra version : 0.95a
host operationg system : linux-gnu
source code location : .
compiler : gcc
compiler flags : -g -O2 -Wall
link libraries : -lm -lcrypt
directory for pid files : /var/run
[root@localhost zebra-0.95a]#
(4)、make
(5)、make install
[root@localhost zebra-0.95a]# cd /usr/local/sbin/
[root@localhost sbin]# ls
bgpd ospf6d ospfd ripd ripngd zebra
[root@localhost sbin]#
(6)、cd /usr/local/etc
[root@localhost etc]# cd /usr/local/etc/
[root@localhost etc]# ls
bgpd.conf.sample bgpd.conf.sample2 ospf6d.conf.sample ospfd.conf.sample ripd.conf.sample ripngd.conf.sample zebra.conf zebra.conf.sample
[root@localhost etc]#
(7)、cp zebra.conf.sample zebra.conf
完成安装
2、在P2020的环境下编译
(1)、查看编译环境
[root@localhost zebra-0.95a]# powerpc-none-linux-gnuspe-gcc -v
Using built-in specs.
Target: powerpc-none-linux-gnuspe
Configured with: ../gcc-4.3.2/configure --target=powerpc-none-linux-gnuspe --host=i686-pc-linux-gnu --prefix=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe --with-sysroot=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/powerpc-none-linux-gnuspe/libc --disable-libssp --disable-libmudflap --disable-libstdcxx-pch --enable-libgomp --enable-shared --enable-threads --enable-languages=c,c++ --with-gmp=/usr/src/redhat/BUILD/csl-tc-4.3.74/host-libs/usr --with-mpfr=/usr/src/redhat/BUILD/csl-tc-4.3.74/host-libs/usr --with-cpu=8548 --with-gnu-as --with-gnu-ld --enable-symvers=gnu --enable-__cxa_atexit --enable-cxx-flags=-mcpu=8548 --disable-multilib --with-long-double-128 --disable-nls --enable-e500_double
Thread model: posix
gcc version 4.3.2 (GCC)
[root@localhost zebra-0.95a]#
(2)、带编译环境进行编译
./configure --host=powerpc-none-linux-gnuspe --prefix=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe
(3)、make install安装
[root@localhost sbin]# pwd
/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/sbin
[root@localhost sbin]# ls
bgpd ospf6d ospfd ripd ripngd zebra
[root@localhost sbin]#
[root@localhost etc]# pwd
/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/etc
[root@localhost etc]# ls
bgpd.conf.sample bgpd.conf.sample2 ospf6d.conf.sample ospfd.conf.sample ripd.conf.sample ripngd.conf.sample zebra.conf.sample
[root@localhost etc]#
安装完成
3、遇到问题
(1)、问题: dereferencing pointer to incomplete type
描述:
rtadv.c:123: error: dereferencing pointer to incomplete type
rtadv.c:124: error: dereferencing pointer to incomplete type
rtadv.c:124: error: dereferencing pointer to incomplete type
解决:
打开zebra-0.95a/lib/zebra.h文件,
定位到103行,添加如下内容,即可解决。
#ifdef GNU_LINUX
#define __USE_GNU
#endif
(2)、Relocations in generic ELF (EM: 3)
描述: Relocations in generic ELF (EM: 3)
解决:make clean -w ,然后make
- zebra 编译
- Zebra
- Zebra Crossing(ZXing) :核心码编译
- zebra和Linux内核编译及运行方法
- zebra使用手册
- Zebra配置
- Zebra路由器
- Zebra资源
- 路由软件 zebra-0.95a 在linux下面编译出现问题的解决
- 路由软件 zebra-0.95a 在linux下面编译出现问题的解决(error: dereferencing pointer to incomplete type)
- 路由软件 zebra-0.95a 在linux下面编译出现问题的解决(error: dereferencing pointer to incomplete type)
- Zebra基本配置
- Zebra基本配置
- Zebra安装及配置
- 嵌入式linux路由zebra
- zebra代码简单分析
- zebra 的Thread机制
- zebra介绍和安装
- 二叉树的递归遍历和非递归(循环)遍历实现
- C# 串口操作系列(5)--通讯库雏形
- Android 使用开源库StickyGridHeaders来实现带sections和headers的GridView显示本地图片效果
- 好记性不如烂笔头72-多线程-虚假多线程
- C语言 杨辉三角
- zebra 编译
- Android在任何情况下显示和隐藏输入法软键盘
- sqlite3 网站
- hdu 1018 Big Number(对数的性质)
- Linux下的nginx启动、重新启动
- iOS中源码文件的编译和链接
- 字符串分割--java中String.split()用法
- 内存映射文件
- 观察者模式