configure: error: Installation of tclcl seems incomplete or can't be found automatica
UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 15 .
`ns-agent.tcl' :
No guaranty that is causes any changes,
you can try adding a new agent, like the AODV text (line 192) :
Agent/AODV set sport_ 0
Agent/AODV set dport_ 0
Quote:
made changes in common/packet.h, tcl/ns-default.tcl
Did you compile the edited ns-default.tcl into a new 'ns' ?
Also : Be sure you are using the right 'ns', like : $ cp ns ns-ping3
... And use that copy for the simulation : $ ns-ping3 ping-banerjee.tcl
`ns-lib.tcl' :
In ns-lib.tcl you can add the tcl configuration file :
source ns-ping.tcl
dear knudfl,
I want to develop a multipath routing strategy for manet. i will split my message and put the slices on different paths from the source. where to start the from? how do i split a packet? how to maintain multiple paths? could you please help?
following are the myping.h, myping.cc and myping.tcl files i have written. i have made changes in packet.h, ns-default.tcl, Makefile. still i am getting error----
invalid command name "Agent/MyPing"
while executing
"Agent/MyPing instproc recv {from rtt} {
$self instvar node_
puts "node [$node_ id] received ping answer from \
$from with round-trip-t..."
(file "myping.tcl" line 27)
could anyone please help me out. i cannot find a way out.
myping.h file
Code:
#ifndef ns_myping_h
#define ns_mying_h
#include "agent.h"
#include "tclcl.h"
#include "packet.h"
#include "address.h"
#include "ip.h"
struct hdr_myping{
char ret;
double send_time;
};
class MyPingAgent : public Agent{
public:
MyPingAgent();
int command(int argc, const char*const* argv);
void recv(Packet*, Handler*);
protected:
int off_myping_;
int off_ip_;
};
#endif
myping.cc file
Code:
#include "myping/myping.h"
static class MyPingHeaderClass : public PacketHeaderClass {
public:
MyPingHeaderClass() : PacketHeaderClass("PacketHeader/MyPing",sizeof(hdr_myping)) {}
} class_mypinghdr;
static class MyPingClass : public TclClass{
public:
MyPingClass() : TclClass("Agent/MyPing") {}
TclObject* create(int, const char*const*) {
return(new MyPingAgent());
}
} class_myping;
MyPingAgent::MyPingAgent() : Agent(PT_MYPING)
{
bind("packetSize_", &size_);
bind("off_myping_", &off_myping_);
}
int MyPingAgent::command(int argc, const char*const* argv)
{
if (argc == 2) {
if (strcmp(argv[1], "send") == 0) {
// Create a new packet
Packet* pkt = allocpkt();
// Access the Ping header for the new packet:
hdr_myping* hdr = (hdr_myping*)pkt->access(off_myping_);
//hdr_myping* hdr = hdr_myping::access(pkt);
// Set the 'ret' field to 0, so the receiving node knows
// that it has to generate an echo packet
hdr->ret = 0;
// Store the current time in the 'send_time' field
hdr->send_time = Scheduler::instance().clock();
// Send the packet
send(pkt, 0);
// return TCL_OK, so the calling function knows that the
// command has been processed
return (TCL_OK);
}
}
// If the command hasn't been processed by PingAgent()::command,
// call the command() function for the base class
return (Agent::command(argc, argv));
}
void MyPingAgent::recv(Packet* pkt, Handler*)
{
// Access the IP header for the received packet:
off_ip_=hdr_ip::offset();
hdr_ip* hdrip = (hdr_ip*)pkt->access(off_ip_);
// Access the Ping header for the received packet:
hdr_myping* hdr = (hdr_myping*)pkt->access(off_myping_);
// Is the 'ret' field = 0 (i.e. the receiving node is being pinged)?
if (hdr->ret == 0) {
// Send an 'echo'. First save the old packet's send_time
double stime = hdr->send_time;
// Discard the packet
Packet::free(pkt);
// Create a new packet
Packet* pktret = allocpkt();
// Access the Ping header for the new packet:
hdr_myping* hdrret = (hdr_myping*)pktret->access(off_myping_);
// Set the 'ret' field to 1, so the receiver won't send another echo
hdrret->ret = 1;
// Set the send_time field to the correct value
hdrret->send_time = stime;
// Send the packet
send(pktret, 0);
} else {
// A packet was received. Use tcl.eval to call the Tcl
// interpreter with the ping results.
// Note: In the Tcl code, a procedure 'Agent/Ping recv {from rtt}'
// has to be defined which allows the user to react to the ping
// result.
char out[100];
// Prepare the output to the Tcl interpreter. Calculate the round
// trip time
sprintf(out, "%s recv %d %3.1f", name(),
(hdrip->src_).addr_,
(Scheduler::instance().clock()-hdr->send_time) * 1000);
Tcl& tcl = Tcl::instance();
tcl.eval(out);
// Discard the packet
Packet::free(pkt);
}
}
myping.tcl file
Code:
#Create a simulator object
set ns [new Simulator]
#Open a trace file
set nf [open out.nam w]
$ns namtrace-all $nf
#Define a 'finish' procedure
proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec nam out.nam &
exit 0
}
#Create three nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
#Connect the nodes with two links
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
$ns duplex-link $n1 $n2 1Mb 10ms DropTail
#Define a 'recv' function for the class 'Agent/MyPing'
Agent/MyPing instproc recv {from rtt} {
$self instvar node_
puts "node [$node_ id] received ping answer from \
$from with round-trip-time $rtt ms."
}
#Create two ping agents and attach them to the nodes n0 and n2
set p0 [new Agent/MyPing]
$ns attach-agent $n0 $p0
set p1 [new Agent/MyPing]
$ns attach-agent $n2 $p1
#Connect the two agents
$ns connect $p0 $p1
#Schedule events
$ns at 0.2 "$p0 send"
$ns at 0.4 "$p1 send"
$ns at 0.6 "$p0 send"
$ns at 0.6 "$p1 send"
$ns at 1.0 "finish"
#Run the simulation
$ns run
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
← #20 .
Quote:
Nothing to be done for `all'"
Means : Everything is OK.
Happens when you run 'make' for the second time.
I.e. the first 'make' is run by the './install' command.
* Besides that this "non issue" has been discussed before :
You will get 1,100,000,000 hits with Google, Nothing to be done for `all'"
that's true. but if i write my own "ping" protocol as "MyPing" then the problem happens. this is i am doing for testing. i want to write my own algorithm in ns. so, i took the "Ping" as an example to see how the things are done. could you please suggest that what modification I need to make so that my "MyPing" protocol also works as "Ping"?
when i run ./validate, i get the following error. there were multiple similar kind of errors indicated. what is the problm and how to solve this?
Quote:
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Test/$test $topo"
(procedure "TestSuite" line 40)
(TestSuite runTest line 40)
invoked from within
"TestSuite runTest"
(file "test-suite-simple.tcl" line 1824)
Test output differs from reference output
Diagnose with: diff test-output-simple/tahoe1Bytes.test test-output-simple/tahoe1Bytes
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
← #26 .
A clean ns-2.xx will often fail some tests.
And : If it's a 64bits OS, some tests will always fail.
Editing C++ files, or adding a patch with a new protocol :
Some more, or many tests will / can fail at './validate'.
* Validate is not that important.
The protocols you want to use, are "always" OK.
I.e. I have never seen an added protocol fail,
even with a lot of failed tests.
*** Validate can be skipped, and/or errors can be ignored.
i had to ./configure again...but after i do this get the following:
Code:
ln: failed to create symbolic link `ns': File exists
ln: failed to create symbolic link `nam': File exists
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.18: /home/partha/program/ns-allinone-2.34/{bin,include,lib}
tk8.4.18: /home/partha/program/ns-allinone-2.34/{bin,include,lib}
otcl: /home/partha/program/ns-allinone-2.34/otcl-1.13
tclcl: /home/partha/program/ns-allinone-2.34/tclcl-1.19
ns: /home/partha/program/ns-allinone-2.34/ns-2.34/ns
nam: /home/partha/program/ns-allinone-2.34/nam-1.14/nam
gt-itm: /home/partha/program/ns-allinone-2.34/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns
----------------------------------------------------------------------------------
Please put /home/partha/program/ns-allinone-2.34/bin:/home/partha/program/ns-allinone-2.34/tcl8.4.18/unix:/home/partha/program/ns-allinone-2.34/tk8.4.18/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/partha/program/ns-allinone-2.34/otcl-1.13, /home/partha/program/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>
(2) You MUST put /home/partha/program/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.
After these steps, you can now run the ns validation suite with
cd ns-2.34; ./validate
For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
← #28 .
Quote:
what .. these mean ?
Nothing. Unless you are using a "University Computer",
and have no write permissions to /usr/.
* The executable 'ns' is hard coded to know the location of itīs libraries,
so at large the "year 1999 text" about *PATHīs makes little or no sense.
Assume a computer owned by you, and can do :
$ cd ns-2.34/
$ cp ns ns-backup ( Or any special name you want, e.g. ns-ping.)
$ sudo make install ('make install' will copy ns to /usr/local/bin/).
$ sudo cp ns-backup /usr/local/bin/
I edited mkaefile, makefile.in and Makefile.vc and used ./configure. unfortunately i lost my ns file and copied it from /usr/local/bin. now, when i am using make i am getting the following error
Code:
In file included from mac/mac-802_11Ext.cc:66:0:
mac/mac-802_11Ext.h: In member function ‘u_int32_t PHY_MIBExt::getHdrLen11()’:
mac/mac-802_11Ext.h:175:19: error: expected primary-expression before ‘struct’
mac/mac-802_11Ext.h:175:41: error: ‘dh_body’ was not declared in this scope
mac/mac-802_11Ext.h:175:51: error: ‘offsetof’ was not declared in this scope
mac/mac-802_11Ext.h:177:3: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [mac/mac-802_11Ext.o] Error 1
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.