I`m trying to compile some code, as per the instructions I need to have the linux headers on my machine, so I ran this code
Code:vm001@vm001-VirtualBox:~$ uname -r 3.2.0-29-generic-pae vm001@vm001-VirtualBox:~$ sudo apt-get install linux-headers-$(uname -r) [sudo] password for vm001: Reading package lists... Done Building dependency tree Reading state information... Done linux-headers-3.2.0-29-generic-pae is already the newest version. linux-headers-3.2.0-29-generic-pae set to manually installed. The following packages were automatically installed and are no longer required: ruby1.8 ruby libruby1.8 libreadline5 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 455 not upgraded.
I hope this means all my headers are already available, Isn`t it ?
As the next step I tried to compile the code
Ignoring the warnings, leaves me with just one error (the one that I have highlighted above).Code:vm001@vm001-VirtualBox:~/Downloads/aodv-uu-0.9.6$ make gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o main.o main.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o list.o list.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o debug.o debug.c debug.c: In function ‘print_rt_table’: debug.c:349:13: warning: variable ‘written’ set but not used [-Wunused-but-set-variable] gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o timer_queue.o timer_queue.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o aodv_socket.o aodv_socket.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o aodv_hello.o aodv_hello.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o aodv_neighbor.o aodv_neighbor.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o aodv_timeout.o aodv_timeout.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o routing_table.o routing_table.c routing_table.c: In function ‘rt_table_insert’: routing_table.c:92:17: warning: variable ‘nm’ set but not used [-Wunused-but-set-variable] routing_table.c: In function ‘rt_table_update’: routing_table.c:196:17: warning: variable ‘nm’ set but not used [-Wunused-but-set-variable] gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o seek_list.o seek_list.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o aodv_rreq.o aodv_rreq.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o aodv_rrep.o aodv_rrep.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o aodv_rerr.o aodv_rerr.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o nl.o nl.c gcc -Wall -O3 -g -DDEBUG -DCONFIG_GATEWAY -DDEBUG -c -o locality.o locality.c 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 make -C /home/vm001/Downloads/aodv-uu-0.9.6/lnx KERNEL_DIR=/lib/modules/3.2.0-29-generic-pae/build KCC=gcc XDEFS=-DDEBUG make[1]: Entering directory `/home/vm001/Downloads/aodv-uu-0.9.6/lnx' gcc -Wall -Wno-strict-aliasing -O2 -D__KERNEL__ -DMODULE -nostdinc -DMODVERSIONS -include /lib/modules/3.2.0-29-generic-pae/build/include/linux/modversions.h -I /usr/lib/gcc/i686-linux-gnu/4.6/include -I/lib/modules/3.2.0-29-generic-pae/build/include -DDEBUG -c -o kaodv-mod.o kaodv-mod.c cc1: fatal error: /lib/modules/3.2.0-29-generic-pae/build/include/linux/modversions.h: No such file or directory compilation terminated. make[1]: *** [kaodv-mod.o] Error 1 make[1]: Leaving directory `/home/vm001/Downloads/aodv-uu-0.9.6/lnx' make: *** [kaodv] Error 2
I`m not able to fix it, pls help me.
Thanks in advance.
P.S: If you want to know what code I`m trying to compile pls look at this link http://sourceforge.net/projects/aodvuu/
Bookmarks