LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-04-2011, 02:15 AM   #1
kalsoufi
LQ Newbie
 
Registered: Jul 2011
Posts: 12

Rep: Reputation: Disabled
gcc 3.3.1 installation instead of gcc4....


hi every one,
it may not come as a surprise to anyone, however, I thought I can ask about it anyhow.
kindly i need your help.
I want to install NS2.28 on fedora 8, for that purpose I need to degrade my gcc 4.... to gcc 3.3.1.
I remove gcc4 by using yum remove gcc.
now I try to install the old version (gcc3.3.1)
for that purpose, I am following the instructions of the website (http://www.linuxfromscratch.org/blfs...neral/gcc.html)

when I type the following commands :

PATH_HOLD=$PATH &&
export PATH=/opt/gnat/bin:$PATH &&
cd gcc/ada &&
touch treeprs.ads [es]info.h nmake.ad[bs] &&
cd ../.. &&
mkdir ../gcc-build &&
cd ../gcc-build &&
CC=/usr/bin/gcc ../gcc-3.3.3/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++,objc,f77,ada,java --enable-threads=posix \
--enable-__cxa_atexit --enable-clocale=gnu &&
make bootstrap &&
make -C gcc gnatlib_and_tools &&
make -k check &&
make install &&
ln -sf ../usr/bin/cpp /lib &&
ln -sf gcc /usr/bin/cc &&
ln -sf g77 /usr/bin/f77 &&
export PATH=$PATH_HOLD.

I got this error:
bash: --prefix=/usr/local: No such file or directory.

note that I have typed these commands as root.

anyone can help me , I will be grateful
 
Old 07-04-2011, 03:49 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,317

Rep: Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175
Welcome to LQ.

You can have as many compilers as you want, installed at the same time.

'ns-2.28' requires gcc-3.4.6 : # yum install compat-gcc-34-c++
The patch ns-2.28-gcc410.patch must be used.
(ns-allinone-2.28 may even build with the default compiler, g++-4.1.2:
one of the things I never tried on Fedora, gcc 3.4.6 is always present,
and nobody uses the old obsolete Fedora 8 any more.

Building ns-allinone-2.28 is described here, posts # 10 - # 11
http://www.linuxquestions.org/questi...failed-732164/
The complicated instruction is mostly for Ubuntu, Debian.
You can do with the patch alone.
And : export CC=gcc34 CXX=g++34 && ./install


About building a compiler : 1) Never replace the system compiler.
2) '--prefix=/usr' is not right. Should be to a hidden location e.g. opt/gcc333/.
And you can have links to a new compiler in /usr/bin/ gcc333 : g++333
A build example http://www.linuxquestions.org/questi...-1-a-842567/#2
> post #2. ( You don't want to build "gcc-java" / gcj.)

About the ada compiler : # yum install gcc-gnat
Yum Fedora 8 http://www.linuxquestions.org/questi...-5-a-849259/#3
> post #3.

..

Last edited by knudfl; 07-04-2011 at 04:01 AM.
 
Old 07-04-2011, 02:37 PM   #3
kalsoufi
LQ Newbie
 
Registered: Jul 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
many thanks knudfl for your kind help as it is your behavior!
I have used yum install compat-gcc-34-c++,
but when I tried to check gcc version, I got this error:
[khaled@localhost ~]$ gcc -v
bash: gcc: command not found.

one thing more, should I install NS2.34 before going to do the steps that mentioned in Post #10 in http://www.linuxquestions.org/questi...failed-732164/

regards
 
Old 07-04-2011, 05:09 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,317

Rep: Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175
Fedora 8 : The simple method will do : No files from ns-allinone-2.34, no ns-allinone-2.34.

Tested on Fedora 8 today :
tar xvf ns-allinone-2.28 && patch -p0 < ns228-gcc40.patch && export CC=gcc34 CXX=g++34
&& cd ns-allinone-2.28/ && ./install

→ → No errors.

.

Last edited by knudfl; 07-06-2011 at 08:31 AM.
 
Old 07-04-2011, 11:41 PM   #5
kalsoufi
LQ Newbie
 
Registered: Jul 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thank you very much for your help.
I has been installed successfully without NS2.34 or other version.
Dear:
I have changed "patch -p0 < ns228-gcc40.patch" to become "patch -p1 < ns228-gcc40.patch"
I do not know whether I am right or wrong, but anyway NS2.28 is working.

now I will try to patch 802.11e.
if you have suggestion for that, may you let me know.

again thank you very much!
 
Old 07-05-2011, 01:38 AM   #6
kalsoufi
LQ Newbie
 
Registered: Jul 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
I tried to install 802_11e according the instructions of Readme of 802.11e.

however, when I typed make depend, I got this error:
make: *** No rule to make target `mac/802_11e/mac-802_11e.cc', needed by `depend'. Stop.
the major problem:

when I checked NS2 again:
[khaled@localhost ~]$ ns
bash: ns: command not found

so, what is your suggestion?
regards

Last edited by kalsoufi; 07-05-2011 at 01:55 AM.
 
Old 07-06-2011, 08:28 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,317

Rep: Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175
Quote:
No rule to make target `mac/802_11e/mac-802_11e.cc'
Which patch is this about ? ? A link please.


Adding ns and nam to a system PATH :
cd ns-allinone-2.28/ns-2.28/ ; su ; make install
cd ../nam-1.11/ && make install

( 'make install' will copy ns an nam to /usr/local/bin/ ).

..
 
Old 07-06-2011, 12:14 PM   #8
kalsoufi
LQ Newbie
 
Registered: Jul 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thank you very much.
I installed Ns2.28 and 802.11e successfully.
I checked Ns2, it is working.
but nam is not working.

I have used Patch for 802.11 model (ns-2.28) in the following link:
http://www.tkn.tu-berlin.de/research/802.11e_ns2/

Next step, I'll try to edit tcl file.
 
Old 07-06-2011, 12:38 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,317

Rep: Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175
About nam : A patch "tk-8.4-lastevent.patch" is most often used for tk8.4*
to create a usable nam. I got an OK nam yesterday with no patching.

A binary nam for Fedora 8, etc., post #4 here
http://www.linuxquestions.org/questi...29-a-788391/#4



P.S. : #3 ... 'gcc -v' is for the default compiler, gcc-4.1.2 : # yum install gcc-c++
The gcc-3.4.6 compiler : 'gcc34 -v', and 'g++34 -v'

..

Last edited by knudfl; 07-06-2011 at 12:43 PM.
 
  


Reply


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
GCC4.4.2 installation query AmuthaA Programming 1 05-14-2010 04:26 AM
scons gcc gcc4.3 pgreisen Linux - Newbie 3 05-21-2009 12:29 PM
Initial gcc installation-How to compile gcc itself pgb205 Linux - Software 4 02-26-2008 10:24 PM
selecting gcc4 over gcc leone8 Linux - Newbie 2 01-04-2008 01:38 PM
no GCC ? Only GCC4.1 knobby67 Programming 1 08-05-2007 01:21 PM


All times are GMT -5. The time now is 06:21 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