配置:错误:C 编译器无法创建可执行文件?

发布于 2024-08-20 22:15:04 字数 6279 浏览 8 评论 0原文

当我配置Kannel软件时,我遇到了以下问题:

checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

config.log文件如下:

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

It was created by configure, which was
generated by GNU Autoconf 2.62.  Invocation command line was

  $ ./configure --prefix=/usr/local/kannel

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

hostname = sreeni9
uname -m = i686
uname -r = 1.7.1(0.218/5/3)
uname -s = CYGWIN_NT-5.1
uname -v = 2009-12-07 11:48

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

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

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /cygdrive/c/WinAVR-20100110/bin
PATH: /cygdrive/c/WinAVR-20100110/utils/bin
PATH: /cygdrive/c/WINDOWS/system32
PATH: /cygdrive/c/WINDOWS
PATH: /cygdrive/c/WINDOWS/System32/Wbem
PATH: /cygdrive/c/WinAVR-20100110/avr/bin
PATH: /cygdrive/c/WinAVR-20100110/utils/bin
PATH: /cygdrive/c/WinAVR-20100110/bin
PATH: /usr/bin
PATH: /cygdrive/c/libxml2-2.6.30+.win32/bin
PATH: /cygdrive/c/Program Files/Java/jdk1.6.0_16/bin
PATH: .


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

