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

标签 c linux git networking protocols

我正在尝试在 Raspberry pi 上安装 AODV 协议(protocol)。当我尝试执行“make”时,从“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: In function neighbor_add': /home/pi/aodv-uu/aodv_neighbor.c:68: undefined reference tohello_update_timeout' aodv_timeout.o: In function route_discovery_timeout': /home/pi/aodv-uu/aodv_timeout.c:98: undefined reference tort_table_update_timeout' aodv_rreq.o: In function rreq_route_discovery': /home/pi/aodv-uu/aodv_rreq.c:460: undefined reference tort_table_update_timeout' aodv_rreq.o: In function rreq_local_repair': /home/pi/aodv-uu/aodv_rreq.c:521: undefined reference tort_table_update_timeout' aodv_rrep.o: In function rrep_forward': /home/pi/aodv-uu/aodv_rrep.c:231: undefined reference tort_table_update_timeout' nl.o: In function nl_kaodv_callback': /home/pi/aodv-uu/nl.c:282: undefined reference tort_table_update_timeout' collect2: error: ld returned 1 exit status Makefile:112: recipe for target 'aodvd' failed make: *** [aodvd] Error 1

最佳答案

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

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

您可以通过打开 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 文件。

关于c - 在 Raspberry pi 上安装 AODV 协议(protocol) (https ://github. com/erimatnor/aodv-uu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47657744/

相关文章:

c - AtMega16 LED立方体

c - strcmp 的段错误(核心转储)错误

linux - 使用 $ 将参数传递给 Bash 和 awk,引用了错误的东西

linux - 如何杀死Linux中的特定进程?

linux - sed 命令 sed 's///' 和 sed "s###"的区别

c - 使用 gsl 编写 Runge-Kutta ODE 求解器

python - 在 Python 脚本中获取当前的 git 哈希

svn - 用于二进制文件的 Git 或 Subversion

GitFlow : Properly Testing Release Branches & Master

c - 关于指针的前向引用?