LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-14-2005, 12:29 PM   #1
Webo
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Rep: Reputation: 0
GCC how to install!


i just got gcc-3.0.4.tar
need to install, simple :-D

need some pointers, i'm new to linux, i can install rpms, easy,
setp by step, if possible, hope it's no trouble , thanx in advance

by the way, i'm using winlinux 2003, compatible to linux 7 or 8

and thanx for telling me where to get gcc: Pengy:
 
Old 06-14-2005, 01:16 PM   #2
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

Rep: Reputation: 30
Type in:

tar -xf gcc-3.0.4.tar

Let it extract.

Type in ./config

Crap. Bell rang. Will continue later.

--Abid Kazmi
 
Old 06-14-2005, 01:30 PM   #3
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Rep: Reputation: 50
isn't it
./configure
?
----------------
the general rules for installing things by compiling them is:

untar it (I can't remember it, but in the previous post it has it)
./configure
make
su (you need to get into root)
password for root
make install
exit (?) (you don't want to be root regularly)

titanium_geek

Last edited by titanium_geek; 06-14-2005 at 01:37 PM.
 
Old 06-14-2005, 01:36 PM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
i just got gcc-3.0.4.tar
I hope I don't sound rude--but 3.0.4 is ancient. Well over three years (http://gcc.gnu.org/releases.html)

...but whatever suits you.

Quote:
need some pointers
Well, first of all:
1) does your distro have some notion of package management?
--no: switch distro
--yes: install gcc via the package management system.

...so, installing via the package management system it is.

2) does your distro provide you with centralized repositories?
--no: switch distro
--yes: get gcc from there.

3) are the centralized repositories divided into `main', `contrib' and `non-free'?
--no: switch distro
--yes: then you're using The Right Distro

(the jury will disregard question 3)

---
A bit more seriously, though: get the most official, reasonably up-to-date gcc package (rpm, deb, whatever) and install it `The <your-distro> way'. I wouldn't know your distro, so I can't offer specific advice.

Quote:
by the way, i'm using winlinux 2003, compatible to linux 7 or 8
There is no linux 7 and 8. You might mean (Red Hat | Mandrake | Slackware | ...) 7 or 8;
Also, if you go to `User CP -> Edit profile -> Distro' and type in your distro, you don't have to repeat it in every post.

Quote:
and thanx for telling me where to get gcc: Pengy:
If someone helped you, it's customary to thank them in the thread where they provided the help.
In that way they're also more likely to find you that you appreciate the help (i.e. if they're subscribed to the thread the get email notification).

hth --Jonas
 
Old 06-14-2005, 02:00 PM   #5
Webo
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Original Poster
Rep: Reputation: 0
well i tried ./configure
i get error. something to do with CC and other things,

then i try ./make
don't have permission, !

anyway, ,thanx for everything, i'm going to try rpm, simple, but lots to download, ,i'll give it a try,

hope my questions were'nt stupid,
 
Old 06-14-2005, 03:02 PM   #6
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
well i tried ./configure
i get error. something to do with CC and other things,
I would recommend that you read http://www.catb.org/~esr/faqs/smart-questions.html

Quote:
then i try ./make
don't have permission, !
It should be `make', not `./make' -- since make isn't in the current directory (`.' means current directory).

Quote:
anyway, ,thanx for everything, i'm going to try rpm, simple, but lots to download, ,i'll give it a try,
'wish you luck.

Quote:
hope my questions were'nt stupid,
Easy: yes
Stupid: no
... we're here to help you, after all.

I hope you enjoy GNU/Linux. Should you ever consider going back to microsoft <whatever>, I suggest you read http://www.microsuck.com/content/whatsbad.shtml

--Jonas
 
Old 06-14-2005, 03:34 PM   #7
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

Rep: Reputation: 30
http://www.microsuck.com/content/whatsbad.shtml
Wow just made that my homepage =P haha.

___________________________________________

Quote:
isn't it
./configure
?
It is configure but some of the packages do include ./config alternatively to ./configure.

Quote:
I hope I don't sound rude--but 3.0.4 is ancient. Well over three years (http://gcc.gnu.org/releases.html)

...but whatever suits you.
Yeah, didn't even notice he had 3.0.4 there. The latest stable edition is gcc-4.0.0. You should definitely get it instead of that.

And most of all, good luck. If you still have questions, come back to this forum anytime. =)

-=-EDIT-=-

By the way, the 4.0.0 supports C and other major languages. You should get this one.
--Abid Kazmi

Last edited by securehack; 06-14-2005 at 03:36 PM.
 
Old 06-15-2005, 02:52 AM   #8
Webo
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Angry i hate giving up...

i'm just starting to get familiar linux system, so bare with me:-)

now, i unpacked gcc to root/gcc3
on the terminal window, i typed ./configure --prefix=/opt/gcc-3.0.4
all the directories are okay, i checked them , i get this error

Configuring for a i686-pc-linux-gnuoldld host.
Created "Makefile" in /gcc3/gcc-3.0.4 using "mt-frag"
*The command 'cc-o conftest -g conftest.c ' failed
*You must set the enviroment variable cc to a working compiler

i tried to set my compiler , so i type ./configure i get

*i686-pc-linux-gnuoldld host

then the same messages as a above
what am i doing worng,



*are there any significants between gcc 3 and 4 , will all apps work with both,
i know 4 is better, it must be
 
Old 06-15-2005, 05:47 AM   #9
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
i'm just starting to get familiar linux system, so bare with me:-)
sure

Quote:
*The command 'cc-o conftest -g conftest.c ' failed
*You must set the enviroment variable cc to a working compiler
This means that you must have a C compiler in order to compile C programs (such as the C compiler)--there a slight `chicken-or-the-egcs (or eggs)' about it.

The solution is getting a (tarball, package) with gcc binaries. I would think they're available from your distro repositories; if not, you can get them from gcc.gnu.org.

hth --Jonas
 
Old 06-15-2005, 10:22 AM   #10
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

Rep: Reputation: 30
That is exactly what I was going to suggest. Another thing that came into my mind was "installpkg" command. I'm not sure if WinLinux03 supports it or not. You can try.

--Abid Kazmi
 
Old 06-15-2005, 03:26 PM   #11
NCappaZoo
LQ Newbie
 
Registered: Aug 2003
Location: Queens, New York, U.S.
Distribution: Linux From Scratch
Posts: 25

Rep: Reputation: 15
what you need to do is set gcc to take over cc calls. Say the version of gcc your using to compile this version of gcc is located in /usr/bin, you will need to make a symbolic link from the gcc binary to cc so you would do something like this :

ln -s /usr/bin/gcc /usr/bin/cc

This should fix your problem.

Last edited by NCappaZoo; 06-15-2005 at 03:27 PM.
 
Old 06-15-2005, 04:07 PM   #12
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

Rep: Reputation: 30
To see where gcc is:

type:
which gcc

to see cc:
which cc

--Abid Kazmi
 
  


Reply



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
how to install gcc? xelt Linux - Newbie 4 04-13-2005 10:03 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
What is GCC and how to you install it? lazicsavo Linux - Software 5 10-25-2004 01:58 PM
Must have gcc to install gcc? thafusion Linux - Software 4 05-28-2004 10:20 PM
cc....gcc....install??? sparrot Linux - Newbie 10 03-31-2003 08:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:41 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
Open Source Consulting | Domain Registration