LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-04-2004, 10:58 AM   #1
Aioria
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Rep: Reputation: 0
Need help! error: C compiler cannot create executables


i want to install gtk+2.4.3
when i run ./configure after uncompress the tarball, i get
error: C compiler cannot create executables
what is the problem?
 
Old 07-04-2004, 11:12 AM   #2
Aioria
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
here is config.log

code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by gtk+ configure 2.4.3, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = Cuiyt
uname -m = i686
uname -r = 2.6.3-7mdk
uname -s = Linux
uname -v = #1 Wed Mar 17 15:56:42 CET 2004

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /sbin
PATH: /usr/sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /usr/local/bin
PATH: /usr/local/sbin


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

configure:1601: checking for a BSD-compatible install
configure:1656: result: /usr/bin/install -c
configure:1667: checking whether build environment is sane
configure:1710: result: yes
configure:1743: checking for gawk
configure:1759: found /bin/gawk
configure:1769: result: gawk
configure:1779: checking whether make sets $(MAKE)
configure:1799: result: yes
configure:2027: checking build system type
configure:2045: result: i686-pc-linux-gnu
configure:2053: checking host system type
configure:2067: result: i686-pc-linux-gnu
configure:2077: checking for native Win32
configure:2088: result: no
configure:2137: checking for gcc
configure:2153: found /usr/bin/gcc
configure:2163: result: gcc
configure:2407: checking for C compiler version
configure:2410: gcc --version </dev/null >&5
gcc (GCC) 3.4.1 (Mandrake Linux (Cooker) 3.4.1-0.1mdk)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2413: $? = 0
configure:2415: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --in
fodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__
cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-languages=c,c++,f77,objc,java --host=i
586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.4.1 (Mandrake Linux (Cooker) 3.4.1-0.1mdk)
configure:2418: $? = 0
configure:2420: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2423: $? = 1
configure:2446: checking for C compiler default output file name
configure:2449: gcc conftest.c >&5
/usr/bin/ld: unrecognized option '--as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
configure:2452: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtk+"
| #define PACKAGE_TARNAME "gtk+"
| #define PACKAGE_VERSION "2.4.3"
| #define PACKAGE_STRING "gtk+ 2.4.3"
| #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=gtk+"
| #define GETTEXT_PACKAGE "gtk20"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2491: error: C compiler cannot create executables
See `config.log' for more details.
 
Old 07-04-2004, 04:31 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Looks like the problem is with ld, the linker. What version of ld do you have? Looks like it's choking on one of the options passed to it. Can you compile this simple C program:

#include <stdio.h>

int main(void)
{
puts("Hello");
return 0;
}

Copy it into a file foo.c and do "gcc foo.c -o foo" (no quotes) and see if it produces an executable called foo that you can run. If it reports a linker error, there's some problem between your compiler and your linker.
 
Old 07-05-2004, 12:53 AM   #4
Aioria
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
yeah, it reports the error
then how to solve the problem
thanks
 
Old 07-05-2004, 01:15 AM   #5
Aioria
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
got it
i upgrade my gcc to a proper version and all is ok now
 
  


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
error: C compiler cannot create executables jimmax777 Linux - Software 3 12-21-2004 06:52 AM
error: C++ compiler cannot create executables sys7em Slackware 2 10-30-2004 06:38 PM
error: C compiler cannot create executables bublebboy Linux - Newbie 8 06-14-2004 10:38 PM
error: C compiler cannot create executables shams Linux - Software 1 02-16-2004 07:23 PM
error: C compiler cannot create executables bublebboy Linux - Newbie 3 12-31-2003 11:31 AM

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

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