LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-04-2004, 02:34 PM   #1
jcai
Member
 
Registered: Sep 2004
Distribution: Fedora 5
Posts: 48

Rep: Reputation: 15
c compiler not working


so im trying to configure lynx, and it tells me
checking whether the C compiler (gcc ) works... no

any idea what's going on?
 
Old 11-04-2004, 02:55 PM   #2
greg.hellings
LQ Newbie
 
Registered: Nov 2004
Location: Houghton, New York
Distribution: Gentoo, Fedora Core 2, Debian, Knoppix
Posts: 12

Rep: Reputation: 0
A few options:
gcc is too old
You are passing bad CFLAGS
gcc doesn't exist
gcc is actually an alias for an incompatible compiler

Those are the baics I would start with.
 
Old 11-04-2004, 03:00 PM   #3
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
you probably don't have the header files ( development packages) installed in your distribution.
 
Old 11-04-2004, 05:51 PM   #4
netstv
Member
 
Registered: May 2004
Location: Martinez, CA
Distribution: Ubuntu
Posts: 38

Rep: Reputation: 15
from your command prompt type:

which gcc

that will tell you if you have gcc installed.

-netstv
 
Old 11-04-2004, 07:28 PM   #5
jcai
Member
 
Registered: Sep 2004
Distribution: Fedora 5
Posts: 48

Original Poster
Rep: Reputation: 15
so im sure that gcc is installed, and its the newest version, but somehow it wont work. my friend to me that possibly i installed the newer version over the older version, which can be problematic. is there any way i can purge my computer of gcc and then install it again?
 
Old 11-05-2004, 11:51 AM   #6
netstv
Member
 
Registered: May 2004
Location: Martinez, CA
Distribution: Ubuntu
Posts: 38

Rep: Reputation: 15


Ok. So. You still need to type

gcc -v

that will tell you what version of gcc you are running.

I haven't ever tried to install another version of gcc. My guess is, if you did it the way the INSTALL or README told you to do it that it would do all the right stuff to prevent problems. GNU things are pretty good about taking care of those types of things.

The bottom line is you need to ensure that you have the right version and by doing the "gcc -v" you are going to find out what version you have. That will solve your problem.

Because you may have thought you installed the latest version but you may not have installed it in the right place so you may be running an older version of gcc.

So "gcc -v" and "which gcc" will tell you all you need.

-netstv
 
Old 11-05-2004, 04:44 PM   #7
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
i've gone through several versions on this box, including these:
egcs-2.91.66 3.0.1 3.0.2 3.0.4 3.1 3.2.2 and currently have 2.95.3 and 3.2.2 installed and i pick between them as i wish.
i've gotten that error twice. once when i stripped all the symbols from all libraries on the system (no compiling after that), and once when i didn't have the libc header files installed when i first set up the box. when a package checks to see if the compiler works, it compiles a very simple program, and if it doesn't work, for whatever reason, you get that message.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error installing perl - c compiler not working abtimoteo Slackware 5 01-08-2005 11:06 PM
I getting the error you must set the environmnet variable to a working compiler Devo174 Linux - Laptop and Netbook 1 06-08-2004 11:40 AM
GCC3.3-version C Compiler not working etto2004 Linux - Newbie 2 03-04-2004 07:55 AM
setting environmental variable cc to a working compiler blathen Linux - Newbie 2 10-27-2003 12:30 AM
Must set the environment variable CC to a working compiler MrCarl Linux - Software 1 09-23-2003 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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