LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GCC how to install! (https://www.linuxquestions.org/questions/linux-newbie-8/gcc-how-to-install-333517/)

Webo 06-14-2005 12:29 PM

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:

securehack 06-14-2005 01:16 PM

Type in:

tar -xf gcc-3.0.4.tar

Let it extract.

Type in ./config

Crap. Bell rang. Will continue later.

--Abid Kazmi

titanium_geek 06-14-2005 01:30 PM

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

jonaskoelker 06-14-2005 01:36 PM

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 :p
--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 :p
--yes: get gcc from there.

3) are the centralized repositories divided into `main', `contrib' and `non-free'?
--no: switch distro :D
--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

Webo 06-14-2005 02:00 PM

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, :D

jonaskoelker 06-14-2005 03:02 PM

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, :D
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

securehack 06-14-2005 03:34 PM

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

Webo 06-15-2005 02:52 AM

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

jonaskoelker 06-15-2005 05:47 AM

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

securehack 06-15-2005 10:22 AM

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

NCappaZoo 06-15-2005 03:26 PM

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.

securehack 06-15-2005 04:07 PM

To see where gcc is:

type:
which gcc

to see cc:
which cc

--Abid Kazmi


All times are GMT -5. The time now is 11:02 PM.