LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
LinkBack Search this Thread
Old 12-17-2008, 12:15 PM   #1
vic305
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
So I need a C compiler to install a c compiler. Makes sense.


Short version: How do i compile gcc without a previously existing c compiler? Can Anyone point me to an rpm for redhat 5? (rpmfind.net gives me nothing)

Hello,

I'm new to linux, with no background knowledge but with a willingness to spend 150 hours googling in order to get php running on my server. I've found a whole ladder of things that my server lacks, and right now, I've found I don't even have a valid c compiler installed.

I need a c compiler in order to install all the packages I deleted (I deleted apache and mysql in order to reinstall them, since they had issues) and the additional ones I need. But I apparently need a c compiler in order to install the c compiler I want (gcc). Can anyone point me to an RPM or explani how I'd go about this?

I've visited (among hundreds of other sites) this url http://www.cyberciti.biz/faq/howto-i...piler-on-rhel/
but my package manager doesn't seem to recognize the untarred automake, autoconf and gcc folders in my root as packages.

Thank you very much to anyone who read this much. I'm running redhat 5, i think. Here's what cat /etc/*-release returns for me:

Code:
Red Hat Enterprise Linux Client release 5 (Tikanga)
And here's what "version" returns when invoked from /proc/

Code:
Linux version 2.6.18-8.el5 (brewbuilder@ls20-bc2-14.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:21 EST 2007
 
Old 12-17-2008, 04:18 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,029

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
Is there any particular reason why you want to compile these packages?

I am not a redhat user but as far as I know redhat provides binary packages that are already compiled for all the supported packages and architectures. You shouldn't need to compile anything unless you want to add custom patches or do something very specific.
 
Old 12-17-2008, 04:32 PM   #3
vic305
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Actually, I do need to compile mysql in order to properly set up some web app I want on my server. However, if someone could point out where I could get a binary version of GCC for my version of redhat, I would be immensely grateful. I do not have any installation CDs.
 
Old 12-17-2008, 05:38 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by vic305 View Post
Actually, I do need to compile mysql in order to properly set up some web app I want on my server. However, if someone could point out where I could get a binary version of GCC for my version of redhat, I would be immensely grateful. I do not have any installation CDs.
I think pretty much any distro comes with GCC. If you do not have a licensed copy of RHEL (Red-Hat Enterprise Linux), then the easiest thing to do is just get a different distro.

If you really like RHEL, then try CentOS (free and legal clone of RHEL)
 
Old 12-17-2008, 05:58 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, FreeBSD
Posts: 3,925
Blog Entries: 5

Rep: Reputation: Disabled
# yum install gcc
 
Old 12-17-2008, 06:03 PM   #6
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by vic305 View Post
Short version: How do i compile gcc without a previously existing c compiler?
You can't compile any software without compiler. So you can't compile compiler without another compiler.
 
Old 12-17-2008, 09:55 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
first you write an assembler in machine code
then use the assembler to write a BETTER assembler
then use the assembler to write a compiler
then use the compiler to write a BETTER compiler
..
..


OR: Just grab an existing compiler..........
 
Old 12-17-2008, 10:15 PM   #8
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,381
Blog Entries: 3

Rep: Reputation: 169Reputation: 169
that is an easy one gcc is a library about 30 years ago it came like today in a tar ball extracted it and then you used the c header files. today this is a huge library. oh yeah install tar -xfv glibc. installed.
red hat open you red hat 5 or red hat f enterprise. any yum or the old package manager install the development files. if you are using redhat 5 I doubt because it would be way.old
rpm .org. if you have RHE5 then that is here http://unclean.org/howto/gcchowto.html
this is for redhat. google works hope this helps. do not trust anyone that does not let you be the super user on your machine. root not sudo till you die.
 
Old 12-17-2008, 10:30 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
The gcc compiler should be present in your installation media. There is also the http://rpm.pbone.net website. You can filter for RHEL 5 in the advanced search. When you get to the package, it will probably be from a full repository you can use as a source.

You could also download the mysql source package, configure it the way you want, and use rpmbuild to create the package. This can be done on a workstation that has the library versions, and gcc version you need for RHEL 5. There may be a version of Fedora Core that uses equivalent rpm packages. For example, if you had an SLED 10 server, the rpm packages are the same as OpenSuSE 10.1. So a desktop or laptop with OpenSuSE 10.1 could be used to build a mysql package exactly as it would be done on the server. A running server shouldn't have gcc installed. If your server is compromised, it makes it easier for the cracker to compile their own code (such as a root kit). You may want to keep your gcc & library rpms handy so you can uninstall gcc after you are done.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM
My c compiler doesn't work after the cross-compiler installed heracles.cn Linux - Newbie 1 06-05-2007 03:55 AM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 04:31 AM
compile a compiler without a compiler? lackluster Linux - General 18 01-02-2003 07:55 PM


All times are GMT -5. The time now is 05:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration