This section will hold installation problems we've heard about and possible fixes for them between releases. In general, these are fixes for ns/otcl/tclcl installation problems.
For Tcl/Tk-8.0 installation problems refer to Tcl/Tk installation info page.
IMPORTANT: If you experience problem when building a ns daily snapshot, you probably want to update your otcl and tclcl to the most current snapshot as well. Sometimes changes in ns will REQUIRE an updated tclcl. If you are using nam with ns snapshot, it is recommended that you update nam together with ns because ns may provide new visualization features which requires an updated nam.
Categories of problems on this page:
If a problem is not listed here, you may also want to search the ns-users mailing list archives (how to subscribe to the list, the archives themselves).
If something worked in an old verison of ns and no longer works,
you can look at our CVS
archives (read-only) to see what we changed. (Thanks to the MASH
project for setting up and maintaining this service.)
Mailing-list-related Problems
For mailing-list-related problems,
including subscribing, unsubscribing,
and problems posting to the list,
please see the mailing-list web page.
Work-arounds: First, many people have successfully downloaded ns (unless you're the first person to get a brand new release!). Odds are that the solution to problems downloading lie on your end: make sure that your browser isn't compressing or uncompressing it for you; try Netscape if you're using IE, or try another program to download like GNU wget; make sure you use (GNU) gunzip to uncompress it, not PKZIP.
If these tricks don't help, you might also try getting it via FTP (from ftp://ftp.isi.edu/nsnam) instead of HTTP (from http://www.isi.edu/nsnam/dist). If ftp'ing, try using a dedicated FTP client instead of a web browser, and make sure you transfer in BINARY mode, not TEXT.
>>>>> This is a multi-part message in MIME format. >**** Command 'this' not recognized. >>>>> >>>>> ------=_NextPart_000_0013_01C00841.7A1B9BA0 >END OF COMMANDS
Solution: Send simple text (ASCII) e-mail to the subscribe address, not MIME. Majordomo, the mailing list management program we use, can't handle MIME.
Solution: Please see the mailing-list FAQ.
use-scheduler: command not found attach-node: command not found ...
Solution: you need to run the script by issuing command: ns simple.tcl and you should add ns' directory to the environment variable PATH.
couldnt execute nam: no such file or directory while executing "exec nam out.nam &".(Also, when I try typing the comamnd "ns simple.tcl", and I get the error "ns: command not found".)
Solution: Well, you need to add nam' directory to the environment variable PATH or specify its location in the tcl script. (PATH is part of Unix, so if you're not sure how it works, please consult a local Unix expert or search the web on "unix PATH".)
Solution: To apply a patch file, get the the "patch" program (it ships with Linux and FreeBSD, or you can get it from ftp.gnu.org. Change into the directory with the source code you want to patch and type "patch < /path/to/patch-file.patch". See the patch(1) man page for details about what messages you'll see.
Bonus answer: how to generate a patch file. To generate a patch file, use the "diff" program with the "-u" or "-c" option: "diff -u old-copy-of-file.cc file.cc". (This requires that you have saved a copy of the file before you modified it.)
[root@srn04 ns-2.27]# patch < newfi.patch patching file Makefile.in Hunk #1 FAILED at 25. 1 out of 1 hunk FAILED -- saving rejects to file Makefile.in.rej patching file Makefile.in
Solution: Patches will succeed when applied to the same version of code against which they were generated. If the code has changed, you will get error messages like "hunk failed".
Unfortunately, there is no general solution to failed patches. It could be that the underlying code changed so much the old patch will not work. But it could be that there were minor changes to the basic code and you could apply the patch manually.
Some hints if you want to try manually applying a patch: If you want to try applying a patch by hand, you need to understand what you're patching, more or less. If you're trying to patch a Makefile and you have no idea what a makefile is, it's very possible you'll make an accidental error that prevents things from working. But don't fear, you can at least try, and you can always read the documentation about the make program and learn something! In the worst case you have to undo what you did. Also, although you will need some clue about what you're doing, you probably don't have to completely understand the code. If you try to manually apply a patch, you should study the patch manual page so you can understand the simple format that a patch file and a .rej file use.
If you're not willing or able to manually apply a patch, you have one other alternative. A patch file takes original code (call it X-orig) and changes it into new code (call it X-new) by applying the differences described in the patch. Patches fail if the patch program cannot find what's described in the patch in X-orig. So an alternative to manually applying the patch is to find different original code. If you find the same original code the person who made the patch used, you should get it to apply cleanly. So, for example, if a patch was generated against ns-2.26 and it fails when applied to ns-2.27, you could get rid of your copy of ns-2.27 and go get ns-2.26, then apply the patch to that older version. (Of course, this approach has other problems, since you may want other things that are only in ns-2.27. TANSTAAFL.)
Solution: No, ns is not broken. These are warning messages output by the test suites, not errors. (However, if you get these messages from your scripts, we encourage you to move to the newer APIs.)
creating cache ./config.cache No .configure file found in current directory Continuing with default options... checking host system type... alpha-dec-osf4.0 checking target system type... alpha-dec-osf4.0 checking build system type... alpha-dec-osf4.0 checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for c++... c++ checking whether the C++ compiler (c++ ) works... no configure: error: installation or configuration problem: C++ compiler cannot create executables.
Solution: Your c++ compiler (with exact name c++) does not seem to work. Check with your sytem admin.
Undefined first referenced symbol in file et_tclobject /space/opt/ns-allinone-2.1b6/tclcl-1.0b9/libtclcl.a(Tcl.o) ld: fatal: Symbol referencing errors. No output written to ns collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `ns'(or other symbols that begin with et_*).
Solution: Build everything with gcc, don't mix gcc/g++ and cc/ld. (Insure that if you build any C++ code with g++ that you link with g++, and that they're the same version.)
(These very confusing errors are from gcc. "et" is part of the run-time type checking. This code is generated at load time; gcc gets confused if you mix compilers.)
[root@localhost unix]# make
gcc -pipe -c -O2 -Wall -Wno-implicit-int -fno-strict-aliasing -fPIC -I/home/vahid/Desktop/Temp/tk8.4.7/unix -I/home/vahid/Desktop/Temp/tk8.4.7/unix/../generic -I/home/vahid/Desktop/Temp/tk8.4.7/unix/../bitmaps -I/home/vahid/Desktop/Temp/tcl8.4.7/generic -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DPEEK_XCLOSEIM=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 -DTCL_NO_DEPRECATED -DUSE_TCL_STUBS /home/vahid/Desktop/Temp/tk8.4.7/unix/../generic/tk3d.c
In file included from /home/vahid/Desktop/Temp/tk8.4.7/generic/tkInt.h:21,
from /home/vahid/Desktop/Temp/tk8.4.7/generic/tk3d.h:18,
from /home/vahid/Desktop/Temp/tk8.4.7/generic/tk3d.c:16:
/home/vahid/Desktop/Temp/tk8.4.7/generic/tk.h:96:29: X11/Xlib.h: No such file or directory
In file included from /home/vahid/Desktop/Temp/tk8.4.7/generic/tkInt.h:21,
from /home/vahid/Desktop/Temp/tk8.4.7/generic/tk3d.h:18,
from /home/vahid/Desktop/Temp/tk8.4.7/generic/tk3d.c:16:
/home/vahid/Desktop/Temp/tk8.4.7/generic/tk.h:573: parse error before "Window"
...
Solution: You don't have the development libraries for X11 installed on your system (see "X11/Xlib.h: No such file or directory").
Fix: install the X11 development libraries. How you do this is system-specific. In Redhat-like Linux distributions, make sure you have the X11 -devel packages installed. (In Fedora Core 2, installing xorg-x11-devel will fix this specific problem; in general you may need other -devel packages for libc, X11, and Tcl.)
Solution: As of ns 2.26, the windows port uses Cygwin which should substantly reduce validation errors. Please have a look at individual ns versions for specific details. The following information is way outdated.
First, you need to download Cygwin, as of 2000-06-22 at version 1.1.2, which provides GNU binary utilities for the Windows platforms. You may also want to download pre-compiled Perl for Windows. After you've got all these tools, apply the following patch to ~ns/tcl/test/test-all-template1 to get around the \r\n problem:
*** test-all-template1.orig Wed Jan 5 01:01:00 2000
--- test-all-template1 Thu Jun 22 16:04:10 2000
***************
*** 117,123 ****
cp $datafile.bk $datafile
mv $datafile.Z $directory/$t.Z
else
! gzip -dc $directory/$t.Z | cmp -s - $datafile
if [ $? = 0 ]; then
echo Test output agrees with reference output
else
--- 117,123 ----
cp $datafile.bk $datafile
mv $datafile.Z $directory/$t.Z
else
! gzip -dc $directory/$t.Z | perl -ne 'print $_;' |cmp -s - $datafile
if [ $? = 0 ]; then
echo Test output agrees with reference output
else
NOTE:
Some of the test suites will fail on win32 platform. As of
Feburary 26, 1999 snapshot of ns, the following test suites
fail:
./test-all-simple ./test-all-tcp ./test-all-red ./test-all-sack ./test-all-schedule ./test-all-red-v1 ./test-all-sack-v1 ./test-all-v1 ./test-all-vegas-v1 ./test-all-ecn ./test-all-manual-routing ./test-all-intserv ./test-all-webcache ./test-all-srmHowever, all of them failed because of floating point rounding differences on win32 and on unix. We will test current ns snapshots and update the results here. Thanks to Christian Joensson for his enthusiasm in keeping providing the information and patches for many ns releases.
IMPORTANT NOTE: The cygwin release 1.3.2 currently available (as of 07/2001), which we installed in win2000, doesn't seem to have a functional awk utility. A significant portion of the ns validation script uses awk, so we tried to replace awk with perl; but now the bash shell (another cygwin utility) didnot handle stdin/stdout correctly. So we were unable to validate the windows version (ns2.1b8a) in this platform. We welcome any suggestion from windows users to help solve this problem.
ns: _o3 cleanup file5 sackB4: Syntax error in file ../../bin/raw2xg at
line 43, next 2 tokens "my("
Syntax error in file ../../bin/raw2xg at line 59, next 2 tokens
"translate_point("
Syntax error in file ../../bin/raw2xg at line 94, next 2 tokens
"translate_point("
Execution of ../../bin/raw2xg aborted due to compilation errors.
Can't locate 5.0010000000000003 in @INC at ../../bin/getrc line 4.
while executing
(where the key parts are "syntax error near my(" and "can't locate 5.001").
Solution: Get perl5 and/or make sure the programs in ~ns/bin are invoking perl5.
Ns's configure checks for perl5, but apparently this check is not sufficient for many people's systems. Suggestions for improving the check are encouraged (it already works on our systems).
Solution: Many systems require that you do something special when installing new shared libraries. Shared-library loading is system-dependent, so consult the man page for ld(1) on your system. On many systems the program ``ldd'' can be used to diagnose shared-libary problems.
A couple of hints: many systems require that you set the environment LD_LIBRARY_PATH to specify where to look for shared libraries. So if (let's say), you get the above error with otcl shared library (libotcl.so), you should append the path to your libotcl.so (which typically would be in the directory you have installed and built otcl) to the LD_LIBRARY_PATH macro in your .cshrc file. Other systems require that you run ldconfig when using new libraries.
Work-around: You need to manually add the library for dynamic linking to ns's Makefile. Look in the Makefile for the line LIB= and add your systems library for dynamic linking (typically -ldl).
Solution: Unfortunately ns's autoconf support for dynamic linking isn't currently very good, and we can't test ns on all the platforms on which it's used. This configuration is done in ~ns/conf/configure.in.dynamic. If you can adjust the code there to correctly detect your system we'll be happy to add your patch to our sources.
c++ -static -o ns \
tclAppInit.o random.o rng.o ranvar.o misc.o
....
....
-lXext -lX11 -lsocket -lnsl -ldl -lm
ld: fatal: library -ldl: not found
ld: fatal: File processing errors. No output written to ns
*** Error code 1
make: Fatal error: Command failed for target `ns'
Solution:This error appears due to compiling with the static flag on. In static mode, ld selects only the shared object and archive files ending with .a, (unlike dynamic mode where files ending with either .so or .a are acceptable).
Thus you will need to either
Solution: See the memory debugging tips section of the debugigng tips web page.
Solution: If you just want to treat ATM as a 155Mb/s link for IP packets, you can get a pretty good approximation by, well, making a 155Mb/s link. Or a better approximation by accounting for ATM framing and using a 135Mb/s link.
If you actually want to explore the interaction between ATM cells and IP packets, or MPLS, or something like that, you may have to implement it yourself or pack up a third-party package.
One user (thanks L.) suggested in ns-users:
http://freebsd1.lums.edu.pk/~umair/NS/doc/index.html (there's a mirror at: http://www.ee.surrey.ac.uk/Personal/L.Wood/ns/ATM/ if you can't reach that.)
It's for ns version 1, it's third-party, it's unsupported, you're on your own.
Deriving an ATM node class for ns-2 would actually be one of the few cases where you'd expect incompatibilities between the derived class and everything else, and where the rest of the things ns simulates are _supposed_ to fail badly across it... would make it easier to implement; less testing required!
Solution:
There are two answers to that question.
If you want to cite the software itself, you can cite:
S. McCanne and S. Floyd. ns Network
Simulator. http://www.isi.edu/nsnam/ns/.
and/or the manual:
Kevin Fall, Kannan Varadhan, and the VINT project.
The ns manual.
If you want something published in a refereed location,
[Breslau00a]
Lee Breslau, Deborah Estrin, Kevin Fall, Sally Floyd, John Heidemann, Ahmed
Helmy, Polly Huang, Steven McCanne, Kannan Varadhan, Ya Xu, and Haobo Yu.
Advances in Network Simulation.
_IEEE Computer_, V. 33 (N. 5 ), pp. 59-67, May, 2000.
Expanded version available as USC TR 99-702b
at \urlhttp://www.isi.edu/ johnh/PAPERS/Bajaj99a.html.
.
Solution: We recommend that you talk to your local sysadmin since this indicates a clock difference between the file server and the client (this has nothing to do with ns).
Solution: Start the X server using startx at the prompt. Set the display environment variable using setenv DISPLAY my_hostname:0.0 (if you are using cshrc) or export DISPLAY=my_hostname:0.0 (if you are using sh or bash). This solution works for both cygwin and unix.
Solution:Currently, on Windows XP SP2 and Cygwin 1.5.12, only two test should fail -- newreno_rto_loss_ackf, and the new smac-multihop test-suite. Until now, if your research direction involves these features, it's best to use ns under some kind of Unix.
Problem: When installing ns-allinone-2.28 in solaris, there may be build problems.
Solution: Several changes are required both to ns and tclcl. Either see the Dec. 8 post to the ns-users mailing list by Mathieu Robin, or get a daily snapshot after Dec. 11. (Changes are also required to tclcl, see below for details.)
$ make
g++ -c -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -o setdest.o
setdest.cc
In file included from ../../../config.h:54,
from setdest.h:5,
from setdest.cc:57:
../../../autoconf.h:85: error: namespace `CPP_NAMESPACE' undeclared
make: *** [setdest.o] Error 1
Solution: Apply this patch, then re-run configure
--- indep-utils/cmu-scen-gen/setdest/Makefile.in 20 Jan 2004 19:56:42 -0000 1.9
+++ indep-utils/cmu-scen-gen/setdest/Makefile.in 18 May 2004 15:05:27 -0000@@ -36,8 +36,8 @@
CC = @CC@
MKDEP = ../../../conf/mkdep
-# when including files from ns, we need to take care STL_NAMESPACE
-DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@
+# when including files from ns, we need to take care CPP_NAMESPACE
+DEFINE = -Dstand_alone -DCPP_NAMESPACE=@CPP_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@
CFLAGS = @V_CCOPT@
LDFLAGS = @V_STATIC@
LIBS = @V_LIB@ -lm @LIBS@
--- indep-utils/webtrace-conv/nlanr/Makefile.in 8 Oct 2002 07:11:33 -0000 1.5
+++ indep-utils/webtrace-conv/nlanr/Makefile.in 18 May 2004 15:10:42 -0000 1.7
@@ -25,17 +25,16 @@
#
# Makefile for NLANR web cache trace processing (http://ircache.nlanr.org).
#
-# $Header: /nfs/jade/vint/CVSROOT/www/ns/ns-problems.html,v 1.186 2006/04/28 21:03:22 tomh Exp $
+# $Header: /nfs/jade/vint/CVSROOT/www/ns/ns-problems.html,v 1.186 2006/04/28 21:03:22 tomh Exp $
# Top level hierarchy
prefix = @prefix@
# Pathname of directory to install the binary
BINDEST = @prefix@/bin
-# when including files from ns, we need to take care STL_NAMESPACE
CC = @CXX@
INCLUDE = -I. -I../../.. @V_INCLUDES@
-CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@
+CFLAGS = @V_CCOPT@ -DCPP_NAMESPACE=@CPP_NAMESPACE@
LDFLAGS = @V_STATIC@
LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@
INSTALL = @INSTALL@
--- indep-utils/webtrace-conv/dec/Makefile.in 8 Oct 2002 07:11:33 -0000 1.4
+++ indep-utils/webtrace-conv/dec/Makefile.in 18 May 2004 15:10:41 -0000 1.6
@@ -28,17 +28,16 @@
#
# Taken from Alex Rousskov's originial code.
#
-# $Header: /nfs/jade/vint/CVSROOT/www/ns/ns-problems.html,v 1.186 2006/04/28 21:03:22 tomh Exp $
+# $Header: /nfs/jade/vint/CVSROOT/www/ns/ns-problems.html,v 1.186 2006/04/28 21:03:22 tomh Exp $
# Top level hierarchy
prefix = @prefix@
# Pathname of directory to install the binary
BINDEST = @prefix@/bin
-# when including files from ns, we need to take care STL_NAMESPACE
CC = @CXX@
INCLUDE = -I. @V_INCLUDES@
-CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@
+CFLAGS = @V_CCOPT@ -DCPP_NAMESPACE=@CPP_NAMESPACE@
LDFLAGS = @V_STATIC@
LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@
INSTALL = @INSTALL@
Solution: This bug and the following fix was provided by Parag Dadhania && John Novatnack.
Please apply the following patch to fix the problem:
--- aodv.cc Thu Mar 21 14:17:08 2002
+++ aodv.cc Wed Oct 30 11:13:30 2002
@@ -570,8 +570,10 @@
* Add the IP Header
*/
ch->size() += IP_HDR_LEN;
- ih->ttl_ = NETWORK_DIAMETER;
- }
+ // Added by Parag Dadhania && John Novatnack to handle broadcasting
+ if ( (u_int32_t)ih->daddr() != IP_BROADCAST)
+ ih->ttl_ = NETWORK_DIAMETER;
+}
/*
* I received a packet that I sent. Probably
* a routing loop.
@@ -592,9 +594,11 @@
return;
}
}
-
- rt_resolve(p);
-
+// Added by Parag Dadhania && John Novatnack to handle broadcasting
+ if ( (u_int32_t)ih->daddr() != IP_BROADCAST)
+ rt_resolve(p);
+ else
+ forward((aodv_rt_entry*) 0, p, NO_DELAY);
}
Solution: ns has been patched to compile using GCC-3.2/Redhat8.0 on October 10 2002. Please download a ns snapshot after Oct 10 to fix the problem or download a fixed ns-allinone.
Solution: The dbugged version of DSR expects CMUPriQueue instead of "Queue/DropTail/PriQueue". Hence change the older queue type in yr DSR simulation script to CMUPriQueue.
Index: simulator.cc =================================================================== 137a138,141 > > // Updating nodelist_ (total no of connected nodes) > // size since size_ maybe smaller than nn_ (total no of nodes) > check(nn_); 165a170,171 > // update the size of nodelist with nn_ > check(nn_);
In file included from aodv/aodv_logs.cc:6: aodv/aodv.h:231: redefinition of `struct bcache' /usr/include/sys/stream.h:335: previous definition here *** Error code 1 make: Fatal error: Command failed for target `aodv/aodv_logs.o'
Solution: bcache only appears twice in aodv.h and nowhere else. So you can fix it by renaming bcache to something else (perhaps aodv_bcache) on those two lines in aodv.h.
wireless_phy.h(75): error C2555: 'wirelessPhy::node': overriding virtual function differs from 'Phy::node' only by return type or calling convention phy.h(71): see declaration of 'Phy' NMAKE: fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\cl.exe': return code '0x2' Stop.
Solution: There is a patched version of ns-src-2.1b8a-win.tar.gz available that should build under windows. Also please visit this page for other info about building under windows.
Index: ftp.h
===================================================================
73c73
< static FILE* fp_;
---
> //static FILE* fp_;
Index: ftpc.cc
===================================================================
52c52,53
< FILE* FtpClientAgent::fp_ = fopen("ftpdly.tr", "w");
---
>
> //FILE* FtpClientAgent::fp_ = fopen("ftpdly.tr", "w");
Index: ftps.cc
===================================================================
26c26
< static FILE* fp_;
---
> //static FILE* fp_;
29c29
< FILE* FtpSrvrAgent::fp_ = fopen("ftpfilesize.tr", "w");
---
> //FILE* FtpSrvrAgent::fp_ = fopen("ftpfilesize.tr", "w");
370c370 < for i in $(SUBDIRS); do ( cd $$i; $(MAKE) install; ) done --- > for i in $(SUBDIRS); do cd $$i; $(MAKE) install; done
--- ls.h 2000/09/01 17:38:56 1.3
+++ ls.h 2001/05/24 18:32:49
@@ -553,7 +553,9 @@
bool init(LsNode* nodePtr);
void computeRoutes() {
- routingTablePtr_ = _computeRoutes();
+ if (routingTablePtr_ != NULL)
+ delete routingTablePtr_;
+ routingTablePtr_ = _computeRoutes();
}
LsEqualPaths* lookup(int destId) {
return (routingTablePtr_ == NULL) ?
--- wireless-phy.cc 2001/02/28 14:36:26 1.1.1.1
+++ wireless-phy.cc 2001/03/08 15:20:58 1.2
@@ -102,6 +102,7 @@
lambda_ = SPEED_OF_LIGHT / freq_;
node_ = 0;
+ ant_ = 0;
propagation_ = 0;
modulation_ = 0;
--- packet.h 2000/09/28 20:19:06 1.80
+++ packet.h 2000/11/09 01:53:50 1.81
@@ -260,7 +260,7 @@
}
unsigned char* data() { return data_; }
- virtual int size() { return datalen_; }
+ virtual int size() const { return datalen_; }
virtual AppData* copy() { return new PacketData(*this); }
private:
unsigned char* data_;
--- ns-trace.tcl~ 2000/07/24 19:48:10
+++ ns-trace.tcl 2000/10/19 18:02:42
@@ -162,6 +162,7 @@
#incr i
continue
}
+ set n $Node_($i)
puts "Node [$n tn]"
foreach nc [$n info vars] {
switch $nc {
(This problem is fixed in ns-2.1b7a)
Solution: Two choices: (1) get tcl-8.0.3. (2) update to a snapshot of ns-2 and tclcl after 17 August 2000. For additional details see this message to ns-users.
One cause for this is that Tcl_Eval was called on a read-only string. (Tcl_ParseCommand changes strings in-place in tcltk-8.3.) This is a problem in some systems where the C compiler makes string constants read-only.
Here's the top of the traceback from test-all-monitor:
#0 0x4012f1d7 in Tcl_ParseCommand () from /usr/lib/libtcl8.3.so
#1 0x40130228 in Tcl_EvalEx () from /usr/lib/libtcl8.3.so
#2 0x4012ff5e in Tcl_EvalTokens () from /usr/lib/libtcl8.3.so
#3 0x401302a2 in Tcl_EvalEx () from /usr/lib/libtcl8.3.so
#4 0x40130541 in Tcl_Eval () from /usr/lib/libtcl8.3.so
#5 0x400fa063 in Tcl_GlobalEval () from /usr/lib/libtcl8.3.so
#6 0x8114c97 in Tcl::eval () at gen/ptypes.cc:297
#7 0x805eb87 in Agent::trace (this=0x83df338, v=0x83df57c)
at agent.cc:282
#8 0x8063f90 in TcpAgent::trace (this=0x83df338, v=0x83df57c)
at tcp.cc:320
#9 0x81161e9 in TclObject::handle_TracedVar () at gen/ptypes.cc:297
#10 0x811671f in TclObject::delay_bind () at gen/ptypes.cc:297
#11 0x8063412 in TcpAgent::delay_bind_dispatch (this=0x83df338,
varName=0x83dd4c8 "cwnd_", localName=0x83dd4c8 "cwnd_",
tracer=0x83df338) at tcp.cc:231
This problem has been observed on Linux systems running RedHat 7.0 (i.e., tclcl-8.3 and gcc 2.96). Probably it appeared there because either tclcl-8.3 changed Tcl_ParseCommand or gcc 2.96 changed string constants to be read-only by default.
Solution: Update to a tclcl snapshot after 17 August 2000 (or the 1.0b10 release, whenever that happens).
Other work-arounds: change your compiler to make string constants writable (in gcc, add "-fwritable-strings" to CFLAGS and LDFLAGS).
telesto{ddutta}8: ./install
creating cache ./config.cache
checking for ranlib... ranlib
checking whether cross-compiling... yes
checking for getcwd... no
checking for opendir... no
...
checking for -linet... no
checking for net/errno.h... yes
checking whether char is unsigned... configure: error: can not run test
program while cross compiling
tcl8.0.4 configuration failed! Exiting ...
Solution: This error happens on Solaris systems where gcc is installed and Sun's C compiler is not installed, but configure decides to use Sun's compiler anyway.
As a work-around, set the environment variable "CC" to "gcc" and "CXX" to "g++" (setenv CC gcc; setenv CXX g++;) before configuring ns.
In the next release of ns it will prefer gcc to cc when both ar available, hopefully fixing this problem.
Solution: use the Mac/802_3 agent which implements CSMA/CD to replace Mac/Csma/Cd
./test-all-cbq ./test-all-cbq-v1 ./test-all-webcache ./test-all-wireless-lan ./test-all-wireless-gridkeeper ./test-all-wireless-lan-newnode ./test-all-wireless-lan-tora
Solution: Remove -O2 optimization from the makefile and recompile everything. Alternatively, you can configure everything with debugging enabled, which doesn't pass -O2 option to the compiler. Just do:
make clean ./configure --enable-debug make
ns: scheduler going backwards in time from X to Y.
Solution: Have you modified anything in NS code? I've had this problem becouse of incorrect calls to Scheduler::schedule. If something schedule an event with a time already gone (less than current time of the scheduler), the Scheduler::dispatch will generate that message. I've solved my problems debugging with a breakpoint in scheduler.cc line 99 ( fprintf(stderr, "ns: scheduler going backwards in time from %f to %f.\n", clock_, t); ), and than with backtrace to find the incorrect scheduling. [Contributed by Massimo Pegorer]
Here is also a relevant excerpt from a message appeared on the ns-users list:
> > There were a lot of discussions on "scheduler going backwards" problem > > in this list. I wonder what is the final solution? > > I think I can summarize it as follows: > > 1. If you see this warning, the first thing you should do is to make > sure you're using the latest version of scheduler.cc. If necessary, > get the latest version from > http://www.isi.edu/cgi-bin/nsnam/cvsweb/ns-2/scheduler.cc > Don't forget to recompile. If after that you still see this error > message, please report this to the list. > > 2. If the previous didn't work for you, use Heap scheduler instead of > default Calendar (see Simulator instproc use-scheduler command and > nsdoc). Heap scheduler, although a little less effective than > Calendar, doesn't have a numeric stability problem and should not > give you this error. Again, if it does, please report this to the > list.
Solution:This may be due to many reasons, but if this is your first time running 2.1b6 release and you immediately see this problem, then try getting classifier-port.cc and classifier-port.h from cvs repository http://www.isi.edu/cgi-bin/nsnam/cvsweb/ns-2.
Solution:This is fixed in the snapshot of 14 February 2000.
You could also apply the patches in:
http://www.isi.edu/nsnam/archive/ns-users/webarch/2000/msg00635.html.
checking for tk.h... configure: error: NONE is not a directory
Solution:Apply the following patch to configure (thanks to the report and fix by Guillermo Rodriguez Garcia) :
--- configure.old Tue Feb 22 14:25:15 2000 +++ configure Mon Mar 6 12:45:35 2000 @@ -2021,7 +2021,7 @@ withval="$with_tk" d=$withval else - d=$prefix + d="" fi
done pages 10 != all pages 9
Solution:Apply the following patch to webcache/webtraf.cc.
./test-all-aimd QUIET Tests: tcp tcpA tcpB tcp_tahoe tcpA_tahoe tcp_reno tcpA_reno tcp_newreno tcpA_newreno ../../ns test-suite-aimd.tcl tcp QUIET Test output agrees with reference output ../../ns test-suite-aimd.tcl tcpA QUIET Test output agrees with reference output ../../ns test-suite-aimd.tcl tcpB QUIET Test output agrees with reference output ../../ns test-suite-aimd.tcl tcp_tahoe QUIET saving output for future validation ../../ns test-suite-aimd.tcl tcpA_tahoe QUIET saving output for future validation ../../ns test-suite-aimd.tcl tcp_reno QUIET saving output for future validation ../../ns test-suite-aimd.tcl tcpA_reno QUIET saving output for future validation ../../ns test-suite-aimd.tcl tcp_newreno QUIET saving output for future validation ../../ns test-suite-aimd.tcl tcpA_newreno QUIET saving output for future validation ./test-all-template1: unknown: not found Some test failed.Solution: Download test-output-aimd.tar.gz and untar it at your ns-2.1b6 direcotry.
Solution: Download ns-2.1b6-configure.patch and apply it to ns-2.1b6/configure.
Solution: Download satellite-examples.tar.gz and untar it at your ns-2.1b6 directory.
Problem: When installing ns-allinone-2.28 using gcc3.4, nam fails to build.
Solution:Try replacing the "NULL" in line 73 of file agent.h in nam-1.11 with "0". Bug reported and fix supplied by Qihe Wang.
Problem: When installing ns-allinone-2.28 in solaris, there may be build problems.
Solution: Apply the following patch. Reported and fixed by Qihe Wang.
Problem: When installing ns-allinone-2.26 on Mac OS X, nam fails to link against zlib (there are undefined symbol errors for _gzclose, _gzopen, _gzread, etc.)
Solution: The "configure" script for nam has a typo. Edit the file nam-1.9/configure and find the line which says ZLIB_VERS=1.1.3 and change it to say ZLIB_VERS=1.1.4
Solution: All the Cygwin patches have been included in the base distribution, but for some reason, an old file crept its way into the release. You will need to download nam-1.9.configure, available here.
Solution: ns has been patched to compile using GCC-3.2/Redhat8.0 on October 10 2002. Please download a ns snapshot after Oct 10 to fix the problem or download a fixed ns-allinone.
./tclsh ./../tools/genStubs.tcl ./../generic \ ./../generic/tcl.decls ./../generic/tclInt.decls make: ./tclsh: Command not found make: *** [../generic/tclStubInit.c] Error 127
Solution:Touch ~tcl8.3.2/generic/tclStubInit.c file which will solve this problem as the timestamp of the generated file is now more recent than that of the stub-generator file.
--- install~ Wed Oct 18 14:41:56 2000
+++ install Mon Oct 30 09:49:21 2000
@@ -104,7 +104,7 @@
blame='Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.'
-./configure || die "otcl-1.0a6 configuration failed! Exiting ..."
+./configure --with-tcl=../tclbox --with-tk=../tkbox || die "otcl-1.0a6 configuration failed
! Exiting ..."
if make
then
@@ -122,7 +122,7 @@
cd ./tclcl-1.0b10
-./configure || die "tclcl-1.0b10 configuration failed! Exiting ..."
+./configure --with-tcl=../tclbox --with-tk=../tkbox --with-otcl=../otcl-1.0a6 || die "tclcl-1.0b10 configuration fail
ed! Exiting ..."
if make
then
@@ -234,16 +234,15 @@
echo "sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing.."
fi
-#compile and install ns
+# Compile and install ns. Since ns searches for tclsh in $PATH, the following is needed.
PATH=$CUR_PATH/tclbox/bin:$CUR_PATH/tkbox/bin:$PATH
export PATH
-#echo $PATH
# John's hack
test -f ./otcl-1.0a6/libotcl.a && rm ./otcl-1.0a6/libotcl.so
cd ./ns-2.1b7
-./configure || die "Ns configuration failed! Exiting ..."
+./configure --with-tcl=../tclbox --with-tk=../tkbox --with-otcl=../otcl-1.0a6 --with-tclcl=../tclcl-1.0b10 || die "Ns configuration failed! Exitin
g ..."
if make
then
@@ -279,7 +278,7 @@
cd ./nam-1.0a9
-./configure || die "Nam configuration failed! Exiting ..."
+./configure --with-tcl=../tclbox --with-tk=../tkbox --with-otcl=../otcl-1.0a6 --with-tclcl=
../tclcl-1.0b10 || die "Nam configuration failed! Exiti
ng ..."
if make
then
@@ -356,7 +355,8 @@
echo "-----------------------------------------------------"
echo "Please put $CUR_PATH/bin into your PATH environment."
-echo "You many need to put $CUR_PATH/otcl-1.0a6, $CUR_PATH/tclbox/lib, $CUR_PATH/tkbox/lib"
+echo ""
+echo "You MUST put $CUR_PATH/otcl-1.0a6, $CUR_PATH/tclbox/lib, $CUR_PATH/tkbox/lib"
echo "into your LD_LIBRARY_PATH environment variable. If it complains about X libraries,"
echo "add path to your X libraries into LD_LIBRARY_PATH."
echo ""
--- scheduler.cc~ 2000/09/29 23:40:12
+++ scheduler.cc 2000/10/20 01:45:24
@@ -98,7 +98,12 @@
{
instance_ = this;
Event *p;
- while ((p = deque()) && !halted_) {
+ /*
+ * The order is significant: if halted_ is checked later,
+ * event p could be lost when the simulator resumes.
+ * Patch by Thomas Kaemer .
+ */
+ while (!halted_ && (p = deque())) {
dispatch(p);
}
}
Solution:there was a bug in hierarchical routing for wireless , it's fixed in the snapshot after 1/25/2000 .
Solution: Change the
#if defined(hpux) || defined(sun)defined in traffictrace.cc (around line 35) to be
#if 1(always). Eventually autoconf should figure this out.
Solution: Comment out line "source ns-autoconf.tcl"
in tcl/lib/ns-lib.tcl. Because that file does not exist under win32
platforms, the process that embedding tcl scripts into ns is aborted.
(Reported by David
Lalla.)
This can also be solved by the following patch to bin/tcl-expand.tcl:
--- tcl-expand.tcl~ 1998/05/27 19:46:46
+++ tcl-expand.tcl 1999/08/20 16:55:04
@@ -40,6 +40,10 @@
proc expand_file name {
puts "### tcl-expand.tcl: begin expanding $name"
+ if {[file exists $name] == 0} {
+ puts "### tcl-expand.tcl: cannot find $name"
+ return
+ }
set f [open $name r]
while 1 {
if { [gets $f line] < 0 } {
Undefined first referenced
symbol in file
_RENAMED ...
Solution: Upgrade your TclCl.
heapsort and
strsep.
Solution: Apply the patch to webcache-conv/. Or download ns snapshots after July 9th, 1999.
Solution: Apply the following patch to phy.cc:
--- phy.cc 1999/03/13 03:52:59 1.4
+++ phy.cc 1999/03/23 01:38:22 1.5
@@ -78,6 +78,7 @@
if (strcmp(argv[1], "channel") == 0) {
assert(channel_ == 0);
channel_ = (Channel*) obj;
+ downtarget_ = (NsObject*) obj;
// LIST_INSERT_HEAD() is done by Channel
return TCL_OK;
}
dfu: ran off the end of a source route (for DSR) or,
dfu: invalid UID etc.
Solution: Go to ns-build page for a special ns snaphot having the debugged version of CMU's wireless module in ns.
configure: error: can not run test program while cross compiling.
For example:
loading cache ./config.cache checking for ranlib... ranlib checking whether cross-compiling... yes ... checking for BSDgettimeofday... no checking for gettimeofday... no checking for gettimeofday declaration... missing checking for -linet... no checking for net/errno.h... yes checking whether char is unsigned... configure: error: can not run test program while cross compiling tcl8.0.4 configuration failed! Exiting ...
Solution: You most likely have a gcc installation problem on your computer. Please check gcc and try again. (Also, this is an error in tcl, not in ns. For other errors in tcl, you may find help from Scriptics.)
./../generic/tclPosixStr.c: In function `Tcl_ErrnoId' ./../generic/tclPosixStr.c:340: duplicate case value ./../generic/tclPosixStr.c:328: this is the first entry for that value ./../generic/tclPosixStr.c: In function `Tcl_ErrnoMsg' ./../generic/tclPosixStr.c:787: duplicate case value ./../generic/tclPosixStr.c:775: this is the first entry for that value make: *** [tclPosixStr.o] Error 1 tcl8.0.4 make failed! Exiting ...
Solution: the compiler was complaining that the #defined ENOTSUP and EOPNOTSUPP values in different case statements had the same value. These statements are not defined the same in the ns-allinone package, but if you look in /usr/include/bits/errno.h you will find the following statement
# define ENOTSUP EOPNOTSUPPso ENOTSUP is defined to the same value as EOPNOTSUPP in Linux. Note this may not be true with different Linux kernel versions. The solution to work around this is to
/*
#ifdef ENOTSUP
case ENOTSUP: return "ENOTSUP";
#endif
*/
/*
#ifdef ENOTSUP
case ENOTSUP: return "operation not supported";
#endif
*/
comment out both of the above statements in tclPosixStr.c. They should be around lines 328 and 775, respectively.
Solution:
Solution: Download the newer version ns-allinone-2.1b4a now available from ns-build page.
Solution: Add the following patches to
tcl/lib/ns-lib.tcl and tcl/lib/ns-link.tcl.
Note that these patches are against the current
snapshot (ns-lib version 1.139 and ns-link version 1.40). If you
failed to apply them, try download the current snapshot, or use the
context to apply these patches manually.
Previously, there are two major OTcl methods to install a loss module
in a simple link: Simulator::lossmodel and
SimpleLink::errormodule. These two methods insert an
error module BEFORE the queue module in a link. Simulator::lossmodel
only inserts a loss module and is
not capable of producing any traces (neither ns nor nam) for packet
drops. SimpleLink::errormodule is able to produce ns and nam traces,
however, the
nam trace can only be visualized using nam snapshots after March 3rd,
1999. After these patches, both methods have identical effects, but
a new nam is still required.
In addition, two new OTcl methods are added: Simulator::link-lossmodel
and SimpleLink::insert-linkloss. These two methods insert an error
module AFTER the queue module. Their traces can be visualized by both
the old nam and the new one.
Patch for ns-lib.tcl:
--- ns-lib.tcl 1999/02/26 23:06:34 1.139
+++ ns-lib.tcl 1999/03/04 00:12:34
@@ -1049,11 +1049,13 @@
### to insert loss module to regular links in detailed Simulator
Simulator instproc lossmodel {lossobj from to} {
set link [$self link $from $to]
- set head [$link head]
- # puts "[[$head target] info class]"
- $lossobj target [$head target]
- $head target $lossobj
- # puts "[[$head target] info class]"
+ $link errormodule $lossobj
+}
+
+# This function generates losses that can be visualized by nam.
+Simulator instproc link-lossmodel {lossobj from to} {
+ set link [$self link $from $to]
+ $link insert-linkloss $lossobj
}
Simulator instproc bw_parse { bspec } {
Patch for ns-link.tcl:
--- ns-link.tcl 1998/10/28 19:26:49 1.40
+++ ns-link.tcl 1999/03/04 00:09:18
@@ -461,7 +461,7 @@
}
#
-# insert an "error module" after the queue
+# insert an "error module" BEFORE the queue
# point the em's drop-target to the drophead
#
SimpleLink instproc errormodule args {
@@ -477,3 +477,35 @@
$em drop-target $drophead_
}
+
+#
+# Insert a loss module AFTER the queue.
+#
+# Must be inserted *RIGHT AFTER* the deqT_ (if present) or queue_, because
+# nam can only visualize a packet drop if and only if it is on the link or
+# in the queue
+#
+SimpleLink instproc insert-linkloss args {
+ $self instvar link_errmodule_ queue_ drophead_ deqT_
+ if { $args == "" } {
+ return $link_errmodule_
+ }
+
+ set em [lindex $args 0]
+ if [info exists link_errmodule_] {
+ delete link_errmodule_
+ }
+ set link_errmodule_ $em
+
+ if [info exists deqT_] {
+ $em target [$deqT_ target]
+ $deqT_ target $em
+ } else {
+ $em target [$queue_ target]
+ $queue_ target $em
+ }
+
+ $em drop-target $drophead_
+}
+
+
Solution: Add the following patch to tcl/lib/ns-namsupp.tcl (note this is the version in ns-2.1b4):
--- ns-namsupp.tcl~ 1998/10/06 01:26:24
+++ ns-namsupp.tcl 1999/02/16 22:48:38
@@ -143,7 +148,7 @@
set delay [$link_ set delay_]
$ns puts-nam-config \
- "l -t * -s [$fromNode_ id] -d [$toNode_ id] -S UP -r $bw -D $delay -o $attr_(ORIENTATION)"
+ "l -t * -s [$fromNode_ id] -d [$toNode_ id] -S UP -r $bw -D $delay -c $attr_(COLOR) -o $attr_(ORIENTATION)"
}
Link instproc dump-nam-queueconfig {} {
In file included from random.h:41,
from random.cc:40:
config.h:60: conflicting types for `typedef signed char int8_t'
/usr/include/sys/_inttypes.h:48: previous declaration as `typedef char int8_t'
In file included from random.h:41,
from random.cc:40:
config.h:92: declaration of C function `int gethostid()' conflicts with
/usr/include/sys/unistd.h:350: previous declaration `long int gethostid()' here
config.h:94: declaration of C function `void srandom(int)' conflicts with
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.7.2.2/include/stdlib.h:265:
previous declaration `void srandom(unsigned int)' here
*** Error exit code 1
Stop.
Solution: Add the following patch into config.h:
--- config.h~ 1998/12/10 18:58:09 +++ config.h 1999/01/18 23:42:04 @@ -49,7 +49,7 @@ /* typedef signed char int8_t breaks under Solaris 2.6. Shouldn't */ /* autoconf handle stuff like this? Shouldn't autoconf generate */ /* config.h? Who knows autoconf well enough to fix this? --AMC */ -#if defined(sun) +#if defined(sun) || defined(__hpux) #includetypedef unsigned char u_char; typedef unsigned short u_short; @@ -95,8 +95,10 @@ #include int strcasecmp(const char *, const char *); clock_t clock(void); +#if !defined(__hpux) int gethostid(void); -#if !defined(_AIX41) && !defined(sun) +#endif +#if !defined(_AIX41) && !defined(sun) && !defined(__hpux) void srandom(int); #endif long random(void);
tclsh8.0 bin/string2c.tcl version_string < VERSION > gen/version.c
sh: tclsh8.0: not found
*** Error code 1
make: Fatal error: Command failed for target 'gen/version.c'
Solution: There is a bug in ns-2.1b4's configure; it only remembers that it finds tclsh8.0, not the complete path to it. This will be fixed in tonight's ns and nam snapshots; for now the work-around is to manually edit the Makefile and specify the path to tclsh on the line that begins "TCLSH =".
Solution: The Makefile.vc in ns-2.1b4 release is
not updated. Apply the win98.patch provided by Brett Vickers to remove
the problem.
The win98.patch is as follows:
Index: makefile.vc
======================================================================
--- makefile.vc Wed Sep 2 19:15:29 1998
+++ makefile.vc Wed Oct 28 12:07:32 1998
@@ -98,7 +98,7 @@
scheduler.o object.o \
packet.o ip.o route.o connector.o ttl.o \
trace.o trace-ip.o \
- classifier.o classifier-addr.o classifier-hash.o \
+ classifier.o classifier-addr.o classifier-hash.o classifier-virtual.o \
classifier-mcast.o classifier-mpath.o replicator.o \
classifier-mac.o \
app.o telnet.o tcplib-telnet.o \
@@ -122,7 +122,7 @@
delay.o ll.o snoop.o \
channel.o mac.o mac-csma.o mac-802_11.o mac-multihop.o \
dynalink.o rtProtoDV.o net-interface.o \
- ctrMcast.o prune.o srm.o \
+ ctrMcast.o mcast_ctrl.o srm.o \
sessionhelper.o delaymodel.o srm-ssm.o \
srm-topo.o \
alloc-address.o address.o \
@@ -130,7 +130,7 @@
$(LIB_DIR)dmalloc_support.o \
webcache/http.o webcache/tcp-simple.o webcache/pagepool.o \
webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o \
- lanRouter.o
+ lanRouter.o tfcc.o filter.o
# what was here before is now in emulate/
OBJ_C =
Index: filter.h
======================================================================
--- filter.h Tue Oct 6 14:39:34 1998
+++ filter.h Wed Oct 28 12:07:36 1998
@@ -29,11 +29,11 @@
public:
Filter();
inline NsObject* filter_target() { return filter_target_; }
+ enum filter_e { DROP, PASS, FILTER, DUPLIC };
protected:
- enum filter_e { DROP, PASS, FILTER, DUPLICATE };
virtual filter_e filter(Packet* p);
- int command(int argc, const char*const* argv);
+ int command(int argc, const char* const* argv);
void recv(Packet*, Handler* h= 0);
NsObject* filter_target_; // target for the matching packets
};
Index: filter.cc
======================================================================
--- filter.cc Wed Oct 28 13:58:50 1998
+++ filter.cc Wed Oct 28 13:58:42 1998
@@ -48,7 +48,7 @@
if (h) h->handle(p);
drop(p);
break;
- case DUPLICATE :
+ case DUPLIC :
if (filter_target_)
filter_target_->recv(p->copy(), h);
/* fallthrough */
embedded-tcl.cc contains tcl code as one long string. Some compilers (like yours) can't handle strings that are so long.
Solution: (choose one or the other)
Here's the patch for HP-UX:
Index: tcl2c++.c --- tcl2c++.c 1998/10/08 18:12:55 1.8 +++ tcl2c++.c 1998/10/12 16:40:27 @@ -30,7 +30,10 @@ #define strcasecmp _stricmp #endif -#if defined(WIN32) || defined(__alpha__) +/* + * Define TCL2C_INT if your compiler has problems with long strings. + */ +#if defined(WIN32) || defined(__alpha__) || defined(__hpux) #define TCL2C_INT #endif
Solution: Apply patchfile hier.patch to remove the above bug.
Solution: Ns-2.1b4 and snapshots after 15-Sep-98 should autodetect getrusage. Upgrade to those versions. Work-around: Comment out lines in mem-trace.h which reference getrusage and/or sbrk until things compile. (This will disable memory monitoring but basic ns will still work.)
-fpic, and using those .o files to build static library.
Solution: Apply the following patch to Makefile.in of tcl-debug v1.7:
37,38c37
< CFLAGS = @DBG_CFLAGS@
< SHCFLAGS = @DBG_CFLAGS@ @DBG_SHLIB_CFLAGS@
---
> CFLAGS = @DBG_CFLAGS@ @DBG_SHLIB_CFLAGS@
85,87d83
< SHCFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(SHCFLAGS)
<
< .SUFFIXES: .so
91,92d86
< .c.so:
< $(CC) -c $(SHCFLAGS_INT) $(HDEFS) $<
96d89
< SOFILES = Dbg.so Dbg_cmd.so
114c107
< $(DBG_SHARED_LIB_FILE): $(SOFILES)
---
> $(DBG_SHARED_LIB_FILE): $(OFILES)
116c109
< @TCL_SHLIB_LD@ -o $(DBG_SHARED_LIB_FILE) $(SOFILES)
---
> @TCL_SHLIB_LD@ -o $(DBG_SHARED_LIB_FILE) $(OFILES)
Then do make distclean and re-configure and make.
nam: unknown event at offset 21 in `out.nam'
nam: `V -t * -v 1.0a5 -a 0
'
Solutions:
1. Download nam-snapshot from ns website.
or,
2. Delete the line from your nam tracefile.
(If you've done these and the problem persists, check for old versions of nam in your path.)
Solution: Apply the following patch to ~ns-2/trace.cc:
--- trace.cc~ 1998/07/17 22:37:25
+++ trace.cc 1998/07/20 18:07:53
@@ -185,7 +185,7 @@
hdr_rtp *rh = (hdr_rtp*)p->access(off_rtp_);
hdr_srm *sh = (hdr_srm*)p->access(off_srm_);
- const char* sname = 0;
+ const char* sname = "null";
int t = th->ptype();
const char* name = pt_names[t];
@@ -413,7 +413,7 @@
hdr_cmn *th = (hdr_cmn*)p->access(off_cmn_);
hdr_ip *iph = (hdr_ip*)p->access(off_ip_);
hdr_srm *sh = (hdr_srm*)p->access(off_srm_);
- const char* sname = 0;
+ const char* sname = "null";
int t = th->ptype();
const char* name = pt_names[t];
object.cc: In method `void NsObject::delay_bind_init_all()':
object.cc:60: warning: implicit declaration of function `int
delay_bind_init_one(...)'
object.cc: In method `int NsObject::delay_bind_dispatch(const char *,
const char *)':
object.cc:67: warning: implicit declaration of function `int
DELAY_BIND_DISPATCH(...)'
object.cc:67: `delay_bind' undeclared (first use this function)
Solution: This error suggests you upgraded ns without upgrading tclcl. The recent ns release *requires* the current releases of otcl and tclcl.
ns: _o3 run-mcast: invalid command name "0"
while executing
"[$link set ifacein_] set intf_label_"
(procedure "_o10" line 3)
(Node get-oif line 3)
invoked from within
"$self get-oif $link"
(procedure "_o10" line 5)
(Node init-outLink line 5)
invoked from within
"$node init-outLink"
(procedure "_o3" line 5)
(Simulator run-mcast line 5)
invoked from within
"_o3 run-mcast"
Solution:
patch to ns-lib.tcl fixes the problem.
This is preferably applied after the intserv patch above.
c++ -c -I. -I../otcl -I../tkbox/include -I../tclbox/include -DNO_TK -DUSE_SHM -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LIBTCL8_0 -DHAVE_TCL_H -O2 -o Tcl.o Tcl.cc tclcl-mappings.h: In function `static int TclObjectHelper::dispatch_(void *, struct Tcl_Interp *, int, char **)': In file included from tclcl.h:47, from Tcl.cc:50: tclcl-mappings.h:51: parse error before `::'
Solution: Some C++ problems are fixed in the development version and will appear in the next release. Until then, follow Rod van Meter's directions for how to update ns-allinone to work on these systems.
c++ -c -g -DNO_TK -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL1_0B5 -DHAVE_TCLCL_H
-DHAVE_LIBOTCL1_0A2 -DHAVE_OTCL_H -DHAVE_LIBTK4_2 -DHAVE_T
K_H -DHAVE_LIBTCL7_6 -DHAVE_TCL_H -I. -I../tclcl-1.0b5
-I/usr/local/include -I/usr/include/tcl -I/usr/include/tcl -o random.o rand
om.cc
random.cc: In function `int random()':
random.cc:50: new declaration `int random()'
/usr/include/stdlib.h:198: ambiguates old declaration `long int random()'
make: *** [random.o] Error 1
Solution: There seems to be differences in Linux definitions of random. The Right Thing is to have autoconf detect the type of random, but (since I've not done that before) that's low on the priority list right now (code contributions are welcome, of course---it should be easy to do this in autoconf).
Another approach would be to use an #define which differs between Debian and RedHat. I don't know of such a #define.
Until it's fixed the Right Way, this patch should work around the problem:
--- random.cc~ Tue Apr 14 14:07:04 1998 +++ random.cc Tue Apr 21 10:50:07 1998 @@ -41,11 +41,7 @@ #include#include "random.h" -#ifdef linux -int -#else long -#endif random() { printf("random() called in ns.\nRandom is not portable, please use Random::uniform() instead.\n");
(Problem raised by Jeffrey Austen <[email protected]>.)
Solution: Change line 208 to
set fin [lindex $args 3]
Solution: Add the line
$ns rtproto DVbefore specifying the rtmodel.
Solution: Add the line
$ns rtproto DV ;# or use Sessionbefore specifying the rtmodel.
Solution: Replace the following line in Simulator::trace-annotate in tcl/lib/ns-trace.tcl:
$self puts-nam-traceall "v [$self now] ..."with
$self puts-nam-traceall "v -t [$self now] ..."
Solution: As a workaround, configure --with-otcl=path_to_otcl and --with-tclcl=path_to_tclcl. This is a bug which will be fixed in the next ns release.
Solution:The ns/conf directory was inadvertently not added to the distribution list for ns-2.1b2 release. The conf directory contains files consisting mainly of autoconf rules which are used during configuration for ns (looking for tcl, tclcl, otcl, perl etc). Normally these files are believed to of no consequence to the functionalities of ns. However if you want to take a look at these configuration files or play around with them they are available in a tarred format called ns-2.conf.tar.
(A more specific error message:)
[rdv@omocha ex]$ ns rc.tcl
invalid command name "Simulator"
while executing
"Simulator create _o1 "
invoked from within
"catch "$className create $o $args" msg"
(procedure "new" line 3)
invoked from within
"new Simulator"
(file "rc.tcl" line 10)
Solution: Make sure you have tclsh in your path, or change the Makefile to specify where tclsh is, or generate gen/ns_tcl.cc by hand (look at the Makefile for how). This problem often happens when gen/ns_tcl.cc is incorrectly generated and can be deteced by that file being less than 1KB in size (it should be longer than 300KB). This error often occurs on FreeBSD where tclsh is installed as tclsh8.0.
This problem should be fixed in ns-2.1b2.
Solution: Delete the line ' #include "ostream.h" ' in scheduler.cc
Reported 12-Nov-97.
Solution: To get around this specify the versions of tcl and tk being used in --with-tcl-ver and --with-tk-ver to configure.
Reported 12-Nov-97.
Solution: Change the line '$mcastproto leave-group-source $group $source' to '$mcastproto_ leave-group-source $group $source'.
Reported 11-Nov-97. Fixed in ns-2.1b1.
Solution: In file tcl/mcast/ns-mcast.tcl:Classifier/Replicator/Demuxer instproc drop{}, comment out 'set ignore_ 1'.
Reported 23-Oct-97
Reported 30-Sep-97.
Solution: In file tcl/lib/ns-link.tcl:SimpleLink instproc dynamic{}, replace these two lines '$dynamics_ target head_; set head_ $dynamics_' with '$dynamics_ target [$head_ target]; $head_ target $dynamics_'.
Reported 15-Sep-97
Solution:replace the last line: '$ns run Session' with '$ns rtproto Session; $ns run'
Reported 11-Sep-97
Solution: In file tcl/session/session.tcl:SessionSim instproc run{}, replace the line: 'eval RouteLogic configure $args' with '[$self get-routelogic] configure'
Reported 11-Sep-97
Solution: apply the ns-src-2.0b17-sack-sink.patch.
Reported 30-Jul-97. Fixed in ns-2.0.
c++ -o Tcl.o -c -O2 -DUSE_SHM -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK4_2 -DHAVE_TK_H -DHAVE_LIBTCL7_6 -DHAVE_TCL_H -DNO_TK -I/usr/local/include -I/usr/local/include/tcl7.6 -I/usr/local/include/tk4.2 Tcl.cc
Tcl.cc: In method `TclObject::~TclObject()':
Tcl.cc:239: conflicting types for `class InstVar * p'
Tcl.cc:233: previous declaration as `class TracedVar * p'
Tcl.cc: In method `TracedVarTcl::~TracedVarTcl()':
Tcl.cc:462: `const *' cannot be deleted
Solution: This is a gcc compiler bug. Get gcc-2.7.x.
Reported 30-Jul-97.
Solution: From the shell set the DISPLAY variable. For example, from bash one can do it with
export DISPLAY=machine:0.0
xtb.c:50: macro `strcpy' used without args.
Solution: Apply the strcpy patchxgraph_strcpy_macro patch.
Solution: Removing "//" from lines 166 and 167 of xgraph.h. (Fixes provided by Fion Lee).
Solution: We have patches to fix three problems with xgraph: more Posix-friendliness (fixes a build problem under Linux and probably elsewhere), disable animation (works around a bug with move/draw commands), typo fix (fixes a typo found by Patrik Fors).
Solution: Fixed in current CVS. Apply this patch:
--- tclcl.h~ 2003-07-29 11:24:50.000000000 -0700
+++ tclcl.h 2004-12-10 08:55:34.692584936 -0800
@@ -45,8 +45,8 @@
}
#include "tclcl-config.h"
-#include "tclcl-mappings.h"
#include "tracedvar.h"
+// tclcl-mappings.h included below, AFTER definition of class Tcl
struct Tk_Window_;
@@ -158,6 +158,8 @@
Tcl_HashTable objs_;
};
+#include "tclcl-mappings.h"
+
class InstVar;
class TclObject {
Solution: Apply this patch to tclcl-1.0b9/configure.
Solution:Apply the following patch to Tcl.cc:
--- Tcl.cc~ 1999/02/24 19:04:49
+++ Tcl.cc 1999/02/24 19:18:07
@@ -355,6 +355,7 @@
for ( ; var != 0; var = var->next_)
if (var->tracer())
var->tracer()->trace(var);
+ return TCL_OK;
}
int TclObject::traceVar(const char* varName, TclObject* tracer)
Solution:Apply the following patch: tclcl-1.0b6.patch
gcc -c -g -o2 -DNDEBUG -DHAVE_STL -DUSE_SHM -I. -I/home/vijay/tk8.3.2/generic -Iotcl.c:21:20
tclInt.h:No such file or directory
make: *** [libotcl.a] Error1
Solution: OTcl needs the file tclInt.h and tclIntDecls.h from the source code to Tcl. If you're building OTcl on a platform with a binary installation of Tcl/Tk you must get these header files from the matching source code for your version ot Tcl/Tk.
Solution: None yet. Ns doesn't exercise otcl autoloading so fixing this bug is a very low priority.
Solution: Add the following patch to otcl.c:
--- otcl.c~ 1998/07/23 17:28:03
+++ otcl.c 1998/09/07 18:53:43
@@ -763,7 +763,11 @@
Tcl_ResetResult(in);
while (args != 0) {
#if TCL_MAJOR_VERSION >= 8
+#if TCL_RELEASE_SERIAL >= 3
+ if (TclIsVarArgument(args))
+#else
if (args->isArg)
+#endif
#endif
Tcl_AppendElement(in, args->name);
args = args->nextPtr;
cc -c -g -DNDEBUG -DUSE_SHM -I. -I../tkbox/include
-I../tclbox/include -I/include otcl.c
"otcl.c", line 1102: syntax error before or at: /
"otcl.c", line 1105: undefined symbol: co
[snip]
Solution: Apply the following patch as a workaround to otcl.c:
3c3
< * $Id: ns-problems.html,v 1.186 2006/04/28 21:03:22 tomh Exp $
---
> * $Id: ns-problems.html,v 1.186 2006/04/28 21:03:22 tomh Exp $
56d55
< #define compat_Tcl_AddObjErrorInfo(a,b,c) Tcl_AddErrorInfo(a,b)
59d57
< #define compat_Tcl_AddObjErrorInfo(a,b,c) Tcl_AddObjErrorInfo(a,b,c)
432c430,434
< compat_Tcl_AddObjErrorInfo(in, msg, -1);
---
> #if TCL_MAJOR_VERSION >= 8
> Tcl_AddObjErrorInfo(in, msg, -1);
> #else
> Tcl_AddErrorInfo(in, msg);
> #endif
469c471,475
< compat_Tcl_AddObjErrorInfo(in, msg, -1);
---
> #if TCL_MAJOR_VERSION >= 8
> Tcl_AddObjErrorInfo(in, msg, -1);
> #else
> Tcl_AddErrorInfo(int, msg);
> #endif
766,768d771
< #if TCL_RELEASE_SERIAL >= 3
< if (TclIsVarArgument(args))
< #else
771d773
< #endif
1100c1102
< /* for version 8 the instprocs are registered, so no need to delete them (?) */
---
> // for version 8 the instprocs are registered, so no need to delete them (?)
2025d2026
< #if TCL_MAJOR_VERSION >= 8
2027d2027
< #endif
2115d2114
< #if TCL_MAJOR_VERSION >= 8
2121d2119
< #endif
otcl.c: In function `ListProcArgs': otcl.c:654: `Arg' undeclared (first use this function) otcl.c:654: (Each undeclared identifier is reported only once otcl.c:654: for each function it appears in.) otcl.c:654: `args' undeclared (first use this function) otcl.c:654: structure has no member named `argPtr' otcl.c:655: parse error before `int' otcl.c:661: `i' undeclared (first use this function) otcl.c: In function `ListProcDefault': otcl.c:684: `Arg' undeclared (first use this function) otcl.c:684: `ap' undeclared (first use this function) ...
Solution: Get otcl-1.0a2 or later from the ns-build web page. . You will need access to the tcl/tk-8.0 sources to configure and compile otcl. Please remember to build OTcl first before proceeding with building TclCL and ns.
Solution: Our current understanding is that, because Intel Linux doesn't use IEEE arithmetic, floating point operations can give different results on Intel Linux machines than on other systems that do use IEEE arithmetic. Our fix for this portability problem so far in NS has been to make liberal use of EPSILONs (or, in our case, SMALLFLOAT), for example, to say `if (oldrate_ + EPSILON < rate_)' instead of `if (oldrate_ < rate_)'. This issue is addressed in more detail at the FAQ on Frequently Asked Floating Point Questions. Our assumption is that even with the liberal use of EPSILONs in floating-point arithmetic, we will continue to have portability problems for NS on Intel Linux machines.
Solution: Change the following lines (339 and 786) in TclPosixStr.c from
#ifdef EOPNOTSUPPto
#if defined (EOPNOTSUPP) && (!defined(ENOTSUP)||(EOPNOTSUPP != ENOTSUP))
Solution: Please download the lastest snapshot of ns.