hello @knudfl,
Could you tell me what are the ns-allinone-2.34 prerequisites? I'm using ubuntu13.04 and ns2.34.
I did some job like some orders below,is it enough?
sudo apt-get install build-essential
sudo apt-get install tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev
sudo apt-get install libxmu-dev libxmu-headers
sudo apt-get install xorg-dev g++ xgraph
After I type '3) export CC=gcc41 CXX=g++41 && ./install',there are some mistakes,could you tell me why? But I have installed gcc4.1 and g++ as you told.
Building static library libz.a version 1.2.3 with gcc41.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of sprintf()... No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
gcc41 -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o example.o example.c
make: gcc41:命令未找到
make: *** [example.o] 错误 127
Zlib make failed, but it's optional Continue ...
Quote:
Originally Posted by knudfl
# 6 .
Well, then delete ns-allinone-2.34/ , and do things in a right way :
First : Install the ns-allinone-2.34 prerequisites → →
The compilers gcc41-compat / g++41-compat for the 32bits (i686) Ubuntu 13.10 :
gcc41.. https://drive.google.com/file/d/0B7S...it?usp=sharing
g++41.. https://drive.google.com/file/d/0B7S...it?usp=sharing
$ sudo dpkg -i gcc41-compat-4.1.2-ubuntu1210_i386.deb g++41-compat-4.1.2_i386.deb
... Then reboot, and the new compilers are ready for use.
Building ns-2.34 with LEACH :
1) tar xvf ns-allinone-2.34.tar.gz
2) cd ns-allinone-2.34/ && tar xvf leach+pegasis-ns234-files-2.tar.gz
https://drive.google.com/file/d/0B7S...it?usp=sharing
3) export CC=gcc41 CXX=g++41 && ./install
4) cd ns-2.34/
5) sudo make install
... That's it :
Don't do anything else, like adding some *PATH text to .bashrc : Never required.
-
|