LinuxQuestions.org
Visit Jeremy's Blog.
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 12-10-2002, 08:32 PM   #1
Sfpiano
LQ Newbie
 
Registered: Dec 2002
Location: PA
Distribution: Ubuntu
Posts: 23

Rep: Reputation: 15
C compiler cannot create executables...


When ever I try to install a program, by typing ./configure, it spits out a list of stuff and then stopps, always saying "Checking for C compiler default output... configure: error: C compiler cannot create executables" One tiem when I tried to install the everybuddy chat program, it said "checking whether the C compiler (gcc ) works... no" and then it said the other thing about not creating an executable.
 
Old 12-10-2002, 09:04 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
on a console type

gcc -v

If it says

bash: gcc: command not found

you probably haven't installed it ;)


Cheers,
Tink
 
Old 12-11-2002, 06:19 PM   #3
Sfpiano
LQ Newbie
 
Registered: Dec 2002
Location: PA
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
Nope, it brings up 'version 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)', so I'm assuming it's there.
 
Old 12-11-2002, 10:05 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hello again...

Hmm ...
What about if you try to compile something from the
commandline?

hello.c
Code:
#include <stdio.h>
int main( void )
{
  printf("\nHello, world!\n");
  exit( 1 );
}
Save that to hello.c and run gcc hello.c -o hello

Cheers,
Tink
 
Old 12-12-2002, 02:19 PM   #5
Sfpiano
LQ Newbie
 
Registered: Dec 2002
Location: PA
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
gcc: installation problem, cannot exec `cpp0': No such file or directory
 
Old 12-12-2002, 11:35 PM   #6
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
Try reinstalling gcc and its assosiated rpms
 
Old 12-11-2003, 09:24 AM   #7
charon79m
Member
 
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297

Rep: Reputation: 30
can not compile executable

I too am working on compiling an app; however, when I run the ./configure I get the follow error:

me@mybox: ./configure
checking for gcc... gcc s
checking for C compiler default output... configure: error: C compiler cannot create executables
check `config.log' for details.

Applicable output of config.log is this:

## ----------- ##
## Core tests. ##
## ----------- ##

configure:1295: checking for gcc
configure:1321: result: gcc s
configure:1563: checking for C compiler version
configure:1566: gcc s --version </dev/null >&5
2.95.4
configure:1569: $? = 0
configure:1571: gcc s -v </dev/null >&5
gcc.real: s: No such file or directory
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
configure:1574: $? = 0
configure:1576: gcc s -V </dev/null >&5
gcc.real: argument to `-V' is missing
configure:1579: $? = 1
configure:1599: checking for C compiler default output
configure:1602: gcc s conftest.c >&5
gcc.real: s: No such file or directory
configure:1605: $? = 1
configure: failed program was:
#line 1582 "configure"
#include "confdefs.h"

int
main ()
{

;
return 0;
}
configure:1632: error: C compiler cannot create executables
check `config.log' for details.


I was able to manually compile your "hello" program and run it without any issue.

Do you have any other suggestion? Also, please let me know if any additional information is needed. Thanks!

## Just noticed this is a 2002 thread... I'll also post in new thread. ##

Last edited by charon79m; 12-11-2003 at 09:28 AM.
 
Old 12-11-2003, 09:30 AM   #8
BSlack
Member
 
Registered: Nov 2003
Location: Italy: 44° 42' N - 12° 11' E
Distribution: Slackware, what else?!!
Posts: 63

Rep: Reputation: 15
Mmmhhh....
Quote:
gcc.real: s: No such file or directory
where this s character come from?
 
Old 12-11-2003, 10:25 AM   #9
charon79m
Member
 
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297

Rep: Reputation: 30
the S

The output posted was from a config.log file that was generated by the configure app. If you would like I can post the entier output of the file.

I have checked the line numbers listed in the config.log file, but I must admit I do not know what the code means.

Here is the output of the configure file in that area:

line 1596:

# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:$LINENO: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Find the output, starting from the most likely. This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.

Line 1609

I see "sed 's/ -o *conftest..."

Is this our myserious "s" and if so, what does it mean.

I should also tell you that I'm getting this error when I run any "configure" file. I orriginally ran into the problem when tring to compile "qpopper" and then found that when I tried to compile "less" to help track down my error with qpopper I also had the error.

Any suggestions?
 
Old 12-11-2003, 10:28 AM   #10
charon79m
Member
 
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297

Rep: Reputation: 30
QPopper config.log file info...

Here is the pertinant info from config.log in my "qpopper" install:

## ------------ ##
## Core tests. ##
## ------------ ##

configure:1019: PATH=".;."; conftest.sh
./configure: conftest.sh: command not found
configure:1022: $? = 127
configure:1033: checking whether make sets ${MAKE}
configure:1053: result: yes
configure:1105: checking for gcc
configure:1120: found /usr/bin/gcc
configure:1128: result: gcc
configure:1356: checking for C compiler version
configure:1359: gcc --version </dev/null >&5
2.95.4
configure:1362: $? = 0
configure:1364: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
configure:1367: $? = 0
configure:1369: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:1372: $? = 1
configure:1392: checking for C compiler default output
configure:1395: gcc conftest.c >&5
/usr/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
configure:1398: $? = 1
configure: failed program was:
#line 1376 "configure"
#include "confdefs.h"

int
main ()
{

;
return 0;
}
configure:1421: error: C compiler cannot create executables


Hope this helps!
 
  


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
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

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

All times are GMT -5. The time now is 10:13 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
Open Source Consulting | Domain Registration