https://github.com/bilibili/mtr
git clone https://github.com/bilibili/mtr.git
yum install -y automake ncurses-devel json-c-devel libasan
cd mtr && rm -rf ipdb-c && git clone https://github.com/ipipdotnet/ipdb-c.git
./bootstrap.sh
./configure –without-gtk –disable-ipv6 –with-ipdotnet
make
到这报错说:
make[1]: 进入目录“/root/mtr” CC ui/mtr-mtr.o CC ui/mtr-net.o CC ui/mtr-cmdpipe.o CC ui/mtr-dns.o CC ui/mtr-raw.o CC ui/mtr-split.o CC ui/mtr-display.o CC ui/mtr-report.o CC ui/mtr-select.o CC ui/mtr-utils.o CC ui/mtr-asn.o CC ui/mtr-curses.o ui/curses.c: 在函数‘mtr_curses_hosts’中: ui/curses.c:474:49: 警告说:未使用的变量‘itype’ [-Wunused-variable] int icountry,iprovince,icity,idistrict,iisp,itype,idesc; ^ ui/curses.c:474:34: 警告说:未使用的变量‘idistrict’ [-Wunused-variable] int icountry,iprovince,icity,idistrict,iisp,itype,idesc; ^ ui/curses.c:473:51: 警告说:未使用的变量‘type’ [-Wunused-variable] char *country,*province,*city,*district,*isp,*type,*desc; ^ ui/curses.c:473:36: 警告说:未使用的变量‘district’ [-Wunused-variable] char *country,*province,*city,*district,*isp,*type,*desc; ^ ui/curses.c: 在函数‘mtr_curses_redraw’中: ui/curses.c:581:31: 警告说:此函数中的‘idesc’在使用前可能未初始化 [-Wmaybe-uninitialized] if (idesc > 0 && desc) { ^ ui/curses.c:474:55: 附注说:‘idesc’在此声明 int icountry,iprovince,icity,idistrict,iisp,itype,idesc; ^ ui/curses.c:577:30: 警告说:此函数中的‘iisp’在使用前可能未初始化 [-Wmaybe-uninitialized] if (iisp > 0 && isp) { ^ ui/curses.c:474:44: 附注说:‘iisp’在此声明 int icountry,iprovince,icity,idistrict,iisp,itype,idesc; ^ ui/curses.c:568:35: 警告说:此函数中的‘icity’在使用前可能未初始化 [-Wmaybe-uninitialized] if (icity > 0 && city && (iprovince != icity || strncmp(province, city, icity) != 0)) { ^ ui/curses.c:474:28: 附注说:‘icity’在此声明 int icountry,iprovince,icity,idistrict,iisp,itype,idesc; ^ ui/curses.c:561:39: 警告说:此函数中的‘iprovince’在使用前可能未初始化 [-Wmaybe-uninitialized] if (iprovince > 0 && province) { ^ ui/curses.c:474:18: 附注说:‘iprovince’在此声明 int icountry,iprovince,icity,idistrict,iisp,itype,idesc; ^ ui/curses.c:550:51: 警告说:此函数中的‘icountry’在使用前可能未初始化 [-Wmaybe-uninitialized] biliip_last += sprintf(biliip_last, “%.*s”, icountry, country); ^ ui/curses.c:474:9: 附注说:‘icountry’在此声明 int icountry,iprovince,icity,idistrict,iisp,itype,idesc; ^ ui/curses.c:581:35: 警告说:此函数中的‘desc’在使用前可能未初始化 [-Wmaybe-uninitialized] if (idesc > 0 && desc) { ^ ui/curses.c:473:57: 附注说:‘desc’在此声明 char *country,*province,*city,*district,*isp,*type,*desc; ^ ui/curses.c:577:34: 警告说:此函数中的‘isp’在使用前可能未初始化 [-Wmaybe-uninitialized] if (iisp > 0 && isp) { ^ ui/curses.c:473:46: 附注说:‘isp’在此声明 char *country,*province,*city,*district,*isp,*type,*desc; ^ ui/curses.c:568:39: 警告说:此函数中的‘city’在使用前可能未初始化 [-Wmaybe-uninitialized] if (icity > 0 && city && (iprovince != icity || strncmp(province, city, icity) != 0)) { ^ ui/curses.c:473:30: 附注说:‘city’在此声明 char *country,*province,*city,*district,*isp,*type,*desc; ^ ui/curses.c:561:43: 警告说:此函数中的‘province’在使用前可能未初始化 [-Wmaybe-uninitialized] if (iprovince > 0 && province) { ^ ui/curses.c:473:20: 附注说:‘province’在此声明 char *country,*province,*city,*district,*isp,*type,*desc; ^ ui/curses.c:550:51: 警告说:此函数中的‘country’在使用前可能未初始化 [-Wmaybe-uninitialized] biliip_last += sprintf(biliip_last, “%.*s”, icountry, country); ^ ui/curses.c:473:11: 附注说:‘country’在此声明 char *country,*province,*city,*district,*isp,*type,*desc; ^ CC ipdb-c/mtr-ipdb.o ipdb-c/ipdb.c: 在函数‘parse_meta_data’中: ipdb-c/ipdb.c:40:5: 错误说:只允许在 C99 模式下使用‘for’循环初始化声明 for (int i = 0; i < meta_data->fields_length; ++i) { ^ ipdb-c/ipdb.c:40:5: 附注说:使用 -std=c99 或 -std=gnu99 来编译您的代码 ipdb-c/ipdb.c:50:14: 错误说:‘i’重定义 for (int i = 0; i < meta_data->language_length; ++i) { ^ ipdb-c/ipdb.c:40:14: 附注说:‘i’的上一个定义在此 for (int i = 0; i < meta_data->fields_length; ++i) { ^ ipdb-c/ipdb.c:50:5: 错误说:只允许在 C99 模式下使用‘for’循环初始化声明 for (int i = 0; i < meta_data->language_length; ++i) { ^ ipdb-c/ipdb.c: 在函数‘ipdb_reader_new’中: ipdb-c/ipdb.c:101:5: 错误说:只允许在 C99 模式下使用‘for’循环初始化声明 for (int i = 0; i < 96 && node < rd->meta->node_count; ++i) { ^ ipdb-c/ipdb.c: 在函数‘ipdb_reader_free’中: ipdb-c/ipdb.c:117:9: 错误说:只允许在 C99 模式下使用‘for’循环初始化声明 for (int i = 0; i < meta_data->fields_length; ++i) { ^ ipdb-c/ipdb.c: 在函数‘ipdb_search’中: ipdb-c/ipdb.c:164:5: 错误说:只允许在 C99 模式下使用‘for’循环初始化声明 for (int i = 0; i < bit_count; ++i) { ^ ipdb-c/ipdb.c: 在函数‘ipdb_find1’中: ipdb-c/ipdb.c:210:5: 错误说:只允许在 C99 模式下使用‘for’循环初始化声明 for (int i = 0; i < reader->meta->language_length; ++i) { ^ make[1]: *** [ipdb-c/mtr-ipdb.o] 错误 1 make[1]: 离开目录“/root/mtr” make: *** [all] 错误 2
这么好的工具,谁能解决下~
|
评论前必须登录!
注册