免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1322 | 回复: 3

淘宝集成FullNAT功能的ipvsadm,编译错误求助 [复制链接]

论坛徽章:
0
发表于 2016-06-06 15:33 |显示全部楼层
淘宝集成FullNAT功能的ipvsadm ( nat-synproxy.tar.gz), 已经使用YUM安装了libnl ,libnl-devel, popt, popt-devel, popt-static,

在编译ipvsadm的时候,老是提示下面的错误。 哪位大侠知道怎么处理啊



gcc -Wall -Wunused -Wstrict-prototypes -g -o ipvsadm ipvsadm.o config_stream.o dynamic_array.o /home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a -lpopt
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_timeout_parse_cb':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1279: undefined reference to `nlmsg_hdr'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1283: undefined reference to `genlmsg_parse'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1287: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1289: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1291: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_getinfo_parse_cb':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:157: undefined reference to `nlmsg_hdr'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:160: undefined reference to `genlmsg_parse'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:167: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:168: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_daemon_parse_cb':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1331: undefined reference to `nlmsg_hdr'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1341: undefined reference to `genlmsg_parse'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1344: undefined reference to `nla_parse_nested'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1353: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1354: undefined reference to `nla_get_string'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1357: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_nl_fill_service_attr':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:222: undefined reference to `nla_nest_start'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:226: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:231: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:232: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:233: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:236: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o):/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:238: more undefined references to `nla_put' follow
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_nl_fill_service_attr':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:243: undefined reference to `nla_nest_end'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:229: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_nl_fill_laddr_attr':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:514: undefined reference to `nla_nest_start'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:518: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:520: undefined reference to `nla_nest_end'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_nl_fill_dest_attr':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:403: undefined reference to `nla_nest_start'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:407: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:408: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:409: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:410: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:411: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o):/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:412: more undefined references to `nla_put' follow
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_nl_fill_dest_attr':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:414: undefined reference to `nla_nest_end'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_parse_stats':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:682: undefined reference to `nla_parse_nested'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:697: undefined reference to `nla_get_u64'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:698: undefined reference to `nla_get_u64'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:699: undefined reference to `nla_get_u64'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:700: undefined reference to `nla_get_u64'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:701: undefined reference to `nla_get_u64'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:702: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:703: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:704: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:705: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:706: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_services_parse_cb':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:714: undefined reference to `nlmsg_hdr'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:722: undefined reference to `genlmsg_parse'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:728: undefined reference to `nla_parse_nested'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:744: undefined reference to `nla_get_u16'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:747: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:755: undefined reference to `nla_get_string'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:760: undefined reference to `nla_get_string'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:764: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:765: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:766: undefined reference to `nla_memcpy'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:749: undefined reference to `nla_get_u16'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:750: undefined reference to `nla_data'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:752: undefined reference to `nla_get_u16'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_dests_parse_cb':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:887: undefined reference to `nlmsg_hdr'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:894: undefined reference to `genlmsg_parse'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:900: undefined reference to `nla_parse_nested'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:917: undefined reference to `nla_data'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:919: undefined reference to `nla_get_u16'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:920: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:921: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:922: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:923: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:924: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o):/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:925: more undefined references to `nla_get_u32' follow
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_laddrs_parse_cb':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:943: undefined reference to `nlmsg_hdr'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:950: undefined reference to `genlmsg_parse'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:957: undefined reference to `nla_parse_nested'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:970: undefined reference to `nla_data'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:972: undefined reference to `nla_get_u64'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:973: undefined reference to `nla_get_u32'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_nl_send_message':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:84: undefined reference to `nl_handle_alloc'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:90: undefined reference to `genl_connect'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:93: undefined reference to `genl_ctrl_resolve'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:104: undefined reference to `nl_socket_modify_cb'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:107: undefined reference to `nl_send_auto_complete'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:110: undefined reference to `nl_recvmsgs_default'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:113: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:115: undefined reference to `nl_handle_destroy'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:120: undefined reference to `nl_handle_destroy'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:122: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:99: undefined reference to `nl_handle_destroy'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:86: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_nl_message':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:65: undefined reference to `nlmsg_alloc'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:69: undefined reference to `genlmsg_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_get_service':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1248: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_get_dests':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1113: undefined reference to `nla_nest_start'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1117: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1120: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1128: undefined reference to `nla_nest_end'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1122: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1123: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1125: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1135: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_get_laddrs':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1013: undefined reference to `nla_nest_start'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1017: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1020: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1028: undefined reference to `nla_nest_end'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1022: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1023: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1025: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:1035: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_stop_daemon':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:656: undefined reference to `nla_nest_start'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:660: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:661: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:662: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:664: undefined reference to `nla_nest_end'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:669: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_start_daemon':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:624: undefined reference to `nla_nest_start'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:628: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:629: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:630: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:632: undefined reference to `nla_nest_end'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:637: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_set_timeout':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:599: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:600: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:601: undefined reference to `nla_put'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:605: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_del_laddr':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:575: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_add_laddr':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:544: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_del_dest':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:496: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o): In function `ipvs_update_dest':
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:467: undefined reference to `nlmsg_free'
/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.a(libipvs.o):/home/pukong/tools/keepalived/keepalived/libipvs-2.6/libipvs.c:437: more undefined references to `nlmsg_free' follow
collect2: ld returned 1 exit status
make: *** [ipvsadm] Error 1









