LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 06-10-2004, 03:17 PM   #1
rbmako69
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
My C compiler cannot create executables, help


every time i try and run a ./configure file after uncompressing a tarball, i get this error: "checking for C compiler default output... configure: error: C compiler cannot create executables"

Then it just returns to the prompt

I need help badly
 
Old 06-10-2004, 03:30 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
What is the output of "echo $CC"
Is it gcc? Maybe this is a permissions problem. Are you trying to compile software as a regular user in a directory you don't have write permission in?
 
Old 06-10-2004, 03:32 PM   #3
rbmako69
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
the output is a blank line or no output

I am running as root in my home directory
 
Old 06-11-2004, 08:05 AM   #4
rbmako69
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Thumbs down

I guess no one can help me.
 
Old 06-11-2004, 09:25 AM   #5
maxware
LQ Newbie
 
Registered: Dec 2003
Location: Memphis, TN
Posts: 19

Rep: Reputation: 0
Have you checked to make sure gcc is installed?
 
Old 06-14-2004, 07:52 AM   #6
rbmako69
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Im not totally sure if it is. how do i check?
 
Old 06-14-2004, 08:07 AM   #7
cleff
Member
 
Registered: Mar 2003
Posts: 37

Rep: Reputation: 15
try this:
$ gcc

if that doesn't work, then try
# updatedb
# locate gcc
 
Old 06-14-2004, 08:32 AM   #8
rbmako69
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
I did those commands, and it had no effect, im still getting the same error that the gcc compiler cannot create executables. Heres the ./configure output....

[root@localhost httpd-2.0.49]# ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
Configuring APR library
Platform: i686-pc-linux-gnulibc1
checking for working mkdir -p... yes
APR Version: 0.9.5
checking for chosen layout... apr
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
configure failed for srclib/apr
[root@localhost httpd-2.0.49]#
 
Old 06-14-2004, 08:35 AM   #9
cleff
Member
 
Registered: Mar 2003
Posts: 37

Rep: Reputation: 15
those commands were to check if you have gcc installed. So...do you?
 
Old 06-14-2004, 09:21 AM   #10
rbmako69
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
yes, but it still cannot create executables
 
Old 06-14-2004, 04:53 PM   #11
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
This is just a guess but in the kernel configuration there are two options, one for creating a.out executables, and one for creating ELF binaries. Perhaps this is the problem.

If you are using a custom kernel go into the top-level source and run:
Code:
cat .config | grep ELF
You should see:
Code:
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
If you do not see these you may need to recompile your kernel. Again though...this is just a guess. It would seem odd that you have gcc installed but it cannot create executables.

Another thought: you may need the kernel headers installed.

Last edited by bulliver; 06-14-2004 at 04:57 PM.
 
Old 06-16-2004, 08:15 AM   #12
rbmako69
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Im not running a custom kernel. Im running the new version of redhat ws. Is what you told me to do still apply
 
Old 06-16-2004, 02:07 PM   #13
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
Well the kernel should be fine then. My only suggestion is to install the kernel headers. There should be an rpm package on the redhat install discs.
 
Old 06-16-2004, 02:14 PM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
You never posted the output of
locate gcc
or
gcc --version

Personally I think that it's just not installed ;)


Cheers,
Tink
 
Old 06-16-2004, 02:18 PM   #15
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
Tinkster: but what about this from his .configure output:
Code:
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
It would seem it is installed but broken somehow.
 
  


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
C++ compiler cannot create executables eomerek Linux - Newbie 28 12-13-2010 09:14 AM
C compiler cannot create executables packets Linux - Security 3 05-03-2010 05:30 PM
C++ compiler cannot create executables notmatt Linux - Newbie 4 09-30-2004 07:59 AM
C compiler cannot create executables w0lv3rin3 Linux - Software 4 08-07-2004 10:44 AM
C compiler cannot create executables londonboi Debian 2 09-23-2003 02:41 AM


All times are GMT -5. The time now is 01:39 PM.

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