[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trying to compile ns-2.0




WeeSan,


Thanks for the help.  My libg++ had only been partially installed.  I corrected
the problem.  I am now trying to compile ns-2.0 and there is an error in the
file random.cc file.  The following is the result when the file is compiled.



c++ -o random.o -c -I/home/dangle/connors/sim-tools/ns-2.0a16/../tk4.2/generic 
-I/home/dangle/connors/sim-tools/ns-2.0a16/../tcl7.6/generic -I/home/dangle/
connors/sim-tools/Tcl-1.0b1 -I/home/dangle/connors/sim-tools/ns-2.0a16/../otcl
-0.96 -I/usr/openwin/include -mv8 -msupersparc -D__svr4__ -DUSE_SHM -DNO_TK -O2
 random.cc
random.h: In function `static int Random::random()':
In file included from random.cc:40:
random.h:49: warning: implicit declaration of function `int lrand48(...)'
random.h: In function `static double Random::uniform()':
random.h:57: warning: implicit declaration of function `int drand48(...)'
random.cc: At top level:
random.cc:44: declaration of C function `int gettimeofday(struct timeval * ...)
' conflicts with
/usr/include/sys/time.h:263: previous declaration `int gettimeofday(struct 
timeval *, void *)' here
random.cc: In function `static void Random::seed(int)':
random.cc:50: warning: implicit declaration of function `int srand48(...)'
make: *** [random.o] Error 1

---------------------------------------------------------------------

Here is my ./configure results FYI


oberon{connors}#256: ./configure --enable-gcc --prefix=$HOME/sim-tools --exec_prefix=$HOME/sim-tools --with-Tcl=$HOME/sim-tools/Tcl-1.0b1
loading cache ./config.cache
checking host system type... sparc-sun-solaris2.5
checking target system type... sparc-sun-solaris2.5
checking build system type... sparc-sun-solaris2.5
checking for gcc... gcc
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... c++
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether cross-compiling... no
checking for ANSI C header files... yes
checking for string.h... yes
checking for -lXbsd... no
checking for -lsocket... yes
checking for -lnsl... yes
checking for -ldnet_stub... no
-n checking for tcl.h...
found (-I/home/dangle/connors/sim-tools/ns-2.0a16/../tcl7.6/generic)
-n checking for libtcl7.6...
found (-R/home/dangle/connors/sim-tools/ns-2.0a16/../tcl7.6/generic -L/home/dangle/connors/sim-tools/ns-2.0a16/../tcl7.6/unix -ltcl7.6)
-n checking for tcl/init.tcl...
found (/home/dangle/connors/sim-tools/ns-2.0a16/../tcl7.6/library)
-n checking for tk.h...
found (-I/home/dangle/connors/sim-tools/ns-2.0a16/../tk4.2/generic)
-n checking for libtk4.2...
found (-R/home/dangle/connors/sim-tools/ns-2.0a16/../tk4.2/generic -L/home/dangle/connors/sim-tools/ns-2.0a16/../tk4.2/unix -ltk4.2)
-n checking for tk/tk.tcl...
found (/home/dangle/connors/sim-tools/ns-2.0a16/../tk4.2/library)
-n checking for otcl.h...
found (-I/home/dangle/connors/sim-tools/ns-2.0a16/../otcl-0.96)
-n checking for libotcl...
found (-R/home/dangle/connors/sim-tools/ns-2.0a16/../otcl-0.96 -L/home/dangle/connors/sim-tools/ns-2.0a16/../otcl-0.96 -lotcl)
-n checking for Tcl.h...
found (/home/dangle/connors/sim-tools/Tcl-1.0b1)
-n checking for libTcl...
found (/home/dangle/connors/sim-tools/Tcl-1.0b1)
-n checking for tcl2c++...
found (/home/dangle/connors/sim-tools/Tcl-1.0b1)
checking for X11 header files
checking for X11 library archive
checking for -lX11... yes
checking for -lXext... yes
checking for -ldl... yes
checking for a BSD compatible install... ./install-sh -c
updating cache ./config.cache
creating ./config.status
creating Makefile
creating ./gen



---------------------------------------------------------------

And my config.log



oberon{connors}#258: cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:726: gcc -E conftest.c
configure:806: c++ -E conftest.C
configure:864: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:912: gcc -o conftest -g -O   conftest.c  1>&5
configure:938: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1003: gcc -o conftest -g -O   conftest.c  1>&5
configure:1035: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1085: gcc -o conftest -g -O   conftest.c -lXbsd   1>&5
ld: fatal: library -lXbsd: not found
ld: fatal: File processing errors.  No output written to conftest
configure:1123: gcc -o conftest -g -O   conftest.c -lsocket   1>&5
configure:1161: gcc -o conftest -g -O   conftest.c -lnsl   1>&5
configure:1199: gcc -o conftest -g -O   conftest.c -ldnet_stub   1>&5
ld: fatal: library -ldnet_stub: not found
ld: fatal: File processing errors.  No output written to conftest
configure:2196: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:2192: X11/Intrinsic.h: No such file or directory
configure:2247: gcc -o conftest -g -O   conftest.c -lX11   1>&5
configure:2304: gcc -o conftest -g -O   conftest.c -lXext -lX11  1>&5
configure:2464: gcc -o conftest -g -O   conftest.c -ldl   1>&5



----------------------------------------------------------------


Do you know what the problem is?


Thanks again for your help.

Dennis