[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.
[tools/random.o] Error 127 in ns-2.34 + ubuntu 12.04
Due to my project work i need to modify the ns-bgp modules...after modifying the cc file..i used the following command to recompile it..
$make clean
$make
it gives me the following error.
@knudfl
I reconfigure my ns using:
reconfigure ns-2.34/ :
$ export CC=gcc-4.4 CXX=g++-4.4 && ./configure
$ make clean && make
It shows me the following error.
In file included from bgp/Util/ipaddress.cc:21:
bgp/Util/ipaddress.h:89: error: too many decimal points in number
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
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
In post #1 you are saying :
Quote:
I need to modify the ns-bgp modules.
.
after modifying the cc file
I guess you can watch your coding errors in post #3 :
Quote:
In file included from bgp/Util/ipaddress.cc:21:
bgp/Util/ipaddress.h:89: error: too many decimal points in number
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
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
← ref. #10.
? Any particular reason for using the old (and wrong) texts from http://ns2-ubuntu.blogspot.in/2013_03_01_archive.html
The otcl-1.13/configure edit´s don't work with Ubuntu 12.04 - 32 any more.
Hence the patch otcl_ns234_gcc-4.4.patch : Made up for a reason.
Please use the 2015 updated, and easier / simpler steps from post #2 :
»»»»»»»» Ns2 prerequisites : $ sudo apt-get install \
g++ g++-4.4 automake make patch libtool libxmu-dev xgraph
Building ns-allinone-2.34/ + BGP :
$ cd ns-allinone-2.34/
$ patch -p0 < otcl_ns234_gcc-4.4.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ patch -p0 < bgp_ns234.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
««««««««
And : $ cd ns-2.34/
$ sudo make install
$ cp ns ns234-bgp
$ sudo cp ns234-bgp /usr/local/bin/
... Then all simulation can be done with $ ns234-bgp file.tcl
And .... you can delete any entries made to .bashrc.
The old ~1999 text is meant for a "University Computer" only.
I.e. when you had no write or install permissions to /usr/.
Don't believe everything on the Internet.
Most ns2 "tutorials" are written by young students,
who are using ns2 and a Linux OS for the first time.
And texts are usually copied from texts written by other students.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
← ref. #12.
Please "read" the patch, bgp_ns234.patch :
$ grep -n Makefile.in bgp_ns234.patch
... to know that MRAI is present :
12229 ..... bgp/Timing/mraitimer.o bgp/Timing/mraiperpeertimer.o \
And : $ grep -n mrai bgp_ns234.patch
So I think that I included rfd_mrai.
You have : ns-2.34/bgp/{files.cc, .h, Comm/*, Path/*, Timing/*, Util/*}.
The older? "patch package", ns-2.34-bgp-rfd-mrai.tar.gz is with fewer files:
ns-2.34/bgp/{files.cc, .h, Timing/* }.
Suggest : Setup another ns-allinone-2.34/ to check differences.
You can have as many ns-allinone-2.34/ as you want, installed at the same time.
But do not add any *PATH text to .bashrc ( Never required.)
The (6.6 MB) package bgp-ns-2.34-ubuntu1004_i386.deb :
Provides /usr/local/bin/{ ns-bgp, ns-bgp-rfd }.
And is just an easy way for running the simulations,
.. without having to build ns-allinone-2.34 + [bgp, rfd_mrai].
1) I extracted the ns-allinone-2.34.tar.gz file
2) Copied otcl_ns234_gcc-4.4.patch file into ns-allinone-2.34 folder
3) Executed patch p0 < otcl_ns234_gcc-4.4.patch command, it shows the following error
bsnl@bsnl-HCL-Notebook:~/Desktop/ns-allinone-2.34$ patch p0 < otcl_ns234_gcc-4.4.patch
patching file p0
Hunk #1 FAILED at 13.
1 out of 1 hunk FAILED -- saving rejects to file p0.rej
bsnl@bsnl-HCL-Notebook:~/Desktop/ns-allinone-2.34$
--------------------
p0.ref file contents is as follows...
--- Makefile.in 2009-06-14 19:35:49.000000000 +0200
+++ Makefile.in 2014-09-30 11:31:47.000000000 +0200
@@ -13,7 +13,7 @@
# how to compile, link, and name shared libraries
#
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.