首页 > 用MinGW编译gdb源码,想得到gdb.exe,报错

用MinGW编译gdb源码,想得到gdb.exe,报错

./configure之后
报错c compiler cannot create executables,这是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.64. Invocation command line was

$ ./configure

hostname = GuoTong
uname -m = i686
uname -r = 1.0.11(0.46/3/2)
uname -s = MINGW32_NT-6.1
uname -v = 2009-05-23 19:33

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

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

PATH: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Program Files (x86)/AMD APP/bin/x86_64
PATH: /c/Program Files (x86)/AMD APP/bin/x86
PATH: /c/Program Files/Common Files/Microsoft Shared/Windows Live
PATH: /c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live
PATH: /c/Python27/
PATH: /c/Windows/system32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /c/Program Files/Java/jdk1.7.0_21/bin
PATH: /c/Program Files/Java/jdk1.7.0_21/jre/bin
PATH: /c/javacc-5.0/bin
PATH: /c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/
PATH: /c/Program Files/Microsoft SQL Server/100/Tools/Binn/
PATH: /c/Program Files/Microsoft SQL Server/100/DTS/Binn/
PATH: /c/Program Files (x86)/Lua/5.1
PATH: /c/Program Files (x86)/Lua/5.1/clibs
PATH: /c/Program Files/TortoiseSVN/bin
PATH: /c/hadoop/apache-ant-1.9.2/bin
PATH: /d/Program Files/MySQL/MySQL Enterprise Backup 3.9.0/
PATH: /d/Program Files (x86)/scala/bin
PATH: /c/Program Files (x86)/Windows Live/Shared
PATH: /d/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn/
PATH: /d/Program Files/Microsoft SQL Server/110/Tools/Binn/
PATH: /d/Program Files/Microsoft SQL Server/110/DTS/Binn/
PATH: /d/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn/ManagementStudio/
PATH: /c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/
PATH: /d/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn/
PATH: /c/Program Files/Microsoft/Web Platform Installer/
PATH: /d/scala-2.11.0/scala-2.11.0/bin/
PATH: /c/strawberry/c/bin
PATH: /c/strawberry/perl/bin
PATH: /c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static
PATH: /c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/
PATH: /c/Program Files/TortoiseGit/bin
PATH: /c/Program Files (x86)/Git/bin

