[SOLVED] How to force NS2 to use the version 4.4 of gcc instead of 4.6.3
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.
How to force NS2 to use the version 4.4 of gcc instead of 4.6.3
hi all
am having some problem with my ns2 , it was working fine up until it doesnt anymore and i am suspecting the updates to be incompatible with the version of my unix system [Ubuntu 12.04 LTS]. in fact when i ran a tcl script it runs in half and exits while it was running perfectely before. i dont know what must be the error because there is no error printd in the screen, apart of the fact that when i check the trace file i can see that the packets were not sent.
i would like to downgrade the gcc to the 4.4 version. How can i do this?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
First : You can have as many versions of gcc/g++ as you want,
installed at the same time.
Using gcc/g++ version 4.4 :
$ cd ns-allinone-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install
*** This is not "forcing", but a quite ordinary command !
Reconfiguring in ns-2.35 :
$ cd ns-allinone-2.35/ns-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./configure
you can export the version ( as above , VERY good option for ns2)
set the version in "Alternatives" ( this is what it is meant for )
or use a shell script to set the links in /usr/bin to the version you want to use
-- the last way is what i use ( very old habit from before alternatives )
First : You can have as many versions of gcc/g++ as you want,
installed at the same time.
Using gcc/g++ version 4.4 :
$ cd ns-allinone-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install
*** This is not "forcing", but a quite ordinary command !
Reconfiguring in ns-2.35 :
$ cd ns-allinone-2.35/ns-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./configure
Hi knudfl
indeed i did that command before posting, while i was installing the 2.35 version (was using ns-allinone2.34)
and i thought it will appear when i typed gcc -v, but it shows the 4.6 version of gcc. so i thought it failed.
Thank you anyway for the assistance, i think of downgrading my version of ubuntu as well to see if ns2 will work again.
thanks
There is NO NEED to reinstall a old version of Ubuntu
Just install a older copy of Gcc
i currently have Gcc 3.4, 4.3 and 4.6 installed and checking Gcc 4.8 for problems with the programs i MUST HAVE
There is NO NEED to reinstall a old version of Ubuntu
Just install a older copy of Gcc
i currently have Gcc 3.4, 4.3 and 4.6 installed and checking Gcc 4.8 for problems with the programs i MUST HAVE
Understood, but a question though, isnt it going to tell me that i already have the most current version of gcc and therefore refuse to download the old one?
if anyone is using ns2, can i forward to him the module to test-on
NO
you install gcc 4.4 along side 4.6
you then export the version to use
or set the version id alternatives
or you set the version using a shell script
BUT you HAVE to install an older version of GCC
i normally have 3 or 4 different versions installed
The software IS DESIGNED so that more than one version can be installed
just like Python is designed
i have 3 versions on Python installed and 4 versions of gcc
NO
you install gcc 4.4 along side 4.6
you then export the version to use
or set the version id alternatives
or you set the version using a shell script
BUT you HAVE to install an older version of GCC
i normally have 3 or 4 different versions installed
The software IS DESIGNED so that more than one version can be installed
just like Python is designed
i have 3 versions on Python installed and 4 versions of gcc
Okay. I did all of that. Ns ia working but still run my tcl script
in half. Guess the problem is elsewhere but for this thread
I could do what i asked for. And installed an old version of gcc
thank you for your assistance, i will mark it as solve.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.