在Raspberry pi上安装AODV协议(https://github.com/erimatnor/aodv-uu)

时间:2017-12-05 15:58:27

标签: c linux git networking protocols

我正在尝试在Raspberry pi上安装AODV协议。从“https://github.com/erimatnor/aodv-uu”完成git clone后,当我尝试“make”时,我得到了以下错误。期待你的建议。谢谢!

  

请   gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -o aodvd main.o list.o debug.o timer_queue.o aodv_socket.o aodv_hello.o aodv_neighbor.o aodv_timeout.o routing_table.o seek_list.o aodv_rreq.o aodv_rrep .o aodv_rerr.o nl.o locality.o   aodv_neighbor.o:在函数neighbor_add': /home/pi/aodv-uu/aodv_neighbor.c:68: undefined reference to中hello_update_timeout'   aodv_timeout.o:在函数route_discovery_timeout': /home/pi/aodv-uu/aodv_timeout.c:98: undefined reference to rt_table_update_timeout'中   aodv_rreq.o:在函数rreq_route_discovery': /home/pi/aodv-uu/aodv_rreq.c:460: undefined reference to rt_table_update_timeout'中   aodv_rreq.o:在函数rreq_local_repair': /home/pi/aodv-uu/aodv_rreq.c:521: undefined reference to rt_table_update_timeout'中   aodv_rrep.o:在函数rrep_forward': /home/pi/aodv-uu/aodv_rrep.c:231: undefined reference to rt_table_update_timeout'中   nl.o:在函数nl_kaodv_callback': /home/pi/aodv-uu/nl.c:282: undefined reference to rt_table_update_timeout'中   collect2:错误:ld返回1退出状态   Makefile:112:目标'aodvd'的配方失败   make:*** [aodvd]错误1

1 个答案:

答案 0 :(得分:0)

sourceforge提供的代码与github上的代码相同。如果您下载存档,您将看到2010年任何文件的最新修改日期。鉴于此代码的年龄,我不会惊讶地发现事情根本不起作用。

但是,这是您的问题的快速解决方法。根本原因似乎是问题函数(如rt_table_update_timeout)被声明为inline,但该信息似乎在构建过程中的某处丢失,以致其他目标文件试图将这些信息引用为非内联函数。

您可以通过打开defs.h来寻找此行来避免这种情况:

#define NS_INLINE inline                                                      

并将其替换为:

#define NS_INLINE

这将允许aodvd正确编译(make aodvd)。在我的系统上,内核模块随后将无法编译:

cc1: fatal error: /lib/modules/4.13.15-100.fc25.x86_64/build/include/linux/modversions.h: No such file or directory

据我所知,现代Linux内核不再生成modversions.h文件。