LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 11-01-2004, 11:46 AM   #1
battousai9439
Member
 
Registered: Jul 2004
Distribution: Ubuntu 10.04
Posts: 32

Rep: Reputation: 15
Exclamation GCC 3.4.1 configure script needs CC compiler?


Okay,

I just installed Red Hat 7.3, and tried to install some files unsing the ./configure script. It told me that gcc could not be found. Luckily, I had the tarball for gcc 3.4.1 on a ZIP. So I try to install GCC using the ./configure script, and it tells me

./configure: cc: command not found
***the command "cc -o conftest -g conftest.c" failed.
***You must set the environment variable CC to a working compiler




What should I do, I NEED Gcc installed on my PC! RPMs are not an option right now... don't ask

Oh, and I am still somewhat of a newbie

Last edited by battousai9439; 11-01-2004 at 12:13 PM.
 
Old 11-01-2004, 12:27 PM   #2
NLogN
LQ Newbie
 
Registered: Sep 2004
Distribution: Debian
Posts: 14

Rep: Reputation: 0
Have you looked at the GCC installation instructions?

here

Take a look at the prerequisites.
 
Old 11-01-2004, 12:36 PM   #3
battousai9439
Member
 
Registered: Jul 2004
Distribution: Ubuntu 10.04
Posts: 32

Original Poster
Rep: Reputation: 15
??

That doesn't help

Where can I get this "CC" thing?
 
Old 11-02-2004, 08:25 AM   #4
NLogN
LQ Newbie
 
Registered: Sep 2004
Distribution: Debian
Posts: 14

Rep: Reputation: 0
Here's what you're missing:

Tools/packages necessary for building GCC

ISO C90 compiler
Necessary to bootstrap the GCC package, although versions of GCC prior to 3.4 also allow bootstrapping with a traditional (K&R) C compiler.

To make all languages in a cross-compiler or other configuration where 3-stage bootstrap is not performed, you need to start with an existing GCC binary (version 2.95 or later) because source code for language frontends other than C might use GCC extensions.

-----------------------
Basically, you're trying to compile a compiler (which won't work since you don't have one in the first place). You need to find a binary to install. The redhat RPM would be ideal if you could get it to work, Other than that this is all I could find.
 
Old 11-02-2004, 01:09 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
cc is a standard c compiler under *nix. In many cases, cc may be a link to gcc, IIRC.
 
Old 11-02-2004, 05:28 PM   #6
AgentDukey
Member
 
Registered: Oct 2004
Posts: 33

Rep: Reputation: 15
battousai9439, there are only 2 possibilities what you can do(I've been through it already):
1.Either you missed the C compiler package while you were installing Redhat, so search the cd's for the c compiler package and install it...
2.or try to take an other distro/reinstall

i'm really sure that redhat must have a c compiler. without a c compiler, you can't install an other c compiler, so you're kinda in a trap now
 
Old 11-02-2004, 05:44 PM   #7
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Just get a binary of a c compiler with which to compile gcc. Or just use the binary.
 
Old 11-17-2004, 10:52 AM   #8
pradeepmenon777
Member
 
Registered: Jan 2004
Location: India
Distribution: Android 9.0.6
Posts: 123

Rep: Reputation: 16
thanks this question in here helped me to find a solution to it. that is why i am always satisfied with linuxquestions.org
real good work by the moderators too to group out similar topics in here.

a good search engine also available ..
 
Old 12-16-2004, 11:30 AM   #9
pradeepmenon777
Member
 
Registered: Jan 2004
Location: India
Distribution: Android 9.0.6
Posts: 123

Rep: Reputation: 16
but . sorry to say that this has not solved my problem yet. I installed a 2.96 gcc using the cd rpm . but still i am not able to install or configure anything including the new gcc 3.4.2 .

Do place in your suggestions. waiting for help
do not abandon me .....................
 
Old 12-16-2004, 01:24 PM   #10
laceupboots
Member
 
Registered: Dec 2003
Location: Houston
Distribution: Knoppix,lenova yoga 3, Samsung s6 -android
Posts: 307

Rep: Reputation: 30
You could try rpmseek.com which will give you the source and binary for your version of Redhat. Any dependencies can be found there too. Then you can try to build up to the current version of gcc.
 
Old 12-16-2004, 05:27 PM   #11
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Rep: Reputation: 15
You should really just be able to do startx to get to KDE, then open KPackage, and install the compiler package.

I don't use Redhat, but I think Redhat uses the rpm's and/or invented them.

The KPackage works on many distributions.

Obviously, you cannot compile a compiler without first having the binary installed. At a shell prompt:

gcc -v

should tell you if you have a compiler installed.

In KDE, far left taskbar should be K with orange gears, click and then select System, KPackage and click.

There are many files that need to be installed to run gcc, not just gcc itself. If you have package tool, it will tell you all the files needed, unfortunately, I don't think KPackage or rpm will tell you what entire package to install. In most Linux distributions, you can type pkgtool at the command prompt and select view installed packages. This will tell you what is in a specific package. Most packages run from /a to /yp, with the C and C++ stuff being in the /d package. Although you might think this is all you would need, you'd most likely be wrong. The shared libraries for glibc are in the /a package and a lot of editing stuff is in the gnome package, which is why it is better to do the full install early on. On at least one server. It doesn't matter if you're an FQDN or not, even for experiments, it's better to have everything on hand from the beginning.

The entire Linux install is around 3 gig, and recommended for FQDN servers. This way, everything is there before you need it, but you will probably need a Linux partition of at least 8 gig to handle it all.
I would probably prefer something like 20 gig or even 30 gig for that first Linux native server partition.

You're also getting C, C++, and probably g++ mixed up; you need the entire compiler packages from /a , /d, and I think /gnome, to cross-compile, which is what you're trying to do. Compiling today is almost always cross-compiling. Here's a clue: you need gcc-3.3.4 for gcc-g++-3.3.4 so that C++ can go back and compile C.

So, in the end, I think you're not installing all the necessary packages.

Check your installation of Redhat guide, etc..

You should be able to add the named packages with any of the tools referenced above; rpm [slow, but works], pkgtool [works probably best of all], KPackage [weird operation, as in uses "Open" to install a package and can do unexpected installs/uninstalls if you're not careful, but works nonetheless].

And if you use pkgtool, don't get impatient, it will take a few minutes for it to build a list of packages, just wait til it's done before giving up on it.

Notice that I'm using gcc-3.3.4, it came with the Slackware distritribution. I'll try Redhat again, someday.
 
Old 12-24-2004, 01:33 PM   #12
pradeepmenon777
Member
 
Registered: Jan 2004
Location: India
Distribution: Android 9.0.6
Posts: 123

Rep: Reputation: 16
thank you very much for your detailed help. nowadays no one is ready to help newbies.
so i will certainly do as you said and i understood why i had so much problems now. thank you once again. you have done a great job by spending some time for me. i will surely repay it by helping out other newbies .

LONG LIVE OPEN SOURCE!!!!
LONG LIVE LINUX!!!!
 
  


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
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM
Problem with gcc: configure: error: C compiler cannot create executable abefroman SUSE / openSUSE 4 05-11-2005 06:12 PM
gcc compiler canyon289 Linux - Software 3 10-23-2004 10:22 PM
GCC compiler .. pashupathinath Programming 1 10-21-2004 12:20 PM
GCC compiler...? ph0tik Linux - Newbie 4 04-22-2003 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:39 AM.

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