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.
Hello,
I am using ns2.34 version on red hat linux 5.
I need to install a new patch gpsr in my tcl file.
I found a gpsr patch named-gpsr-KeLiu_ns234.patch.
after installing this patch I have done reconfigure ns2.34 and ater that i tried make clean amd make.
than i got this error-
trace/cmu-trace.o: In function `hdr_hls::access(Packet const*)':
cmu-trace.cc.text._ZN7hdr_hls6accessEPK6Packet[hdr_hls::access(Packet const*)]+0x7): undefined reference to `hdr_hls:ffset_'
trace/cmu-trace.o: In function `hdr_locs::access(Packet const*)':
cmu-trace.cc.text._ZN8hdr_locs6accessEPK6Packet[hdr_locs::access(Packet const*)]+0x7): undefined reference to `hdr_locs:ffset_'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Re #4.
OK, RHEL 5.x : The default compilers are gcc/g++ version 4.1.2, unless you changed gcc.
RHEL 5.2 : You forgot to update (since year 2008).
With all security updates etc. (# yum update), `redhat-release' now shows "release 5.11".
We will need some information about gcc/g++ : $ g++ --version | grep g++
Your errors are indicating that a later compiler than gcc-4.1.2 is used.
Or, you could be doing something else wrong ?
Build example :
$ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/
$ patch -p0 < gpsr-KeLiu_ns234.patch
$ patch -p0 < ns234_gcc49.patch (Required if gcc is a later version than 4.1.2). https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.34/
$ cp ns ns-gpsr-keliu
$ sudo cp ns-gpsr-keliu /usr/local/bin/
$ cd gpsr/
$ ns-gpsr-keliu wireless-gpsr.tcl
I have done as you instructed. now after sucessfully installing the patch when i have run wireless-gpsr file than i got this message
[root@localhost gpsr]# ns wireless-gpsr.tclnum_nodes is set 100
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
GPSR configuration file
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 129.2
SORTING LISTS ...DONE!
NS EXITING...
[root@localhost gpsr]# nam wireless-gpsr.nam
Cannot connect to existing nam instance. Starting a new one...
Segmentation fault
Then delete all nam present on your OS :
Any binary 'nam', and the nam-1.14/ folder.
( And the nam text lines in .bashrc, if you added some *PATH text.)
Then you can unpack nam-1.14-fc6.el5.i386.tar.gz
And : $ cd nam-1.14-fc6.el5.i386./
# cp nam /usr/local/bin/
I have got nam-1.14 in the ns-2.34 package. i have complete package of ns-2.34allinone.
I have never faced this (nam) problem in ns-2.34allinone pack but this time when I run wireless-gpsr.tcl it shows me NS exiting... message. After it I am executing nam file which is generating from wireless-gpsr.tcl file than I got Segmentation Error.
I am facing one more problem when I am running my tcl file using gpsr patch. If I am using AODV than this script is running well but if I changed routing protocol as GPSR, I have got this error.
The error is as follow
num_nodes is set 12
(_o14 cmd line 1)
invoked from within
"_o14 cmd addr"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o14" line 2)
(SplitObject unknown line 2)
invoked from within
"_o14 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
invoked from within
"set Server0 [$ns_ node]"
(file "HybridNetwork.tcl" line 102)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Re #8.
Sorry, forgot that gpsr-** isn't supporting NAM.
You can get a nam trace file created.
But running the file shows an empty NAM window.
And you get `Segmentation fault' when the play button is used.
Thanks for quick reply but how can I run NAM in gpsr?
How can I run my own tcl script using GPSR.
I have also asked a question in the post #9.
Please reply.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Re #9.
$ ns234-gpsr-keliu HybridNetwork.tcl : "HybridNetwork.tcl" is an unknown file.
Please use a default 'ns' with no disturbing patches for default simulations.
You are supposed to have like /usr/local/bin/{ ns-orig, ns234-gpsr-keliu }.
Suggest : Build another ns-allinone-2.34 with no patches.
And use the new executable "ns-orig" to run "non gpsr" simulations.
You can have as many ns-allinone-2* as you want, installed at the same time.
But do never add any *PATH text to .bashrc . Not required.
After Successfully installed the GPSR patch, I still have the errors as I told you in #9
I use follwing command for GPSR in ns-2.34
1. ./configure
2. make clean
3. make
4. sudo make install
I got this message
gpsr/gpsr.h: In constructor GPSRAgent::GPSRAgent():
gpsr/gpsr.h:114: warning: GPSRAgent::query_timer_ will be initialized after
gpsr/gpsr.h:101: warning: nsaddr_t GPSRAgent::my_id_
gpsr/gpsr.cc:105: warning: when initialized here
gpsr/gpsr.cc: In member function void GPSRAgent::forwardData(Packet*):
gpsr/gpsr.cc:241: warning: comparison between signed and unsigned integer expressions
And should I make changes in ns-lib.tcl file for GPSR?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.