Dear friends:
I try to install NS-2.31 on ubuntu 14.04. everything installed but the nam and xgraph.
I tried a solution, which is adding '-lz' in /nam-1.13/Makefile for it, by the webset:
http://justin-linux.blogspot.com/2008/05/ns2-nam.html
however, after I re-installed, the Makefile go back to the original (no '-lz' in that line), thus same problem appears again.
Do you have any ideas please!
thanks in advance,
below attached part of the code in terminal:
config.status: creating Makefile
config.status: creating autoconf.h
config.status: autoconf.h is unchanged
rm -f nam
g++ -o nam \
tkcompat.o tkUnixInit.o xwd.o netview.o netmodel.o edge.o packet.o node.o main.o trace.o queue.o drop.o animation.o agent.o feature.o route.o transform.o paint.o state.o monitor.o anetmodel.o random.o rng.o view.o graphview.o netgraph.o tracehook.o lan.o psview.o group.o editview.o tag.o address.o animator.o wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o trafficsource.o lossmodel.o queuehandle.o gen/version.o gen/nam_tcl.o -L/home/hansong/Documents/NS2/ns-allinone-2.31/tclcl-1.19 -ltclcl -L/home/hansong/Documents/NS2/ns-allinone-2.31/otcl-1.13 -lotcl -L/home/hansong/Documents/NS2/ns-allinone-2.31/lib -ltk8.4 -L/home/hansong/Documents/NS2/ns-allinone-2.31/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm
nam_stream.o: In function `NamStreamCompressedFile::get_char()':
nam_stream.cc:(.text+0x424): undefined reference to `gzgetc'
nam_stream.o: In function `NamStreamCompressedFile::close()':
nam_stream.cc:(.text+0x45f): undefined reference to `gzclose'
nam_stream.o: In function `NamStreamCompressedFile::seek(long, int) {clone .part.1}':
nam_stream.cc:(.text+0x594): undefined reference to `gzseek'
nam_stream.cc:(.text+0x5ab): undefined reference to `gzread'
nam_stream.cc:(.text+0x5ba): undefined reference to `gztell'
nam_stream.o: In function `NamStreamCompressedFile::NamStreamCompressedFile(char const*)':
nam_stream.cc:(.text+0x6ce): undefined reference to `gzopen'
nam_stream.o: In function `NamStreamCompressedFile::gets(char*, int)':
nam_stream.cc:(.text+0x3ec): undefined reference to `gzgets'
nam_stream.o: In function `NamStreamCompressedFile::read(char*, int)':
nam_stream.cc:(.text+0x43c): undefined reference to `gzread'
nam_stream.o: In function `NamStreamCompressedFile::tell()':
nam_stream.cc:(.text+0x44c): undefined reference to `gztell'
nam_stream.o: In function `NamStreamCompressedFile::eof()':
nam_stream.cc:(.text+0x47c): undefined reference to `gzeof'
nam_stream.o: In function `NamStreamCompressedFile::seek(long, int)':
nam_stream.cc:(.text+0x601): undefined reference to `gzseek'
collect2: error: ld returned 1 exit status
make: *** {nam} Error 1
Nam make failed! Continue ...
See [url]http://www.isi.edu/nsnam/ns-problems.html for problems
ln: failed to create symbolic link ‘ns’: File exists
Please compile your nam separately.
Please compile your xgraph separately.
ln: failed to create symbolic link ‘sgb2ns’: File exists
ln: failed to create symbolic link ‘sgb2hierns’: File exists
ln: failed to create symbolic link ‘sgb2comns’: File exists
ln: failed to create symbolic link ‘itm’: File exists
ln: failed to create symbolic link ‘sgb2alt’: File exists
ln: failed to create symbolic link ‘edriver’: File exists
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.14: /home/hansong/Documents/NS2/ns-allinone-2.31/{bin,include,lib}
tk8.4.14: /home/hansong/Documents/NS2/ns-allinone-2.31/{bin,include,lib}
otcl: /home/hansong/Documents/NS2/ns-allinone-2.31/otcl-1.13
tclcl: /home/hansong/Documents/NS2/ns-allinone-2.31/tclcl-1.19
ns: /home/hansong/Documents/NS2/ns-allinone-2.31/ns-2.31/ns
gt-itm: /home/hansong/Documents/NS2/ns-allinone-2.31/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns