Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Helllo there, I don't know if here is the place but I am trying to configure ns on my system, I saw a few tutorials which they were interested and good, but all the time when I try to compile the ns source I get this error and I don't know what should I do to fix it.
Error
Code:
Code:
checking for a BSD-compatible install... /usr/bin/install -c
checking system version (for dynamic loading)... Linux-2.6.31-14-generic
No explicit static compilation flag; setting V_STATIC to ""
checking for dlopen in -ldl... yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
rm -f libotcl.so otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/bogdan/ns/ns-allinone-2.34/include -I/home/bogdan/ns/ns-allinone-2.34/include -I/home/bogdan/ns/ns-allinone-2.34/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/bogdan/ns/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/bogdan/ns/ns-allinone-2.34/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Welcome to LQ.
I guess, you already have all the requirements :
libx11-dev , libxmu-dev , libxmu-headers , libxt-dev , libtool
The problem can be the gcc-4.4.1 / g++-4.4.1 compilers.
But I am not sure , gcc-4.4.0 / g++-4.4.0 works fine on
Fedora 11 with ns-allinone-2.34 .
But please try this : sudo apt-get install g++-4.3
.. and ' CC=gcc-4.3 CXX=g++-4.3 ./install '
I have not yet installed Ubuntu 9.10 Karmic, may be later today.
( The Swedish Ubuntu download link works at max. speed.)
And I will then test compile ns-allinone-2.34 .
Other ns2 info here at LQ : Main Menu > > LQ Search → Tag Name = ns2
.....
I guess, you already have all the requirements :
libx11-dev , libxmu-dev , libxmu-headers , libxt-dev , libtool
The problem can be the gcc-4.4.1 / g++-4.4.1 compilers.
But I am not sure , gcc-4.4.0 / g++-4.4.0 works fine on
Fedora 11 with ns-allinone-2.34 .
But please try this : sudo apt-get install g++-4.3
.. and ' ./install CC=gcc-4.3 CXX=g++-4.3
I have not yet installed Ubuntu 9.10 Karmic, may be later today.
( The Swedish Ubuntu download link works at max. speed.)
And I will then test compile ns-allinone-2.34 .
Other ns2 info here at LQ : Main Menu > > LQ Search → Tag Name = ns2
.....
I did what have you told me but now I got this error,
Code:
checking for a BSD-compatible install... /usr/bin/install -c
checking system version (for dynamic loading)... Linux-2.6.31-14-generic
No explicit static compilation flag; setting V_STATIC to ""
checking for dlopen in -ldl... yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
rm -f libotcl.so otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/bogdan/ns/ns-allinone-2.34/include -I/home/bogdan/ns/ns-allinone-2.34/include -I/home/bogdan/ns/ns-allinone-2.34/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/bogdan/ns/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/bogdan/ns/ns-allinone-2.34/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
I recommend this :
Ubuntu : sudo apt-get install tcl8.4 tk8.4
cd ns-allinone-2.34/otcl-1.13/ &&
./configure --prefix=/usr --enable-release --enable-devel
&& make && sudo make install
cd ../tclcl-1.19/ &&
./configure --prefix=/usr --enable-release --enable-devel
&& make && sudo make install
cd ../ns-2.34/
sudo make install
cd ../nam-1.14/
sudo make install
cd /usr/local/bin/
sudo strip *
.. And thus avoid setting any new path's to run ns and nam.
.. The install only copies 18 files to /usr/local/
.. Ubuntu910 has tcl8.4.19 / tk8.4.19 as default.
.. So you can immediately run e.g. ' ns example1.tcl '
.....
.....
Good luck!
.....
P.S. : please see some seven ' examples.tcl ' attached here : http://www.linuxquestions.org/questi...993/page2.html
Not all will work .. may be you can edit them to do so ?
Or may be tcl / tk 8.4.19 isn't 100% compatibel with the
8.4.18 compiled ns-allinone files ?
.....
.....
P.S. _ P.S. : validate overall report : all tests passed.
.....
Sorry, my mistake. The correct order seems to be
' CC=gcc-4.3 CXX=g++-4.3 ./install '
And, by the way, there are no c++ code in otcl,
so the 'CC=gcc-4.3 ./install' alone will probably do.
But as only ' otcl ' dislikes gcc-4.4.1, I will choose
this solution : Edit ' otcl-1.13/Makefile.in ', line 7
Code:
From :
CC= @CC@
to :
CC= gcc-4.3
... And ns-allinone-2.34 compiles on Ubuntu 9.10 with no errors.
I will attach the result of ' ./validate ' here when it has
finished.
.....
hello mate, is working thanks for your help, i didn't had to modify nothing, i did what you have told me and now is working perfectly as i was want it, thanks a lot i need it so much for my school project, cool.
i have a question to ask, i have to build a cluster with 100 pc what i am interested is in hardware, can you give me some advices regarding to this. thanks again and good luck...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.