configure:2053: checking build system type
configure:2071: result: i686-pc-cygwin
configure:2093: checking host system type
configure:2108: result: i686-pc-cygwin
configure:2180: checking for gcc
configure:2196: found /cygdrive/c/WinAVR-20100110/avr/bin/gcc
configure:2207: result: gcc
configure:2445: checking for C compiler version
configure:2453: gcc --version >&5
gcc.exe (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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:2457: $? = 0
configure:2464: gcc -v >&5
Using built-in specs.
Target: avr
Configured with: ../gcc-4.3.3/configure --enable-win32-registry=WinAVR-20100110 --with-gmp=/usr/local --with-mpfr=/usr/local --prefix=/c/WinAVR --target=avr --enable-languages=c,c++,objc --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-pkgversion='WinAVR 20100110' --with-bugurl='URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse'
Thread model: single
gcc version 4.3.3 (WinAVR 20100110) 
configure:2468: $? = 0
configure:2475: gcc -V >&5
gcc.exe: '-V' option must have argument
configure:2479: $? = 1
configure:2502: checking for C compiler default output file name
configure:2524: gcc    conftest.c  >&5

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
configure:2528: $? = 3
configure:2566: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define GW_NAME "Kannel"
| #define GW_VERSION "1.4.3"
| #define VERSION "1.4.3"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2573: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-cygwin
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-cygwin
ac_cv_prog_ac_ct_CC=gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
CC='gcc'
CFLAGS=''
CONVERT=''
CPP=''
CPPFLAGS=''
DEFS=''
DOCDRAFTS=''
DOCSTARGET=''
DVIPS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXE_EXT=''
FIG2DEV=''
GREP=''
GW_VERSION=''
HTML_DSL=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
JADE=''
JADETEX=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LTLIBOBJS=''
MYSQL_CONFIG=''
OBJEXT=''
OPENSSL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCRE_CONFIG=''
PDFJADETEX=''
PERL=''
PGSQL_CONFIG=''
PKGADD_NAME='Kannel - WAP and SMS gateway'
PKGADD_PKG='KANNELgateway'
PKGADD_VENDOR='www.kannel.org'
RANLIB=''
SDB_CONFIG=''
SHELL='/bin/sh'
SIZEOF_INT=''
SIZEOF_LONG=''
SIZEOF_LONG_LONG=''
SIZEOF_SHORT=''
SQLITE3=''
SQLITE=''
STARTSTOPDAEMONSRC=''
SUFFIX=''
TEX_DSL=''
VERSION='1.4.3'
XML_CONFIG=''
YACC=''
YFLAGS=''
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build='i686-pc-cygwin'
build_alias=''
build_cpu='i686'
build_os='cygwin'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${prefix}/share/doc/kannel'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-cygwin'
host_alias=''
host_cpu='i686'
host_os='cygwin'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/kannel'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define GW_NAME "Kannel"
#define GW_VERSION "1.4.3"
#define VERSION "1.4.3"

configure: exit 77

When I configured the Kannel softwre I got the following problem:

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 is as follows:

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

It was created by configure, which was
generated by GNU Autoconf 2.62.  Invocation command line was

  $ ./configure --prefix=/usr/local/kannel

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

hostname = sreeni9
uname -m = i686
uname -r = 1.7.1(0.218/5/3)
uname -s = CYGWIN_NT-5.1
uname -v = 2009-12-07 11:48

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

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

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /cygdrive/c/WinAVR-20100110/bin
PATH: /cygdrive/c/WinAVR-20100110/utils/bin
PATH: /cygdrive/c/WINDOWS/system32
PATH: /cygdrive/c/WINDOWS
PATH: /cygdrive/c/WINDOWS/System32/Wbem
PATH: /cygdrive/c/WinAVR-20100110/avr/bin
PATH: /cygdrive/c/WinAVR-20100110/utils/bin
PATH: /cygdrive/c/WinAVR-20100110/bin
PATH: /usr/bin
PATH: /cygdrive/c/libxml2-2.6.30+.win32/bin
PATH: /cygdrive/c/Program Files/Java/jdk1.6.0_16/bin
PATH: .


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

configure:2053: checking build system type
configure:2071: result: i686-pc-cygwin
configure:2093: checking host system type
configure:2108: result: i686-pc-cygwin
configure:2180: checking for gcc
configure:2196: found /cygdrive/c/WinAVR-20100110/avr/bin/gcc
configure:2207: result: gcc
configure:2445: checking for C compiler version
configure:2453: gcc --version >&5
gcc.exe (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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:2457: $? = 0
configure:2464: gcc -v >&5
Using built-in specs.
Target: avr
Configured with: ../gcc-4.3.3/configure --enable-win32-registry=WinAVR-20100110 --with-gmp=/usr/local --with-mpfr=/usr/local --prefix=/c/WinAVR --target=avr --enable-languages=c,c++,objc --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-pkgversion='WinAVR 20100110' --with-bugurl='URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse'
Thread model: single
gcc version 4.3.3 (WinAVR 20100110) 
configure:2468: $? = 0
configure:2475: gcc -V >&5
gcc.exe: '-V' option must have argument
configure:2479: $? = 1
configure:2502: checking for C compiler default output file name
configure:2524: gcc    conftest.c  >&5

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
configure:2528: $? = 3
configure:2566: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define GW_NAME "Kannel"
| #define GW_VERSION "1.4.3"
| #define VERSION "1.4.3"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2573: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-cygwin
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-cygwin
ac_cv_prog_ac_ct_CC=gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
CC='gcc'
CFLAGS=''
CONVERT=''
CPP=''
CPPFLAGS=''
DEFS=''
DOCDRAFTS=''
DOCSTARGET=''
DVIPS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXE_EXT=''
FIG2DEV=''
GREP=''
GW_VERSION=''
HTML_DSL=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
JADE=''
JADETEX=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LTLIBOBJS=''
MYSQL_CONFIG=''
OBJEXT=''
OPENSSL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCRE_CONFIG=''
PDFJADETEX=''
PERL=''
PGSQL_CONFIG=''
PKGADD_NAME='Kannel - WAP and SMS gateway'
PKGADD_PKG='KANNELgateway'
PKGADD_VENDOR='www.kannel.org'
RANLIB=''
SDB_CONFIG=''
SHELL='/bin/sh'
SIZEOF_INT=''
SIZEOF_LONG=''
SIZEOF_LONG_LONG=''
SIZEOF_SHORT=''
SQLITE3=''
SQLITE=''
STARTSTOPDAEMONSRC=''
SUFFIX=''
TEX_DSL=''
VERSION='1.4.3'
XML_CONFIG=''
YACC=''
YFLAGS=''
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build='i686-pc-cygwin'
build_alias=''
build_cpu='i686'
build_os='cygwin'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${prefix}/share/doc/kannel'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-cygwin'
host_alias=''
host_cpu='i686'
host_os='cygwin'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/kannel'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define GW_NAME "Kannel"
#define GW_VERSION "1.4.3"
#define VERSION "1.4.3"

configure: exit 77

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

開玄 2024-08-27 22:15:04

看起来您可能会选择 WinAVR 编译器(它为 AVR 指令集生成可执行文件)而不是本机编译器(它为 i686 生成可执行文件)。尝试从您的路径中删除 WinAVR 编译器,看看是否可以再次正常工作。

如果您确实打算为 AVR 构建程序,那么您需要指定更多信息进行配置,以使其知道进行交叉编译。让东西与 GNU Autotools 成功交叉编译是一个令人难以置信的痛苦,并且永远不能保证有效。 Autotools 书中的以下部分将解释如何在交叉编译时使用“配置”的基础知识(如果您打算这样做):

http://sources.redhat.com/autobook/autobook/autobook_258.html#SEC258

It looks like you may be picking up the WinAVR compiler (which generates executables for the AVR instruction set) instead of the native compiler (which generates executables for i686). Try removing the WinAVR compiler from your path and see if that gets things working for you again.

If you actually do mean to build programs for the AVR, well then you need to specify a whole lot more information to configure to let it know to cross-compile. Getting things to successfully cross-compile with the GNU Autotools is an incredible pain and is never guaranteed to work. The following section of the Autotools book will explain the basics of how to use "configure" when cross-compiling if that is what you intend to do:

http://sources.redhat.com/autobook/autobook/autobook_258.html#SEC258

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文