今天在CentOS 5 下编译遇到错误:
In file included from babel_zebra.c:48:
xroute.h:55: warning: ‘struct prefix_ipv6’ declared inside parameter list
xroute.h:55: warning: its scope is only this definition or declaration,
which is probably not what you want
xroute.h:55: warning: ‘struct zapi_ipv6’ declared inside parameter list
xroute.h:57: warning: ‘struct prefix_ipv6’ declared inside parameter list
xroute.h:57: warning: ‘struct zapi_ipv6’ declared inside parameter list
babel_zebra.c: In function ‘babel_zebra_read_ipv6’:
babel_zebra.c:89: error: storage size of ‘api’ isn’t known
babel_zebra.c:92: error: storage size of ‘prefix’ isn’t known
babel_zebra.c:97: error: invalid application of ‘sizeof’ to incomplete type
‘struct zapi_ipv6’
babel_zebra.c:98: error: invalid application of ‘sizeof’ to incomplete type
‘struct prefix_ipv6’
babel_zebra.c:92: warning: unused variable ‘prefix’
babel_zebra.c:89: warning: unused variable ‘api’
make[2]: *** [babel_zebra.o] Error 1
make[2]: Leaving directory `/usr/local/src/quagga-0.99.22/babeld'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/quagga-0.99.22'
make: *** [all] Error 2
发现都是和IPv6有关的,由于用不到IPv6路由,所以在configure的时候,需要把与IPv6有关的选项禁用,
使用编译选项:./configure --enable-user=root --enable-group=root --disable-ipv6 --disable-babeld --prefix=/usr/local/qugga-0.99.22
然后再make、make install 就可以正常安装,具体可以参见过得邮件列表,
1. https://dev.openwrt.org/ticket/11857
2. http://www.gossamer-threads.com/lists/quagga/users/24571?do=post_view_threaded