LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-01-2017, 04:35 AM   #1
sinal
LQ Newbie
 
Registered: Mar 2017
Posts: 3

Rep: Reputation: Disabled
installation problem of BGP in NS-2.34


I want to simulate BGP in NS-2.34. I successfully installed NS-2.34. But when i am trying to install NS-BGP i got an error.

I want to execute all this command ,But i cannot execute all got some error which i describe below.
$ cd ns-allinone-2.34/
$ patch p0 < bgp_ns234.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ export CC=gcc41 CXX=g++41 && ./install
$ cd ns-2.34/
$ sudo make install
$ cp ns ns234-bgp
$ sudo cp ns234-bgp /usr/local/bin/

Following steps i done successfully.

1) $ cd ns-allinone-2.34/
$ patch p0 < bgp_ns234.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing (take bgp_ns234.patch)
2)$ export CC=gcc41 CXX=g++41 && ./install

But when i try execute following command.

$ cd ns-2.34/
3)$ sudo make install (failed)
i got error
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install: cannot stst 'ns': No such file or directory
make: *** [install-ns] Error 1


please help me! its urgent...
 
Old 03-01-2017, 08:57 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,038
Blog Entries: 13

Rep: Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488
Hello sinal and welcome to LQ.

Please understand that while your request may be urgent and important for you, that LQ members are volunteers and their sense of urgency is likely different than your case.

The error you are seeing is because the ns binary was failed to be created or was not created because the code was not made.

Typically in a make environment you follow:
Code:
./configure
make
sudo make install
Where the "sudo make install" action copies the binary to a common system directory, and sets up the environment, sets up the manual pages, or establishes links necessary to run the application. If you are installing from source, then you have to first configure to build the source, that is the "./configure" line and then make the source by calling make. What you should do is to enter your ns-allinone-2.34 directory and see if there is a readme file or some other instructions telling you how to install.

Additional information you should cite is the Linux distribution and version you are using.
 
Old 03-07-2017, 05:39 AM   #3
sinal
LQ Newbie
 
Registered: Mar 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks rtmistler for welcoming me on LQ and give suggestion..
But when I wrote 'make' command got an error.