configure:2429: checking build system type
configure:2443: result: i686-pc-mingw32
configure:2490: checking host system type
configure:2503: result: i686-pc-mingw32
configure:2523: checking target system type
configure:2536: result: i686-pc-mingw32
configure:2590: checking for a BSD-compatible install
configure:2658: result: /bin/install -c
configure:2669: checking whether ln works
configure:2691: result: yes
configure:2695: checking whether ln -s works
configure:2699: result: yes
configure:2706: checking for a sed that does not truncate output
configure:2770: result: /bin/sed
configure:2779: checking for gawk
configure:2795: found /bin/gawk
configure:2806: result: gawk
configure:4060: checking for gcc
configure:4076: found /mingw/bin/gcc
configure:4087: result: gcc
configure:4316: checking for C compiler version
configure:4325: gcc --version >&5
gcc.exe (GCC) 3.4.2 (mingw-special)
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:4336: $? = 0
configure:4325: gcc -v >&5
Using built-in specs.
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
configure:4336: $? = 0
configure:4325: gcc -V >&5
gcc.exe: -V' option must have argument configure:4336: $? = 1 configure:4325: gcc -qversion >&5 gcc.exe: unrecognized option-qversion'
gcc.exe: no input files
configure:4336: $? = 1
configure:4356: checking for C compiler default output file name
configure:4378: gcc conftest.c >&5
ld: cannot find crt2.o: No such file or directory
ld: cannot find crtbegin.o: No such file or directory
ld: cannot find -lmingw32
ld: cannot find -lgcc
ld: cannot find -lmoldname
ld: cannot find -lmingwex
ld: cannot find -lmsvcrt
ld: cannot find -luser32
ld: cannot find -lkernel32
ld: cannot find -ladvapi32
ld: cannot find -lshell32
ld: cannot find -lmingw32
ld: cannot find -lgcc
ld: cannot find -lmoldname
ld: cannot find -lmingwex
ld: cannot find -lmsvcrt
ld: cannot find crtend.o: No such file or directory
configure:4382: $? = 1
configure:4419: result:
configure: failed program was:
| /* confdefs.h /
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /
end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4425: error: in /d/gdb-7.2-1-mingw32-src/gdb-7.2': configure:4429: error: C compiler cannot create executables Seeconfig.log' for more details.

ac_cv_build=i686-pc-mingw32
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set=
ac_cv_env_AS_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
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_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GCJ_FOR_TARGET_set=
ac_cv_env_GCJ_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set=
ac_cv_env_LD_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIPO_FOR_TARGET_set=
ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set=
ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_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-mingw32
ac_cv_path_SED=/bin/sed
ac_cv_path_install='/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=i686-pc-mingw32
acx_cv_prog_LN=ln

AR=''
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET=''
AS=''
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET=''
AWK='gawk'
BISON=''
BUILD_CONFIG=''
CC='gcc'
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET=''
CFLAGS=''
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET=''
COMPILER_AS_FOR_TARGET=''
COMPILER_LD_FOR_TARGET=''
COMPILER_NM_FOR_TARGET=''
CONFIGURE_GDB_TK=''
CPP=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
CXXFLAGS_FOR_BUILD=''
CXXFLAGS_FOR_TARGET=''
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET=''
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS=''
DLLTOOL=''
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXPECT=''
FLAGS_FOR_TARGET=''
FLEX=''
GCC_FOR_TARGET=''
GCC_SHLIB_SUBDIR=''
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET=''
GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET=''
GNATBIND=''
GNATMAKE=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD=''
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LD_FOR_BUILD='$(LD)'
LD_FOR_TARGET=''
LEX=''
LIBOBJS=''
LIBS=''
LIPO=''
LIPO_FOR_TARGET=''
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO=''
NM=''
NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET=''
OBJCOPY=''
OBJDUMP=''
OBJDUMP_FOR_TARGET=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET=''
RPATH_ENVVAR=''
RUNTEST=''
SED='/bin/sed'
SHELL='/bin/sh'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='./configure'
WINDMC=''
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET=''
WINDRES=''
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET=''
YACC=''
ac_ct_CC='gcc'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='i686-pc-mingw32'
build_alias=''
build_configargs=''
build_configdirs='build-libiberty build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes'
build_cpu='i686'
build_libsubdir='build-i686-pc-mingw32'
build_noncanonical='i686-pc-mingw32'
build_os='mingw32'
build_subdir='build-i686-pc-mingw32'
build_tooldir=''
build_vendor='pc'
clooginc=''
clooglibs=''
compare_exclusions=''
config_shell='/bin/sh'
configdirs='intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libelf libiconv texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
extra_host_libiberty_configure_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc=''
gmplibs=''
host='i686-pc-mingw32'
host_alias=''
host_configargs=''
host_cpu='i686'
host_noncanonical='i686-pc-mingw32'
host_os='mingw32'
host_subdir='.'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libelfinc=''
libelflibs=''
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags=''
poststage1_libs=''
pplinc=''
ppllibs=''
prefix='NONE'
program_transform_name='s,y,y,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags=''
stage1_checking=''
stage1_languages=''
stage1_ldflags=''
stage1_libs=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='i686-pc-mingw32'
target_alias=''
target_configargs=''
target_configdirs='target-libgcc target-libiberty target-libgloss target-newlib target-libgomp target-libstdc++-v3 target-libmudflap target-libssp target-libgfortran target-boehm-gc target-libffi target-zlib target-qthreads target-libjava target-libobjc target-libada target-examples target-groff target-gperf target-rda target-winsup'
target_cpu='i686'
target_noncanonical='i686-pc-mingw32'
target_os='mingw32'
target_subdir='i686-pc-mingw32'
target_vendor='pc'
tooldir=''

alphaieee_frag=''
host_makefile_frag='config/mh-mingw'
ospace_frag=''
serialization_dependencies=''
target_makefile_frag=''

/* confdefs.h */
define PACKAGE_NAME ""
define PACKAGE_TARNAME ""
define PACKAGE_VERSION ""
define PACKAGE_STRING ""
define PACKAGE_BUGREPORT ""
define PACKAGE_URL ""

configure: exit 77


gcc.exe (GCC) 3.4.2

你坑人呢~!现在 gcc 都到 4.9.2 版本了。就算是我刚上大学那会儿,好像也是 4.3 了吧。

你为什么要自己编译呢?mingw 在网上有现成的可以下。还有个 msys2 项目也挺好的。

【热门文章】
【热门文章】