[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C compiler cannot create executables
From: |
Lee Duke |
Subject: |
Re: C compiler cannot create executables |
Date: |
Tue, 18 Apr 2006 08:35:38 -0400 |
User-agent: |
Thunderbird 1.5 (X11/20051201) |
Ralf,
I'm still getting the same error. I followed the your tutorial until page
113. Then I got the following:
% ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
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.
The config.log file provided the following information:
## --------- ##
## Platform. ##
## --------- ##
hostname = localhost.localdomain
uname -m = i686
uname -r = 2.6.16-1.2069_FC4
uname -s = Linux
uname -v = #1 Tue Mar 28 12:19:10 EST 2006
/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: /usr/kerberos/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/X11R6/bin
PATH: /usr/games
PATH: /home/duke/bin
PATH: /sbin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1309: checking for a BSD-compatible install
configure:1364: result: /usr/bin/install -c
configure:1375: checking whether build environment is sane
configure:1418: result: yes
configure:1483: checking for gawk
configure:1499: found /usr/bin/gawk
configure:1509: result: gawk
configure:1519: checking whether make sets $(MAKE)
configure:1539: result: yes
configure:1753: checking for gcc
configure:1769: found /usr/bin/gcc
configure:1779: result: gcc
configure:2023: checking for C compiler version
configure:2026: gcc --version </dev/null >&5
gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)
Copyright (C) 2005 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:2029: $? = 0
configure:2031: gcc -v </dev/null >&5
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--host=i386-redhat-linux
Thread model: posix
gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
configure:2034: $? = 0
configure:2036: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2039: $? = 1
configure:2062: checking for C compiler default output file name
configure:2065: gcc conftest.c :/usr/lib >&5
gcc: :/usr/lib: No such file or directory
configure:2068: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "amhello"
| #define PACKAGE_TARNAME "amhello"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "amhello 1.0"
| #define PACKAGE_BUGREPORT [1]"address@hidden"
| #define PACKAGE "amhello"
| #define VERSION "1.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2107: error: C compiler cannot create executables
As I said, the compiler works fine when I'm not using configure. Is there
some way to (temporarily) get around all (or some of) these compiler
checks? I'm willing to use any kind of workaround until I can figure out
what the root problem is.
Lee
Ralf Wildenhues wrote:
Hi Lee,
* Lee Duke wrote on Tue, Apr 18, 2006 at 11:09:54AM CEST:
First, I'm new to the Gnu Autotools.
Then take this tutorial and read it:
[2]http://www-src.lip6.fr/homepages/Alexandre.Duret-Lutz/autotools.html
For reference, there is also the info documentation for Autoconf,
Automake and other tools; all of them have lots of useful information.
CONFIGURE.IN
AC_INIT(pi.c)
Old old style. The new style with package name, version, and bug
address is better:
AC_INIT([mypackage], [0.1], address@hidden)
AC_CONFIG_SRCDIR([pi.c])
And simply name the file configure.ac.
dnl find and test the C compiler
(_AC_COMPILER_EXEEXT_WORKS)
(_AC_COMPILER_EXEEXT_CROSS)
(_AC_COMPILER_EXEEXT)
These three lines are bogus. Delete them, and throw away the source of
information where you got them from. That's the source of your error.
AC_PROG_CC
AC_LANG_C
Old style for
AC_LANG([C])
but autoupdate would have caught that.
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
The tutorial also mentions how to use correct M4 quoting..
AC_CHECK_FUNC([atol], [], [AC_MSG_ERROR([oops!])])
and much more.
Cheers,
Ralf
References
1. mailto:address@hidden
2. http://www-src.lip6.fr/homepages/Alexandre.Duret-Lutz/autotools.html
3. mailto:address@hidden