LinuxQuestions.org
Help answer threads with 0 replies.
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-30-2004, 05:48 PM   #1
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Rep: Reputation: 15
checking whether the C compiler (gcc ) works... no


Hello all,

Working with a new installation of Slackware 10 and i'm trying to install the newest version of PHP5 RC3. Although, i'm getting the problem when i run the ./configure command that states...

checking whether the C compiler (gcc ) works... no

Well, i do indeed have gcc installed according to swaret..

Package gcc-3.3.4-i486-1 is already installed!
Package gcc-g++-3.3.4-i486-1 is already installed!
Package gcc-g77-3.3.4-i486-1 is already installed!
Package gcc-gnat-3.3.4-i486-2 is already installed!
Package gcc-java-3.3.4-i486-1 is already installed!
Package gcc-objc-3.3.4-i486-1 is already installed!

I'm trying to figure out how to fix this error. Please don't tell me to search, i've been searching for 5 hours. Please don't tell me to RTFM as i've read so many readme's i'm ready to puke.

Thanks
 
Old 06-30-2004, 05:58 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
maybe the includes (i got this problem a lot when i used LFS/Core linux, read the config.log for more info as to why it claimed it doesn't exist (might wanna search it as its probably a few thousand lines long)
 
Old 06-30-2004, 07:02 PM   #3
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by SciYro
maybe the includes (i got this problem a lot when i used LFS/Core linux, read the config.log for more info as to why it claimed it doesn't exist (might wanna search it as its probably a few thousand lines long)
Here's what the config.log file reads...

Code:
configure:1631: checking host system type
configure:1719: checking for gcc
configure:1832: checking whether the C compiler (gcc  ) works
configure:1848: gcc -o conftest    conftest.c  1>&5
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin
/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure: failed program was:

#line 1843 "configure"
#include "confdefs.h"

main(){return(0);}
 
Old 06-30-2004, 07:22 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
go to a command line, and type this into a file named "simple.c":
Code:
#include <stdio.h>

int main()
{
  printf( "Hello World!\n" );

  return 0;
}
Then execute this command: gcc -o simple simple.c

What errors are reported? If it's a "command not found" error for gcc, then gcc is not located in the environment's PATH.
 
Old 06-30-2004, 07:27 PM   #5
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Dark_Helmet
go to a command line, and type this into a file named "simple.c":
Code:
#include <stdio.h>

int main()
{
  printf( "Hello World!\n" );

  return 0;
}
Then execute this command: gcc -o simple simple.c

What errors are reported? If it's a "command not found" error for gcc, then gcc is not located in the environment's PATH.
root:/# simple.c:1:19: stdio.h: No such file or directory
-bash: simple.c:1:19:: command not found
 
Old 06-30-2004, 07:30 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
It appears that swaret has fscked up the most basic
files that come with the compiler, you're obviously
missing headers (root:/# simple.c:1:19: stdio.h: No
such file or directory) and libraries (/ld: crt1.o: No
such file: No such file or directory)



Cheers,
Tink
 
Old 06-30-2004, 07:38 PM   #7
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Okey dokey... now we're getting somewhere.

gcc works. The problem is, it can't find standard header files. In a nutshell, header files (like stdio.h) provide information on how to use code stored in libraries.

Now, from the command line, type: locate stdio.h

You may have to run updatedb (as root) to make sure the results locate gives you are up-to-date.

If you don't get anything back, then the installation of gcc didn't work so well. Those standard headers are needed for just about every program written.

If you do get some results back, check over the list. See if you can find one located at /usr/include. That is the most common place for those headers to be stored, and is the first place gcc will look for them.

<edit>
You type too quickly Tink
</edit>
 
Old 06-30-2004, 07:53 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by Dark_Helmet

<edit>
You type too quickly Tink ;)
</edit>
I'm not fast, just terse ;)


Cheers,
Tink
 
Old 06-30-2004, 07:55 PM   #9
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Fedora, Gentoo, Ubuntu (all servers at work are openSUSE)
Posts: 6,931

Rep: Reputation: 128Reputation: 128
God's last name is NOT damn!!!!!
 
Old 06-30-2004, 10:32 PM   #10
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Chinaman
God's last name is NOT damn!!!!!
It would have been if he used linux.
 
Old 06-30-2004, 10:38 PM   #11
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
do you have glibc installed which is in the l directory. why its not in d i dont know but you need it to compile c progs.
 
Old 06-30-2004, 11:00 PM   #12
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
If it were that glibc were missing, then the system would be completely shut down. Virtually every program on the system needs access to glibc everytime the program is run.

My money is still on the idea that something somehow either deleted the headers in /usr/include, renamed them, or did something equally sinister to prevent gcc from locating them.
 
Old 06-30-2004, 11:24 PM   #13
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Fedora, Gentoo, Ubuntu (all servers at work are openSUSE)
Posts: 6,931

Rep: Reputation: 128Reputation: 128
Quote:
Originally posted by Transition
It would have been if he used linux.
Just so you realize you've been warned...

"You shall not misuse the name of the LORD your God, for the LORD
will not hold anyone guiltless who misuses his name." ~ Exodus 20:7
 
Old 06-30-2004, 11:35 PM   #14
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Chinaman
Just so you realize you've been warned...

"You shall not misuse the name of the LORD your God, for the LORD
will not hold anyone guiltless who misuses his name." ~ Exodus 20:7
Whatever.. rm god
 
Old 06-30-2004, 11:37 PM   #15
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Fedora, Gentoo, Ubuntu (all servers at work are openSUSE)
Posts: 6,931

Rep: Reputation: 128Reputation: 128
Quote:
Originally posted by Transition
Whatever.. rm god
God will say...

# mv Transition /hell
 
  


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



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 01:35 PM
gcc compiler canyon289 Linux - Software 3 10-23-2004 11:22 PM
GCC compiler .. pashupathinath Programming 1 10-21-2004 01:20 PM
checking version of gcc on RH9 oasisbhrnw99 Linux - Newbie 2 10-18-2004 11:16 PM
SuSE 9.1 Personal Problems checking whether the C compiler (gcc ) works... no angus orion Linux - Newbie 2 07-29-2004 08:14 PM

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

All times are GMT -5. The time now is 06:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration