Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed successfully NS v2.26 on Centos 6.4.
I want to add a new module to NS v2.26, I followed steps: Step 1: Change Makefile.in Step 2: Command "./configure", i got:
[tmp@localhost ns-2.26]$ ./configure
loading cache ./config.cache
No .configure file found in current directory
Continuing with default options...
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for gcc... (cached) gcc34
checking whether the C compiler (gcc34 ) works... yes
checking whether the C compiler (gcc34 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc34 accepts -g... (cached) yes
checking for c++... (cached) g++34
checking whether the C++ compiler (g++34 ) works... yes
checking whether the C++ compiler (g++34 ) is a cross-compiler... no
checking whether we are using GNU C++... (cached) yes
checking whether g++34 accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc34 -E
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking for main in -lXbsd... (cached) no
checking for socket in -lsocket... (cached) no
checking for gethostbyname in -lnsl... (cached) yes
checking for dcgettext in -lintl... (cached) no
checking for getnodebyname in -ldnet_stub... (cached) no
checking if STL works without any namespace... no
checking if STL works with namespace std... yes
checking will use STL... yes
checking for tcl.h... -I../include
checking for libtcl8.3... -L../lib -ltcl8.3
checking for init.tcl... ../lib/tcl8.3
checking for tclsh8.3.2... (cached) ../bin/tclsh8.3
checking for tk.h... -I../include
checking for libtk8.3... -L../lib -ltk8.3
checking for tk.tcl... ../lib/tk8.3
checking for otcl.h... -I../otcl-1.0a8
checking for libotcl1.0a8... -L../otcl-1.0a8 -lotcl
checking for tclcl.h... -I../tclcl-1.0b13
checking for libtclcl... -L../tclcl-1.0b13 -ltclcl
checking for tcl2c++... ../tclcl-1.0b13
checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... (cached) yes
checking for XShmAttach in -lXext... (cached) yes
checking for libtcldbg... no
checking dmalloc... not requested with --with-dmalloc
checking for perl... /usr/bin
checking for ANSI C header files... (cached) yes
checking for bcopy... (cached) yes
checking for bzero... (cached) yes
checking for fesetprecision... (cached) no
checking for getrusage... (cached) yes
checking for sbrk... (cached) yes
checking for snprintf... (cached) yes
checking for arpa/inet.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for net/ethernet.h... (cached) yes
checking return type of random... long
checking for int8_t... (cached) yes
checking for int16_t... (cached) yes
checking for int32_t... (cached) yes
checking for u_int8_t... (cached) yes
checking for u_int16_t... (cached) yes
checking for u_int32_t... (cached) yes
checking for u_char... (cached) yes
checking for u_int... (cached) yes
checking for strtoq... (cached) yes
checking for strtoll... (cached) yes
checking size of long... (cached) 4
checking for __int64_t... no
checking for long long... yes
checking for int64_t... (cached) yes
checking which kind of 64-bit int to use... int64_t
checking for struct ether_header... found
checking for struct ether_addr... found
checking for addr2ascii... (cached) no
checking for Linux compliant tcphdr... found
checking for BSD compliant tcphdr... not found
checking for socklen_t... (cached) yes
checking for main in -lpcap... (cached) no
checking to make nse... no
Explicitly disabling static compilation
checking for dlopen in -ldl... (cached) yes
checking for a BSD compatible install... (cached) /usr/bin/install -c
creating ./config.status
creating Makefile
creating tcl/lib/ns-autoconf.tcl
creating indep-utils/webtrace-conv/ucb/Makefile
creating indep-utils/webtrace-conv/dec/Makefile
creating indep-utils/webtrace-conv/nlanr/Makefile
creating indep-utils/webtrace-conv/epa/Makefile
creating indep-utils/cmu-scen-gen/setdest/Makefile
creating autoconf.h
autoconf.h is unchanged
Step 3:Command "make", i got some errors:
[tmp@localhost ns-2.26]$ make
g++34 -c -DGgX -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM.... -I. -I/home/tmp/Desktop/setup/ns-allinone-2.26/tclcl-1.0b13 -I/home/tmp/Desktop/setup/ns-allinone-2.26/otcl-1.0a8 -I/home/tmp/Desktop/setup/ns-allinone-2.26/include -I/home/tmp/Desktop/setup/ns-allinone-2.26/include -I/usr/include/pcap -I./tcp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/diffusion -I./asim/ -I./qs -o ns-src/prop_ricean.o ns-src/prop_ricean.cc
<command line>:8:8: warning: ISO C requires whitespace after the macro name
In file included from ./config.h:54,
from ./common/packet.h:43,
from ./link/delay.h:42,
from ns-src/prop_ricean.cc:33:
./autoconf.h:86: error: `STL_NAMESPACE' is not a namespace-name
./autoconf.h:86: error: expected namespace-name before ';' token
In file included from /usr/lib/gcc/i686-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/fstream.h:31,
from ./mac/../mon_ndp/mon_ndp.h:39,
from ./mac/wireless-phy.h:51,
from ns-src/prop_ricean.cc:40:
/usr/lib/gcc/i686-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
make: *** [ns-src/prop_ricean.o] Error 1
I added prop_ricean Ricean and Rayleigh Fading Propagation Model
Can you know what's happen ?
Plz help me!
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Welcome to LQ.
Quote:
In file included from ./config.h:54,
from ./common/packet.h:43,
from ./link/delay.h:42,
from ns-src/prop_ricean.cc:33:
./autoconf.h:86: error: `STL_NAMESPACE' is not a namespace-name
./autoconf.h:86: error: expected namespace-name before ';' token
I haven't seen this error before, I think.
Please supply a link to the changes you made :
"prop_ricean, Ricean and Rayleigh Fading Propagation Model".
Please supply a link to the changes you made :
"prop_ricean, Ricean and Rayleigh Fading Propagation Model".
-
Hi Knudfl,
Plz find the attached file.
After, can you change type of file to "rar" and uprar this file because file rar can't be upload in this thread.
There is README in ns2_ricean_dist: how to add module "Ricean and Rayleigh Fading Propagation Model" step by step.
I think that maybe errors from "creating autoconf.h, autoconf.h is unchanged" in "./configure".
I checked in ns 2.26, all file object "*.o" aren't generated.
Sorry for my English.
Plz help me!
Thanks you very much!
Plz find the attached file.
After, can you change type of file to "rar" and uprar this file because file rar can't be upload in this thread.
There is README in ns2_ricean_dist: how to add module "Ricean and Rayleigh Fading Propagation Model" step by step.
I think that maybe errors from "creating autoconf.h, autoconf.h is unchanged" in "./configure".
I checked in ns 2.26, all file object "*.o" aren't generated.
Sorry for my English.
Plz help me!
Thanks you very much!
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 3 . OK, I will have a look at the files.
About attachments : The original suffix (e.g. .rar) is to be kept,
so the file type is recognizable : ns2_ricean_dist.rar.txt .
( Anyway tar.bz2 is preferred over rar.)
About big files : You can use Google Docs for upload : Free storage = 10 GB.
At LQ the storage size is 10 MB for attachments.
How about the link to the information concerning
"prop_ricean, Ricean and Rayleigh Fading Propagation Model" ?
I guess you found information somewhere on the Internet ?
About attachments : The original suffix (e.g. .rar) is to be kept,
so the file type is recognizable : ns2_ricean_dist.rar.txt .
( Anyway tar.bz2 is preferred over rar.)
About big files : You can use Google Docs for upload : Free storage = 10 GB.
At LQ the storage size is 10 MB for attachments.
How about the link to the information concerning
"prop_ricean, Ricean and Rayleigh Fading Propagation Model" ?
I guess you found information somewhere on the Internet ?
-
HI,
Plz download ns_ricean_dist on link: http://takeallmusik.com/File/bacme9kbo09pg# .
And Readme of "ns2_ricean_dist.tgz" include all information of "prop_ricean, Ricean and Rayleigh Fading Propagation Model"/
Plz download ns_ricean_dist on link: http://takeallmusik.com/File/bacme9kbo09pg# .
And Readme of "ns2_ricean_dist.tgz" include all information of "prop_ricean, Ricean and Rayleigh Fading Propagation Model"/
Best regards!
Hi,
Now, all above issue are resolved, thanks you very much.
But i get an another error below:
<command line>:8:8: warning: ISO C requires whitespace after the macro name
In file included from ./config.h:54,
from tools/random.cc:40:
./autoconf.h:86: error: `STL_NAMESPACE' is not a namespace-name
./autoconf.h:86: error: expected namespace-name before ';' token
make: *** [tools/random.o] Error 1
`STL_NAMESPACE'in ns 2.26 is default, I don't modify it!
Do you know what's happen ?
Plz help me!
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 7 .
One thing you do wrong is ( ref. #1 ) : ./configure
Should be : export CC=gcc34 CXX=g++34 && ./configure
.. But then again you haven't revealed every command.
The proof method :
a) tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
b) cd ns-allinone-2.26/ && tar xvf ricean-ns226-patch.tar.bz2
* ricean-ns226-patch is your files + Makefile.in + ricean-sample-0413.tcl
* Link https://docs.google.com/file/d/0B7S2...it?usp=sharing
c) export CC=gcc34 CXX=g++34 && ./install : No errors, CentOS6 - 32bits (i686).
d) cd ns-2.26/ ; ./ns ricean-sample-0413.tcl
Code:
[knudfl@localhost ns-2.26]$ ./ns ricean-sample-0413.tcl
num_nodes is set 3
found DATA
16384 data points read
fm0 = 30.000000 fm = 0.000000 fs = 1000.000000
Starting Simulation...
NS EXITING...
> > The files ricean-log.tr 794kB, ricean-proplog.tr 1.9MB are created.
Hi,
All problem are resolved. Thanks you very much!
For my project, i have to add a another module "mon_ndp" (a new routing protocol).
I make do it as the same as the "ricean", but not ok.
I followed steps: Step 1: Extract the mon_ndp (link: https://docs.google.com/file/d/0B3hn...it?usp=sharing)
mon_ndp includes:
- ma_rtable.cc
- ma_rtable.h
- mon_ndp.cc
- mon-ndp.h
- Makefile
- myTEST.tcl (to run)
- mesdiff (to patch) (important)
.... Step 2: Move "mon_ndp" folder to "ns-2.26" folder Step 3: Modify Makefile.in in my ns-2.26 folder
Before modifying, Makefile.in on the link: https://docs.google.com/file/d/0B3hn...it?usp=sharing
After modifying, Makefile.in on the link: https://docs.google.com/file/d/0B3hn...it?usp=sharing
[tmp@localhost ns-2.26]$ make
g++34 -c -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A8 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DSTL_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -I. -I/home/tmp/Desktop/setup/ns-allinone-2.26/tclcl-1.0b13 -I/home/tmp/Desktop/setup/ns-allinone-2.26/otcl-1.0a8 -I/home/tmp/Desktop/setup/ns-allinone-2.26/include -I/home/tmp/Desktop/setup/ns-allinone-2.26/include -I/usr/include/pcap -I./tcp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/diffusion -I./asim/ -I./qs -o mon_ndp/mon_ndp.o mon_ndp/mon_ndp.cc
In file included from /usr/lib/gcc/i686-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/fstream.h:31,
from mon_ndp/mon_ndp.h:39,
from mon_ndp/mon_ndp.cc:33:
/usr/lib/gcc/i686-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
mon_ndp/mon_ndp.cc: In member function `void Mon_NdpAgent::forwardPacket(Packet*)':
mon_ndp/mon_ndp.cc:1684: error: 'class PacketStamp' has no member named 'setTxRate'
make: *** [mon_ndp/mon_ndp.o] Error 1
Step 6: I run myTEST.tcl in mon_ndp folder
I get error below:
[tmp@localhost ns-2.26]$ cd mon_ndp/
[tmp@localhost mon_ndp]$ ns myTEST.tcl
num_nodes is set 20
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
found DATA
16384 data points read
fm0 = 30.000000 fm = 0.000000 fs = 1000.000000 Wrong node routing agent!
The author of mon_ndp source doesn't know what's happen with my ns2.
As i know, the mon_ndp run only ns-2.26.
Can you help me ? That's very important to my project!
Thanks, thanks, thanks you very much!
Last edited by hanoimuathu; 04-13-2013 at 11:33 AM.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 11 .
Quote:
The author of mon_ndp source doesn't know what's happen with my ns2.
Probably ask the author which OS (Name + version) and which g++ version
he / she has used for the "mon_ndp" files.
And if the files really are used with ns-2.26 .
It's not that the mon_ndp files are conflicting with the other patch.
I have used a Makefile with no "ricean files".
No luck with any of these compilers :
g++ -4.1.2, g++ -3.4.6 (g++34), g++ -3.3.3, g++ -3.2.3 .
There is either one or more bugs in the mon_ndp files,
or the files are not for ns-2.26 .
Or could be they will work with CentOS 3 / g++<very-old> ?
P.S. : "mon_ndp" is unknown by Google. Where did you get the files ? ?
Probably ask the author which OS (Name + version) and which g++ version
he / she has used for the "mon_ndp" files.
And if the files really are used with ns-2.26 .
-
I asked the author. Now I'm waiting his reply!
Quote:
There is either one or more bugs in the mon_ndp files,
or the files are not for ns-2.26 .
Or could be they will work with CentOS 3 / g++<very-old> ?
-
To make work the mon_ndp,just now the author ask me only to use ns-2.26.
Now, I'm waiting his reply.
Quote:
P.S. : "mon_ndp" is unknown by Google. Where did you get the files ? ?
-
To make work "mon_ndp":
1. Did you use mesdiff to patch file ?
2. I think need build Makefile.in base on Makefile in mon_ndp. Study Makefile in mon_ndp, i think that the author used c++ 3.3.2 "/usr/lib/gcc-lib/i386-redhat-linux/3.3.2", "/usr/include/c++/3.3.2/", "/usr/include/c++/3.3.2/i386-redhat-linux"
What's do you think about it ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.