[root@localhost ipvsadm]# rpm -qa | grep libnl
libnl3-cli-3.2.21-8.el6.x86_64
libnl-devel-1.1.4-2.el6.x86_64
libnl3-3.2.21-8.el6.x86_64
libnl3-devel-3.2.21-8.el6.x86_64
libnl-1.1.4-2.el6.x86_64
libnl3-doc-3.2.21-8.el6.x86_64


已经安装了libnl*, 但是还是出错

论坛徽章:
0
发表于 2016-06-06 15:39 |显示全部楼层
[root@localhost src]# ll
total 8
drwxr-xr-x. 2 root root 4096 Sep 23  2011 debug
drwxr-xr-x. 3 root root 4096 Jun  3 15:45 kernels
lrwxrwxrwx. 1 root root   39 Jun  3 15:49 linux -> /usr/src/kernels/2.6.32-220.el6.x86_64/



已经做了LN-S 到 /usr/src/linux

论坛徽章:
0
发表于 2016-06-09 12:08 |显示全部楼层
本帖最后由 zonyes 于 2016-06-14 10:38 编辑

666666666666666666666

论坛徽章:
36
IT运维版块每日发帖之星
日期:2016-04-10 06:20:00IT运维版块每日发帖之星
日期:2016-04-16 06:20:0015-16赛季CBA联赛之广东
日期:2016-04-16 19:59:32IT运维版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-19 06:20:00每日论坛发贴之星
日期:2016-04-19 06:20:00IT运维版块每日发帖之星
日期:2016-04-25 06:20:00IT运维版块每日发帖之星
日期:2016-05-06 06:20:00IT运维版块每日发帖之星
日期:2016-05-08 06:20:00IT运维版块每日发帖之星
日期:2016-05-13 06:20:00IT运维版块每日发帖之星
日期:2016-05-28 06:20:00每日论坛发贴之星
日期:2016-05-28 06:20:00
发表于 2016-06-12 15:58 |显示全部楼层
回复 1# zonyes

感觉你这是头文件没有引用对吧。大量的 undefined reference


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

SACC2019中国系统架构师大会

【数字转型 架构演进】SACC2019中国系统架构师大会,7折限时优惠重磅来袭!
2019年10月31日~11月2日第11届中国系统架构师大会(SACC2019)将在北京隆重召开。四大主线并行的演讲模式,1个主会场、20个技术专场、超千人参与的会议规模,100+来自互联网、金融、制造业、电商等领域的嘉宾阵容,将为广大参会者提供一场最具价值的技术交流盛会。

限时七折期:2019年8月31日前


----------------------------------------

大会官网>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP