[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Having problems compiling cmu exten to ns
You might want to take a look at
NS INSTALLATION PROBLEMS page http://www.isi.edu/nsnam/ns/ns-problems.html
(and search for random)
and have you tried to use the latest version of ns? (since this problem
was reported in ns-2.1b4)
Kun-chan Lan
On Thu, 25 Jan 2001, wooighee wrote:
> Hello,
>
> I'm currently trying to build the cmu extensions to ns but I'm running into
> these problems. At first, I had the following error:
>
> In file included from random.h:40,
> from random.cc:42:
> config.h:50: conflicting types for `typedef signed char int8_t'
> /usr/include/sys/int_types.h:62: previous declaration as `typedef char
> int8_t'
> random.cc:45: declaration of C function `int srandom(...)' conflicts with
> /usr/include/stdlib.h:182: previous declaration `void srandom(unsigned
> int)'
> here
> make: *** [random.o] Error 1
>
> Mr. Nitin Nagar suggested that I comment out the srandom in random.cc , and
> then replace the config.h file with the ns-2's own config.h.
>
> That did, in fact, correct the above errors (thanks Nagar), but now I get
> another error in the same vein:
>
> c++ -c -I. -I./cmu -I./cmu/dsr -I./cmu/dsdv -I/usr/local/include -I/usr/loca
> l/GNU/include/g++ -I/usr/local/GNU/sparc-sun-solaris2.5/include -I/usr/local
> /GNU/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2.3/include/sys -I../TclCL -I../ot
> cl -I/home/thames/wooighee/simu1/ns-allinone-2.1b3/ns-src/../tk8.0/generic -
> I../tcl8.0/generic -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -mv8 -msupersparc
> -D__svr4__ -DUSE_SHM -DHAVE_LIBTCLCL1_0B5 -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A
> 2 -DHAVE_OTCL_H -DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LIBTCL8_0 -DHAVE_TCL_H -D
> abort=_ABORT -DMONARCH -g -Wall -o random.o random.cc
> c++ -c -I. -I./cmu -I./cmu/dsr -I./cmu/dsdv -I/usr/local/include -I/usr/loca
> l/GNU/include/g++ -I/usr/local/GNU/sparc-sun-solaris2.5/include -I/usr/local
> /GNU/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2.3/include/sys -I../TclCL -I../ot
> cl -I/home/thames/wooighee/simu1/ns-allinone-2.1b3/ns-src/../tk8.0/generic -
> I../tcl8.0/generic -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -mv8 -msupersparc
> -D__svr4__ -DUSE_SHM -DHAVE_LIBTCLCL1_0B5 -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A
> 2 -DHAVE_OTCL_H -DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LIBTCL8_0 -DHAVE_TCL_H -D
> abort=_ABORT -DMONARCH -g -Wall -o rng.o rng.cc
>
> rng.cc:53: declaration of C function `int gettimeofday(struct timeval *,
> struct timezone *)' conflicts with
> /usr/include/sys/time.h:389: previous declaration `int gettimeofday(struct
> timeval *, void *)' here
> make: *** [rng.o] Error 1
>
> I'm not sure if I should just go around each .cc file, commenting out each
> declaration that has a conflict. Is this the right approach? It seems
> rather strange for me to have to do this.
>
> I did in fact try this:
>
> 1.) First, I commented out line 53 of rng.cc due to a conflict with
> timeofday function
> 2.) Second, I edited cmu/debug.h to include <config.h> because in debug.h
> u_int32_t was undeclared.
>
> Finally, I get the following error:
>
> cmu/debug.h: In method `HashSet::HashSet(char *)':
> In file included from packet.h:82,
> from agent.h:40,
> from cmu/tora/tora.cc:6:
> cmu/debug.h:54: warning: implicit declaration of function `int bzero(...)'
> cmu/tora/tora.cc: In method `int toraAgent::command(int, const char *const
> *)':
> cmu/tora/tora.cc:79: `index' undeclared (first use this function)
> cmu/tora/tora.cc:79: (Each undeclared identifier is reported only once
> cmu/tora/tora.cc:79: for each function it appears in.)
> cmu/tora/tora.cc: In method `void toraAgent::recvTORA(class Packet *)':
> cmu/tora/tora.cc:275: warning: unused variable `struct hdr_ip * ih'
> cmu/tora/tora.cc: In method `void toraAgent::recvCLR(class Packet *)':
> cmu/tora/tora.cc:613: `index' undeclared (first use this function)
> make: *** [cmu/tora/tora.o] Error 1
>
> I'm at a lost to what to do.
>
> I'm compiling on Solaris 2.5.x.5 with gcc compiler version gcc version 2.8.1
>
> Any help would be greatly appreciated, I've been working on compiling this
> program for the past whole week with little progress. It is driving me
> nuts.
>
> Sincerlely yours,
>
> Ghee
> [email protected]
>