sinal@sinal-VirtualBox:~/Documents/ns-allinone-2.34/ns-2.34$ make
g++ -c -O2 -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/home/sinal/Documents/ns-allinone-2.34/tclcl-1.19 -I/home/sinal/Documents/ns-allinone-2.34/otcl -I/home/sinal/Documents/ns-allinone-2.34/include -I/home/sinal/Documents/ns-allinone-2.34/include -I/home/sinal/Documents/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp -I./sctp -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/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o tcp/tcp_master.o tcp/tcp_master.cc
tcp/tcp_master.cc: In constructor ‘TcpMaster::TcpMaster()’:
tcp/tcp_master.cc:36:31: error: ‘PT_TCPMASTER’ was not declared in this scope
TcpMaster::TcpMaster(): Agent(PT_TCPMASTER) {
^
tcp/tcp_master.cc: In member function ‘FullTcpAgent* TcpMaster:penServer(int, TcpSocket*)’:
tcp/tcp_master.cc:62:12: error: ‘class FullTcpAgent’ has no member named ‘tcpMaster’
agent->tcpMaster = this;
^
tcp/tcp_master.cc:63:12: error: ‘class FullTcpAgent’ has no member named ‘mySocket’
agent->mySocket = listening;
^
In file included from tcp/tcp_master.cc:20:0:
tcp/tcp-full.h:216:7: error: ‘virtual void FullTcpAgent::listen()’ is protected
void listen(); // do passive open
^
tcp/tcp_master.cc:64:17: error: within this context
agent->listen();
^
In file included from tcp/tcp_master.cc:20:0:
tcp/tcp-full.h: In member function ‘FullTcpAgent* TcpMaster:penConnect(int, int, TcpSocket*)’:
tcp/tcp-full.h:216:7: error: ‘virtual void FullTcpAgent::listen()’ is protected
void listen(); // do passive open
^
tcp/tcp_master.cc:77:23: error: within this context
agent->listen();
^
tcp/tcp_master.cc:84:14: error: ‘class FullTcpAgent’ has no member named ‘tcpMaster’
agent->tcpMaster = this;
^
tcp/tcp_master.cc:85:14: error: ‘class FullTcpAgent’ has no member named ‘mySocket’
agent->mySocket = writing;
^
tcp/tcp_master.cc: In member function ‘FullTcpAgent* TcpMaster::newInComing(Packet*, TcpSocket*)’:
tcp/tcp_master.cc:110:12: error: ‘class FullTcpAgent’ has no member named ‘tcpMaster’
agent->tcpMaster = this;
^
tcp/tcp_master.cc:116:12: error: ‘class FullTcpAgent’ has no member named ‘mySocket’
agent->mySocket = sock;
^
In file included from tcp/tcp_master.cc:20:0:
tcp/tcp-full.h:216:7: error: ‘virtual void FullTcpAgent::listen()’ is protected
void listen(); // do passive open
^
tcp/tcp_master.cc:119:17: error: within this context
agent->listen();
^
make: *** [tcp/tcp_master.o] Error 1
 
Old 03-07-2017, 07:18 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,038
Blog Entries: 13

Rep: Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488
Did you configure? Did you check the source for instructions how to make the code? There may be prerequisites you need installed on the system prior to building the code.
 
Old 03-23-2017, 06:50 AM   #5
sinal
LQ Newbie
 
Registered: Mar 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank-you so much rtmistler to give me a replay. Sorry for very late actually I tried some other experiment, but it is not working.
I am newer in LINUX, so I don't know 'How I check the source for instruction? How to I known 'how to a code makes?''
 
Old 03-23-2017, 06:56 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,038
Blog Entries: 13

Rep: Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488
A very typical method to follow would be:
Code:
$ ./configure
$ make
$ sudo make install
However any special instructions, or pre-requisites should be in a file named README or some similar name, perhaps something titled INSTALL or "build instructions". If there is nothing you can then guess that you should follow the typical method shown above, however there are no guarantees. Do you know where you obtained this code from? Can you contact the person who wrote it, if you cannot find any documentation for it?

From reviewing the errors, it simply appears as if you did not do a configure and make set of instructions. But as I'm saying, you need to beware of any special options they may have specified for those steps. There can be options, which are added arguments, which are important for those steps.
 
Old 03-23-2017, 07:41 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,267

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
@rtmistler :
The file "install" takes care of any configuration in all the applications included in ns-allinone-2.xx.


@sinal : There is no gcc41 / g++41 in Ubuntu. Suggest g++34 / gcc34.
64bits :
gcc34 https://drive.google.com/file/d/0B7S...ew?usp=sharing
>> compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb ( for Ubuntu 12.** - 16.** ).
g++34 https://drive.google.com/file/d/0B7S...ew?usp=sharing
>> compat-gcc-34-c++_3.4.6-20_amd64.deb (for all later Ubuntu´s ).

Click the packages : They will be installed.
The ns2 build command is : export CC=gcc34 CXX=g++34 && ./install
If reconfiguring ns-2.34 : export CC=gcc34 CXX=g++34 && ./configure

--
 
  


Reply

Tags
bgp, bgp-ns2, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in installation of ns-2.26 and bgp++ patch in ubuntu 10.04 ershiprashukla88 Linux - Newbie 2 01-17-2016 11:07 PM
LXer: How to set up IPv6 BGP peering and filtering in Quagga BGP router LXer Syndicated Linux News 0 02-18-2015 01:20 PM
LXer: How to filter BGP routes in Quagga BGP router LXer Syndicated Linux News 0 02-02-2015 01:01 PM
Some concepts in BGP netuser Linux - Networking 0 05-13-2012 01:03 AM
Bgp??? pk21 Linux - Networking 3 06-08-2003 11:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration