Please see my reply in Post #29
|
Hi there,
I am really a beginner and for a school project I have to make a simulation for LEACH protocol in ns. I have installed ns-allinone-2.34 on Ubuntu 11.04 and now i think i have to add the LEACH patch to ns. As i read here there are some steps to do but the problem is that i have installed "gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) ". Can someone please help me with the exact steps for this version of gcc complier. Thank you in advance. Awaiting for your early reply. |
Hi MayTamer,
I set up successfully ns2 and leach but I've run ./test and I can't find leach.out. Could you please advise me this problem ? Quote: oot@bt:~/ns-allinone-2.34/ns-2.34# ./test num_nodes is set 3 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead Loading connection pattern... Loading scenario file... Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! NS EXITING... root@bt:~/ns-allinone-2.34/ns-2.34# |
leminh1009, can you help me with my issue? please
|
Quote:
|
@ helyos, post # 32 : Welcome to LQ.
You can have as many compilers as you want, installed at the same time. Installing g++-4.2 : Read post # 2. And g++-4.3 : Must be manually installed. It's an Ubuntu Lucid package : http://packages.ubuntu.com/lucid/g++-4.3 Use with e.g.: export CC=gcc-4.3 CXX=g++-4.3 && ./install .. |
Thank you knudfl,
I have installed g++-4.2 and i have followed post #7 and at step 6: 6. Edit both “Makefile” & “Makefile.in” as following: CC = gcc-4.2 CPP = g++-4.2 Then when i gave ./configure it gave me : Code:
checking for tclsh8.4.18... no rares@ubuntu:/opt/ns-allinone-2.34/ns-2.34$ ./configure --with-tcl=/usr/share/tcltk/ : Code:
checking if STL works with namespace std... yes |
Hi everyone,
As previous, when I've been running ./test and I reached leach.out as following path: /root/ns-allinone-2.34/ns-2.34/ns-234-leach/mit/leach_sims but no result in it. Could you please help me solve this problem? Thanks in advance, |
#37, @ helyos : "" ... have followed post #7 and at step 6: ""
You mean post # 5 ? Post #5 assumes a working ns-allinone-2.34/. cd ns-allinone-2.34/ && export CC=gcc4.2 CXX=g++-4.2 && ./install ( If you have built ns-allinone-2.34/ to another location, it cannot be reused. You will have to start from scratch.) Another thing : Ubuntu 11.04 is 'worst choice' for ns-allinone-2.34/. Suggest : Use the 'Long Term Supported' Ubuntu 10.04. .. |
Quote:
|
Pfff.. now I am more closer to the end. So i installed the 'Long Term Supported' Ubuntu 10.04. In staled ns2 into the opt directory.
And now i passed from ./configure I am stucked when i enter $ make: Code:
rares@ubuntu:/opt/ns-allinone-2.34/ns-2.34$ make |
Hi,
Ok .. try running leach_test alone. See if the output is created. ( You have to manually create the folder leach_sims ) Once you run leach_test, in \mit\leach_sims\ folder, open leach.err. Do you have any error messages in it ? Quote:
|
#41, @helyos : No g++-4.3 unless you install it : Like all other prerequisites.
sudo apt-get install g++ g++-4.3 autoconf automake libtool \ libx11-dev libxmu-dev libxmu-headers libxt-dev cd ns-allinone-2.34/ && export CC=gcc-4.3 CXX=g++-4.3 && ./install .. |
@ knudfl When i have installed ns2 i have followed this http://www.anand-iyer.com/blog/?p=22 .
sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3 was issued. ./install was issued too. --------------------------- Ok so i have tried your way but failed at /install it gave me : Code:
* Build tcl8.4.18 |
#44, @helyos.
Please do : sudo apt-get install g++ g++-3.4 I.e. the g++ components are required to have a working gcc(-any-version) Quote:
A good idea before compiling is to do these checks : 1) ls /usr/bin/gcc* 2) ls /usr/bin/g++* .. to verify the compiler spelling. ("gcc34" is commonly used too.) |
All times are GMT -5. The time now is 05:37 PM. |