[tools/random.o] Error 127 in ns-2.34 + ubuntu 12.04
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
1) I extracted the ns-allinone-2.34.tar.gz file
2) Edited "otcl-1.13/Makefile" line 16, from
SHLIB_LD= @SHLIB_LD@
to :
SHLIB_LD= gcc -shared as directed..
3) bsnl@bsnl-HCL-Notebook:~/Desktop/ns-allinone-2.34$ patch p0 < bgp_ns234.patch
This is what happened..
patching file p0
The next patch would create the file p0,
which already exists! Assume -R? [n] y
patching file p0
Hunk #1 FAILED at 1.
File p0 is not empty after patch, as expected
1 out of 1 hunk FAILED -- saving rejects to file p0.rej
The next patch would create the file p0,
which already exists! Assume -R? [n]
Contents of p0
----------------------
Code:
/*
* Copyright (c) 2003 Communication Networks Lab, Simon Fraser University.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Authors: Tony Dongliang Feng <tdfeng@cs.sfu.ca>, Brian J. Premore.
*
*/
#include "adjribin.h"
// ----- constructor AdjRIBIn -------------------------------------------- //
/**
* Constructs an element of Adj-RIBs-In with a reference to the local BGP
* protocol agent and the peer associated with it.
*
* @param b The local BGP protocol agent.
* @param pe The peer with which this Adj-RIB-In is associated.
*/
AdjRIBIn::AdjRIBIn(PeerEntry *pe, rtProtoBGP *b):RIBElement(b){
peer = pe;
}
AdjRIBIn::~AdjRIBIn() {}
// ----- AdjRIBIn::add ---------------------------------------------------- //
/**
* Adds route information. If route information with the same NLRI already
* exists, then the add fails and the pre-existing information is returned.
*
* @param info The route information to add.
* @return pre-existing route information, if any
*/
RouteInfo * AdjRIBIn::add(RouteInfo * info) {
RouteInfo * ri = RIBElement::add(info);
if (ri != NULL) {
printf( "adding routing to AdjRIBIn failed! \n");
}
return ri;
}
// ----- AdjRIBIn::replace ------------------------------------------------ //
/**
* Adds route information, replacing any pre-existing information with the
* same NLRI.
*
* @param info The route information to add.
* @return the pre-existing route information, or null if there was none
*/
RouteInfo * AdjRIBIn::replace(RouteInfo *info) {
RouteInfo *ri = RIBElement::replace(info);
return ri;
}
// ----- AdjRIBIn::remove ------------------------------------------------- //
/**
* Removes the route information corresponding to the given route
* destination.
*
* @param ipa The destination of the route information to remove.
* @return the removed route information
*/
RouteInfo * AdjRIBIn::remove(IPaddress * ipa) {
RouteInfo * ri = RIBElement::remove(ipa);
// if (ri == NULL) {
// printf( "The route being removed is not in AdjRIBIn! \n");
// }
return ri;
}
contents of p0.rej
========================
Code:
--- adjribin.h 2008-08-01 04:45:34.000000000 +0200
+++ adjribin.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2003 Communication Networks Lab, Simon Fraser University.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * Authors: Tony Dongliang Feng <tdfeng@cs.sfu.ca>, Brian J. Premore.
- *
- */
-
-#ifndef ADJRIBIN_H
-#define ADJRIBIN_H
-
-#include "ribelement.h"
-
-class PeerEntry;
-class rtProtoBGP;
-
-/**
- * One element of the Adj-RIBs-In section of BGP's Routing Information Base.
- */
-class AdjRIBIn : public RIBElement {
-public:
- AdjRIBIn(PeerEntry *pe, rtProtoBGP *b);
- ~AdjRIBIn();
- RouteInfo * add(RouteInfo * info);
- RouteInfo * replace(RouteInfo *info);
- RouteInfo * remove(IPaddress *ipa);
-
-public:
- /** The peer with whom this element of Adj-RIB-In is associated. */
- PeerEntry * peer;
-};
-
-#endif
===============================================
Please help...
Last edited by krkrajeshkannan; 02-28-2015 at 05:03 AM.
Reason: Code tags updated
Sorry for typo´s : The patch command is 'patch -p0 < [destination].
Not 'patch p0 ' : The hyphen ( - ) is missing. http://linux.die.net/man/1/patch
→ patch -p[num] < patchfile
Please edit post #16 : You can delete the dummy "p0" code.
There is no real file p0. Is a result of a choked patch command.
Editing : The 'Edit' button.
I have succeed in applying patches otcl_ns234_gcc-4.4.patch and bgp_ns234.patch
when trying to execute "~/Desktop/ns-allinone-2.34$ export CC=gcc-4.4 CXX=g++-4.4 && ./install" command the following error appears, kindly advice..
Error:
Code:
ne-2.34/include -I/home/bsnl/Desktop/ns-allinone-2.34/include -I/home/bsnl/Desktop/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 bgp/Util/ipaddress.o bgp/Util/ipaddress.cc
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::bin2str(boolVector)’:
bgp/Util/ipaddress.cc:295: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::val2str()’:
bgp/Util/ipaddress.cc:667: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::toString()’:
bgp/Util/ipaddress.cc:698: error: ‘sprintf’ was not declared in this scope
make: *** [bgp/Util/ipaddress.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
make command in the last step, i am getting this error..
Code:
/Desktop/ns-fld/ns-allinone-2.34/lib -ltk8.4 -L/home/bsnl/Desktop/ns-fld/ns-allinone-2.34/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm -lm
bgp/peer-entry.o: In function `PeerEntry::PeerEntry()':
peer-entry.cc:(.text+0x161b): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x166a): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x17c0): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text+0x17df): undefined reference to `CRule::~CRule()'
bgp/peer-entry.o: In function `PeerEntry::PeerEntry()':
peer-entry.cc:(.text+0x1ac3): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x1b12): undefined reference to `CRule::CRule(bool)'
peer-entry.cc:(.text+0x1c68): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text+0x1c87): undefined reference to `CRule::~CRule()'
bgp/peer-entry.o: In function `PeerEntry::~PeerEntry()':
peer-entry.cc:(.text._ZN9PeerEntryD0Ev[PeerEntry::~PeerEntry()]+0x31): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text._ZN9PeerEntryD0Ev[PeerEntry::~PeerEntry()]+0x4a): undefined reference to `CRule::~CRule()'
peer-entry.cc:(.text._ZN9PeerEntryD0Ev[PeerEntry::~PeerEntry()]+0x6b): undefined reference to `CRule::~CRule()'
bgp/peer-entry.o:peer-entry.cc:(.text._ZN9PeerEntryD1Ev[PeerEntry::~PeerEntry()]+0x31): more undefined references to `CRule::~CRule()' follow
bgp/rtProtoBGP.o: In function `rtProtoBGP::config_filter()':
rtProtoBGP.cc:(.text+0x29d): undefined reference to `CPrefixList::CPrefixList(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, int)'
rtProtoBGP.cc:(.text+0x315): undefined reference to `CPrefixList::~CPrefixList()'
rtProtoBGP.cc:(.text+0x32c): undefined reference to `CPrefixList::~CPrefixList()'
bgp/rtProtoBGP.o: In function `rtProtoBGP::advertisable(RouteInfo*, PeerEntry*)':
rtProtoBGP.cc:(.text+0x4a5): undefined reference to `CRule::applyTo(Route&)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::decision_process_2(std::vector<RouteInfo*, std::allocator<RouteInfo*> >, bool)':
rtProtoBGP.cc:(.text+0x772): undefined reference to `DampInfo::update(bool, RouteInfo*)'
rtProtoBGP.cc:(.text+0x887): undefined reference to `DampInfo::update(bool, RouteInfo*)'
rtProtoBGP.cc:(.text+0xac9): undefined reference to `DampInfo::update(bool, RouteInfo*)'
rtProtoBGP.cc:(.text+0xb85): undefined reference to `DampInfo::DampInfo(RouteInfo*, rtProtoBGP*, double, double, double, double, double, double)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::decision_process_1(std::vector<RouteInfo*, std::allocator<RouteInfo*> >)':
rtProtoBGP.cc:(.text+0xfc9): undefined reference to `CRule::applyTo(Route&)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::handle_update(UpdateMessage*)':
rtProtoBGP.cc:(.text+0x43e2): undefined reference to `vecRoutes::add(Route*)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::conf()':
rtProtoBGP.cc:(.text+0x77d9): undefined reference to `reusableMRAItimer::reusableMRAItimer(rtProtoBGP*)'
rtProtoBGP.cc:(.text+0x78ca): undefined reference to `reusableMRAItimer::set_offset(float)'
rtProtoBGP.cc:(.text+0x7e37): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7e54): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7ea6): undefined reference to `CRule::~CRule()'
rtProtoBGP.cc:(.text+0x7ec3): undefined reference to `CRule::~CRule()'
rtProtoBGP.cc:(.text+0x7ef4): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7f11): undefined reference to `CRule::CRule(bool)'
rtProtoBGP.cc:(.text+0x7f63): undefined reference to `CRule::~CRule()'
rtProtoBGP.cc:(.text+0x7f80): undefined reference to `CRule::~CRule()'
bgp/rtProtoBGP.o: In function `rtProtoBGP::show_damping_info()':
rtProtoBGP.cc:(.text+0x89e2): undefined reference to `DampInfo::toString()'
bgp/rtProtoBGP.o: In function `rtProtoBGP::rtProtoBGP()':
rtProtoBGP.cc:(.text+0xabec): undefined reference to `CPUTimer::CPUTimer(rtProtoBGP*)'
bgp/rtProtoBGP.o: In function `rtProtoBGP::rtProtoBGP()':
rtProtoBGP.cc:(.text+0xb3da): undefined reference to `CPUTimer::CPUTimer(rtProtoBGP*)'
bgp/rtProtoBGP.o: In function `void std::_Destroy<CAtomicPredicate>(CAtomicPredicate*)':
rtProtoBGP.cc:(.text._ZSt8_DestroyI16CAtomicPredicateEvPT_[void std::_Destroy<CAtomicPredicate>(CAtomicPredicate*)]+0xd): undefined reference to `CAtomicPredicate::~CAtomicPredicate()'
bgp/rtProtoBGP.o: In function `void std::_Destroy<CAtomicAction>(CAtomicAction*)':
rtProtoBGP.cc:(.text._ZSt8_DestroyI13CAtomicActionEvPT_[void std::_Destroy<CAtomicAction>(CAtomicAction*)]+0xd): undefined reference to `CAtomicAction::~CAtomicAction()'
bgp/rtProtoBGP.o: In function `CClause::CClause(CClause const&)':
rtProtoBGP.cc:(.text._ZN7CClauseC1ERKS_[CClause::CClause(CClause const&)]+0x43): undefined reference to `CPredicate::~CPredicate()'
bgp/rtProtoBGP.o: In function `void std::_Destroy<CClause>(CClause*)':
rtProtoBGP.cc:(.text._ZSt8_DestroyI7CClauseEvPT_[void std::_Destroy<CClause>(CClause*)]+0xd): undefined reference to `CClause::~CClause()'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Sir, kindly help to resolve. i am awaiting for your guidance...
Last edited by krkrajeshkannan; 03-19-2015 at 01:12 AM.
Reason: Typo error
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.