[Olsr-users] OLSR 0.6 Make Error

Vigneswaran R (spam-protected)
Tue Apr 19 11:54:37 CEST 2011


On 04/19/2011 02:03 PM, Eng. Sherif Hassan wrote:
> Dear All,
>
> I am a newbie to Ubuntu.
> I would like to build and make a clean install of latest version of OLSR
> (0.6).
> I followed the readme file to install it. I started by installing all
> necessary packages (gcc, make, glibc, and makedep).
> However when I run the command make, I get the following error message:
>
> gcc -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement
> -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
> -Wsign-compare -Waggregate-return -Wmissing-noreturn
> -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations
> -Wendif-labels -Wwrite-strings -Wbad-function-cast -Wpointer-arith
> -Wcast-qual -Wshadow -Wsequence-point -Wpointer-arith -Wcast-align
> -Wnested-externs -Winline -Wdisabled-optimization
> -finline-functions-called-once -funit-at-a-time -fearly-inlining
> -finline-limit=350   -ggdb -Isrc -pthread  -DUSE_FPM -Dlinux
> -DLINUX_NETLINK_ROUTING -DDEBUG    -c -o src/unix/ifnet.o src/unix/ifnet.c
> src/unix/ifnet.c: In function ‘chk_if_up’:
> src/unix/ifnet.c:551: error: ‘tos’ undeclared (first use in this function)
> src/unix/ifnet.c:551: error: (Each undeclared identifier is reported
> only once
> src/unix/ifnet.c:551: error: for each function it appears in.)
> make: *** [src/unix/ifnet.o] Error 1
> <mailto:(spam-protected)>
> It seems that variable/identifier 'tos' is being used in function
> 'chk_if_up' before being declared before.
> I am wondering if there is a typo in the code (a line that needs to be
> uncommented for instance) or do I need to define 'tos' earlier in code.
> Does anyone else face the same problem ? did someone succeed in
> building/installing on Ubuntu 10.10 ?
> Should I go for another operating system ? Debian ?
>
> I am running Ubuntu 10.10 on mini-ITX.

Please see,

<http://lists.olsr.org/pipermail/olsr-users/2010-June/004072.html>

I also faced the same problem. After changing the following line in the 
file /usr/include/netinet/ip.h (line 197),

#define IPTOS_CLASS(class)              ((tos) & IPTOS_CLASS_MASK)

into

#define IPTOS_CLASS(class)              ((class) & IPTOS_CLASS_MASK)

it worked.

Regards,
Vignesh




More information about the Olsr-users mailing list