【已解决】cygwin下make编译buildroot时在libtool-2.2.10时出错:configure: error: C compiler cannot create executables

【问题】

cygwin下编译buildroot:

【记录】在Cygwin上用Buildroot为xscale建立交叉工具链

时,在编译libtool-2.2.10时出错:

>>> host-libtool 2.2.10 Extracting
gzip -d -c /home/CLi/develop/buildroot/buildroot-2013.05/dl/libtool-2.2.10.tar.gz | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10  -xf -
>>> host-libtool 2.2.10 Patching package//libtool
>>> host-libtool 2.2.10 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10 -name $file); do cp support/gnuconfig/$file $i; done; done
>>> host-libtool 2.2.10 Configuring
(cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/g++" CPP="/usr/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/.stamp_configured] Error 77

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05

如图:

libtool configure error C compiler cannot create executables

即:

checking whether the C compiler works… no

configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10′:

configure: error: C compiler cannot create executables

【解决过程】

1.去看了看,是有对应的gcc的:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ ls /usr/bin/gcc
/usr/bin/gcc*

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ ls /usr/bin/gcc -lha
-rwxr-xr-x 3 CLi Domänen-Benutzer 507K Jun 16 12:50 /usr/bin/gcc*

2.再去看看对应的config.log:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\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 libtool configure 2.2.10, which was
generated by GNU Autoconf 2.65.  Invocation command line was

  $ ./configure --prefix=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr --sysconfdir=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no

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

hostname = PC-CLI-1
uname -m = i686
uname -r = 1.7.24(0.269/5/3)
uname -s = CYGWIN_NT-6.1-WOW64
uname -v = 2013-08-15 11:55

/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: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin
PATH: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin
PATH: /home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin
PATH: /opt/crosstool-ng/bin
PATH: /home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /cygdrive/d/tmp/dev_install_root/Python27_x64
PATH: /cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4
PATH: /cygdrive/d/tmp/dev_install_root/Perl64/site/bin
PATH: /cygdrive/d/tmp/dev_install_root/Perl64/bin
PATH: /cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live
PATH: /cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live
PATH: /cygdrive/c/Windows/system32
PATH: /cygdrive/c/Windows
PATH: /cygdrive/c/Windows/System32/Wbem
PATH: /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn
PATH: /cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn
PATH: /cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn
PATH: /cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin
PATH: /cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin
PATH: /cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64
PATH: /cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext
PATH: /cygdrive/d/tmp/WordPress/DevRoot/Python27
PATH: /cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI
PATH: /cygdrive/c/Program Files (x86)/Windows Live/Shared
PATH: /cygdrive/c/Program Files/Java/jdk1.7.0_11/bin
PATH: /home/CLi/develop/docbook/tools/fop/lib
PATH: /home/CLi/develop/docbook/tools/fop
PATH: /cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN
PATH: /cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN
PATH: /cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools
PATH: /cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts
PATH: /cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin
PATH: /cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin
PATH: /cygdrive/c/Program Files/nodejs
PATH: /cygdrive/c/Program Files/Microsoft/Web Platform Installer
PATH: /cygdrive/c/Program Files/TortoiseSVN/bin
PATH: /cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile
PATH: /cygdrive/c/Program Files (x86)/QuickTime/QTSystem
PATH: /cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools
PATH: /cygdrive/d/tmp/dev_install_root/Tesseract-OCR
PATH: /cygdrive/d/tmp/dev_install_root/jython2.5.3/bin
PATH: /cygdrive/d/devinstallroot/gnuarm/bin
PATH: /cygdrive/d/tmp/dev_install_root/HTML Help Workshop
PATH: /cygdrive/c/Users/CLi/AppData/Roaming/npm
PATH: /usr/lib/lapack
PATH: /opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include
PATH: /opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux


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

configure:2670: checking for a BSD-compatible install
configure:2738: result: /usr/bin/install -c
configure:2749: checking whether build environment is sane
configure:2799: result: yes
configure:2940: checking for a thread-safe mkdir -p
configure:2979: result: /usr/bin/mkdir -p
configure:2992: checking for gawk
configure:3008: found /usr/bin/gawk
configure:3019: result: gawk
configure:3030: checking whether make sets $(MAKE)
configure:3052: result: yes
configure:3139: checking whether subdir libobjs are useable
configure:3150: result: yes
configure:3240: checking for gcc
configure:3267: result: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc
configure:3496: checking for C compiler version
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc --version >&5
gcc (GCC) 4.7.3
Copyright (C) 2012 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:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib
Thread model: posix
gcc version 4.7.3 (GCC) 
configure:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3536: checking whether the C compiler works
configure:3558: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
/usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
configure:3562: $? = 1
configure:3600: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libtool"
| #define PACKAGE_TARNAME "libtool"
| #define PACKAGE_VERSION "2.2.10"
| #define PACKAGE_STRING "libtool 2.2.10"
| #define PACKAGE_BUGREPORT "bug-libtool@gnu.org"
| #define PACKAGE_URL ""
| #define PACKAGE "libtool"
| #define VERSION "2.2.10"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3605: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure:3609: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=/usr/bin/cpp
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include'
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/g++'
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=
ac_cv_env_FC_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_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_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc'
ac_cv_prog_make_make_set=yes

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

ACLOCAL='${SHELL} /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/libltdl/config/missing --run aclocal-1.11'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/libltdl/config/missing --run tar'
AR='/usr/bin/ar'
ARGZ_H=''
AS='/usr/bin/as'
AUTOCONF='${SHELL} /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/libltdl/config/missing --run autoconf'
AUTOHEADER='${SHELL} /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/libltdl/config/missing --run autoheader'
AUTOM4TE='autom4te'
AUTOMAKE='${SHELL} /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/libltdl/config/missing --run automake-1.11'
AUTOTEST='$(AUTOM4TE) --language=autotest'
AWK='gawk'
CC='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc'
CCDEPMODE=''
CFLAGS='-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include'
CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/ChangeLog'
CONF_SUBDIRS='tests/cdemo tests/demo tests/depdemo tests/f77demo tests/fcdemo 	tests/mdemo tests/mdemo2 tests/pdemo tests/tagdemo'
CONVENIENCE_LTDL_FALSE=''
CONVENIENCE_LTDL_TRUE=''
CPP='/usr/bin/cpp'
CPPFLAGS='-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include'
CXX='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/g++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include'
CYGPATH_W='cygpath -w'
DEFS=''
DEPDIR=''
DIST_MAKEFILE_LIST='tests/cdemo/Makefile tests/demo/Makefile tests/depdemo/Makefile tests/f77demo/Makefile tests/fcdemo/Makefile tests/mdemo/Makefile tests/mdemo2/Makefile tests/pdemo/Makefile tests/tagdemo/Makefile '
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FC=''
FCFLAGS=''
FFLAGS=''
FGREP=''
GCJ=''
GCJFLAGS=''
GREP=''
HAVE_CXX_FALSE=''
HAVE_CXX_TRUE=''
HAVE_F77_FALSE=''
HAVE_F77_TRUE=''
HAVE_FC_FALSE=''
HAVE_FC_TRUE=''
HAVE_GCJ_FALSE=''
HAVE_GCJ_TRUE=''
HAVE_RC_FALSE=''
HAVE_RC_TRUE=''
HELP2MAN=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_LTDL_FALSE=''
INSTALL_LTDL_TRUE=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LASTRELEASE='2.2.9'
LD='/usr/bin/ld'
LDFLAGS='-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib'
LIBADD_DL=''
LIBADD_DLD_LINK=''
LIBADD_DLOPEN=''
LIBADD_SHL_LOAD=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTDLOPEN=''
LTDL_SUBDIR_LIBOBJS_FALSE='#'
LTDL_SUBDIR_LIBOBJS_TRUE=''
LTLIBOBJS=''
LT_CONFIG_H=''
LT_DLLOADERS=''
LT_DLPREOPEN=''
M4SH='$(AUTOM4TE) --language=m4sh'
MAKEINFO='${SHELL} /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/libltdl/config/missing --run makeinfo'
MKDIR_P='/usr/bin/mkdir -p'
NM='/usr/bin/nm'
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='libtool'
PACKAGE_BUGREPORT='bug-libtool@gnu.org'
PACKAGE_NAME='libtool'
PACKAGE_STRING='libtool 2.2.10'
PACKAGE_TARNAME='libtool'
PACKAGE_URL=''
PACKAGE_VERSION='2.2.10'
PATH_SEPARATOR=':'
RANLIB=''
RC=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
TIMESTAMP=''
VERSION='2.2.10'
ac_ct_CC='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
ac_ct_F77=''
ac_ct_FC=''
aclocaldir='${datadir}/aclocal'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/libltdl/config/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/usr/bin/mkdir -p'
oldincludedir='/usr/include'
package_revision='1.3175'
pdfdir='${docdir}'
pkgdatadir='${datadir}/libtool'
prefix='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sys_symbol_underscore=''
sysconfdir='/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc'
target_alias=''

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

/* confdefs.h */
#define PACKAGE_NAME "libtool"
#define PACKAGE_TARNAME "libtool"
#define PACKAGE_VERSION "2.2.10"
#define PACKAGE_STRING "libtool 2.2.10"
#define PACKAGE_BUGREPORT "bug-libtool@gnu.org"
#define PACKAGE_URL ""
#define PACKAGE "libtool"
#define VERSION "2.2.10"

configure: exit 77

3.之前我自己的帖子:

buildroot制作编译环境全过程解决 - 2

中有类似的问题:

creating cache ./config.cache

checking for c++… false

checking whether the C++ compiler (false -Os -pipe -Os -g2 -I/home/crifan/develop/buildroot/buildroot-2009.05/build_arm/staging_dir/usr/include -I/home/crifan/develop/buildroot/buildroot-2009.05/build_arm/staging_dir/include –sysroot=/home/crifan/develop/buildroot/buildroot-2009.05/build_arm/staging_dir/ -isysroot /home/crifan/develop/buildroot/buildroot-2009.05/build_arm/staging_dir -mtune=arm920t -march=armv4t -mabi=aapcs-linux -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/home/crifan/develop/buildroot/buildroot-2009.05/build_arm/staging_dir/lib -L/home/crifan/develop/buildroot/buildroot-2009.05/build_arm/staging_dir/usr/lib –sysroot=/home/crifan/develop/buildroot/buildroot-2009.05/build_arm/staging_dir/) works… no

configure: error: installation or configuration problem: C++ compiler cannot create executables.

make: *** [/home/crifan/develop/buildroot/buildroot-2009.05/build_arm/magiccube4d-2_2/.stamp_configured] 错误 1

但是无解决办法。。

4.上述config.log中相关内容为:

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

configure:2670: checking for a BSD-compatible install
configure:2738: result: /usr/bin/install -c
configure:2749: checking whether build environment is sane
configure:2799: result: yes
configure:2940: checking for a thread-safe mkdir -p
configure:2979: result: /usr/bin/mkdir -p
configure:2992: checking for gawk
configure:3008: found /usr/bin/gawk
configure:3019: result: gawk
configure:3030: checking whether make sets $(MAKE)
configure:3052: result: yes
configure:3139: checking whether subdir libobjs are useable
configure:3150: result: yes
configure:3240: checking for gcc
configure:3267: result: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc
configure:3496: checking for C compiler version
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc --version >&5
gcc (GCC) 4.7.3
Copyright (C) 2012 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:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib
Thread model: posix
gcc version 4.7.3 (GCC) 
configure:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3536: checking whether the C compiler works
configure:3558: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
/usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
configure:3562: $? = 1
configure:3600: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libtool"
| #define PACKAGE_TARNAME "libtool"
| #define PACKAGE_VERSION "2.2.10"
| #define PACKAGE_STRING "libtool 2.2.10"
| #define PACKAGE_BUGREPORT "bug-libtool@gnu.org"
| #define PACKAGE_URL ""
| #define PACKAGE "libtool"
| #define VERSION "2.2.10"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3605: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure:3609: error: C compiler cannot create executables
See `config.log' for more details.

对应的,可以看到:

其是用:

/usr/bin/gcc –version

结果configure的3516行,无法判断出结果:$? = 0

然后又去:

/usr/bin/gcc -v

结果还是configure的3516行,无法判断出结果:$? = 0

5.所以,自己去看看,对应的

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\configure

中的3516行是啥。

$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5

相关部分的内容是:

test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "no acceptable C compiler found in \$PATH
See \`config.log' for more details." "$LINENO" 5; }

# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

但是结果也看不太懂。

6.去搜:

buildroot libtool  compiler cannot create executables

找到的:

[Xenomai-help] User space build problems with Xeno 2.5.2 and ARM integrator

svn commit: [25880] trunk/buildroot/package: automake libtool pkgconfig

说是少了相关的库而导致的。

所以此处去看看此处的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

但是也没找到什么库相关的。

不过看到:

$ ./configure --prefix=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr --sysconfdir=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no

感觉其中的–enable-shared –disable-static

好像或许和此处错误有关?

7.此人:

[SOLVED] configure: error: C compiler cannot create executables

是重新修复gcc后而解决问题的。

但是我此处,cygwin中,gcc,也一直是好的,也不方便重新安装。所以暂时不去尝试重装gcc。

8.参考了:

can not emerge libtool error: C compiler can not create exec

提到的:

GF20: C compiler cannot create executables

但是好像解释的和此处没啥关系:

其是说,gcc各种arch,CFLAGS等问题。

我此处是:

checking for C compiler version

部分出错的。

9.看了:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

还是去找找:

configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc --version >&5
gcc (GCC) 4.7.3
Copyright (C) 2012 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:3516: $? = 0

现象的背后根本原因吧。

即,到底configure的逻辑是什么样的,而导致此处会出现$? = 0

10.找了半天,参考:

checking whether the C compiler works… no Oooops !!

中的那人的提示:

对于config.log中输出:

configure:3206: checking for C compiler version
configure:3215: i686-pc-linux-gnu-gcc --version >&5
i686-pc-linux-gnu-gcc (Gentoo 4.4.4-r2 p1.2, pie-0.4.5) 4.4.4
Copyright (C) 2010 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:3226: $? = 0
configure:3215: i686-pc-linux-gnu-gcc -v >&5
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.4.4
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.4/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.4
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.4/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.4/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --disable-multilib --enable-libmudflap
--disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.4.4/python
--enable-checking=release --disable-libgcj --with-arch=i686
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.4-r2
p1.2, pie-0.4.5'
Thread model: posix
gcc version 4.4.4 (Gentoo 4.4.4-r2 p1.2, pie-0.4.5)
configure:3226: $? = 0
configure:3215: i686-pc-linux-gnu-gcc -V >&5
i686-pc-linux-gnu-gcc: '-V' option must have argument
configure:3226: $? = 1
configure:3215: i686-pc-linux-gnu-gcc -qversion >&5
i686-pc-linux-gnu-gcc: unrecognized option '-qversion'
i686-pc-linux-gnu-gcc: no input files
configure:3226: $? = 1
configure:3246: checking whether the C compiler works
configure:3268: i686-pc-linux-gnu-gcc -march=native -O2 -pipe
-fomit-frame-pointer -Wl,-O1 -Wl,--as-needed conftest.c >&5
/usr/libexec/gcc/i686-pc-linux-gnu/4.4.4/cc1: error while loading shared
libraries: libmpfr.so.1: cannot open shared object file: No such file or
directory
configure:3272: $? = 1
configure:3310: result: no 

是可以看到对应的错误的位置的:

/usr/libexec/gcc/i686-pc-linux-gnu/4.4.4/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory

说明是:

那人的环境中,libmpfr有问题。

对应着,我此处的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

也去找错误的位置,在:

configure:3496: checking for C compiler version
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc --version >&5
gcc (GCC) 4.7.3
Copyright (C) 2012 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:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib
Thread model: posix
gcc version 4.7.3 (GCC) 
configure:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3536: checking whether the C compiler works
configure:3558: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
/usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
configure:3562: $? = 1
configure:3600: result: no

中,也找到了是:

/usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

很明显,是此处cygwin下的cc1.exe,不支持动态库?

或者是动态库的路径,没有添加进来,导致找不到。

11.参考:

Re: hard-coded library search path in gcc-4

去试试

cygcheck /usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe

输出为:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ cygcheck /usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe
D:\tmp\tmp_dev_root\cgwin\lib\gcc\i686-pc-cygwin\4.7.3\cc1.exe
  D:\tmp\tmp_dev_root\cgwin\bin\cygcloog-0.dll
    D:\tmp\tmp_dev_root\cgwin\bin\cygwin1.dll
      C:\Windows\system32\KERNEL32.dll
        C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll
        C:\Windows\system32\ntdll.dll
        C:\Windows\system32\KERNELBASE.dll
        C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll
        C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll
    D:\tmp\tmp_dev_root\cgwin\bin\cyggmp-10.dll
    D:\tmp\tmp_dev_root\cgwin\bin\cygppl_c-4.dll
      D:\tmp\tmp_dev_root\cgwin\bin\cygppl-9.dll
        D:\tmp\tmp_dev_root\cgwin\bin\cyggcc_s-1.dll
        D:\tmp\tmp_dev_root\cgwin\bin\cygstdc++-6.dll
        D:\tmp\tmp_dev_root\cgwin\bin\cyggmpxx-4.dll
      D:\tmp\tmp_dev_root\cgwin\bin\cygpwl-5.dll
  D:\tmp\tmp_dev_root\cgwin\bin\cyggmp-3.dll
  D:\tmp\tmp_dev_root\cgwin\bin\cygiconv-2.dll
  D:\tmp\tmp_dev_root\cgwin\bin\cygintl-8.dll
  D:\tmp\tmp_dev_root\cgwin\bin\cygmpc-3.dll
    D:\tmp\tmp_dev_root\cgwin\bin\cygmpfr-4.dll
  D:\tmp\tmp_dev_root\cgwin\bin\cygz.dll

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

 

12.参考的很多帖子,都是缺少的是mpfr:

cygwin configure错误

Win7下NS2 2.35安装求助

但是我此处不是,我的是:

cannot open shared object file: No such file or directory

13.所以去搜:

i686-pc-cygwin cc1.exe error cannot open shared object file: No such file or directory

14.看到:

gcc4.7.2 cc1 error while loading shared libraries

说是4.7.2的gcc不是足够稳定:

需要测试其所依赖的所有的东西的版本:

要么我们都把对应所依赖的版本都安装上

要么先降级gcc为一个低版本的,比如4.5.3之类的

而我当前的是4.7.3的gcc:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ gcc-4 --version
gcc-4 (GCC) 4.7.3
Copyright (C) 2012 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.

那估计就是更加不稳定了?

而关于其所依赖的东西,通过:

cygcheck -c|grep gcc

去看看:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ cygcheck -c|grep gcc
colorgcc                              1.3.2-2                       OK
gcc                                   4.7.3-1                       OK
gcc-ada                               4.7.3-1                       OK
gcc-core                              4.7.3-1                       OK
gcc-fortran                           4.7.3-1                       OK
gcc-g++                               4.7.3-1                       OK
gcc-g77                               4.7.3-1                       OK
gcc-gdc                               3.4.4-999                     OK
gcc-gpc                               3.4.4-999                     OK
gcc-java                              4.7.3-1                       OK
gcc-mingw                             4.5.2-1                       OK
gcc-mingw-ada                         20050522-3                    OK
gcc-mingw-core                        20050522-3                    OK
gcc-mingw-g++                         4.5.2-1                       OK
gcc-mingw-g77                         4.5.2-1                       OK
gcc-mingw-gdc                         20050522-3                    OK
gcc-mingw-gpc                         20040810-3                    OK
gcc-mingw-java                        20050522-3                    OK
gcc-mingw-objc                        4.5.2-1                       OK
gcc-objc                              4.7.3-1                       OK
gcc-tools-epoch1-autoconf             2.59-2                        OK
gcc-tools-epoch1-automake             1.9.6-2                       OK
gcc-tools-epoch2-autoconf             2.64-2                        OK
gcc-tools-epoch2-automake             1.11.6-1                      OK
gcc4                                  4.7.3-1                       OK
gcc4-ada                              4.7.3-1                       OK
gcc4-core                             4.7.3-2                       OK
gcc4-fortran                          4.7.3-1                       OK
gcc4-g++                              4.7.3-2                       OK
gcc4-java                             4.7.3-1                       OK
gcc4-objc                             4.7.3-1                       OK
gccmakedep                            1.0.2-1                       OK
libgcc1                               4.7.3-1                       OK
mingw-gcc-core                        4.7.3-1                       OK
mingw-gcc-fortran                     4.7.3-1                       OK
mingw-gcc-g++                         4.7.3-1                       OK
mingw-gcc-objc                        4.7.3-1                       OK
mingw64-i686-gcc                      4.7.3-1                       OK
mingw64-i686-gcc-ada                  4.7.3-1                       OK
mingw64-i686-gcc-core                 4.7.3-1                       OK
mingw64-i686-gcc-fortran              4.7.3-1                       OK
mingw64-i686-gcc-g++                  4.7.3-1                       OK
mingw64-i686-gcc-objc                 4.7.3-1                       OK
mingw64-x86_64-gcc                    4.7.3-1                       OK
mingw64-x86_64-gcc-ada                4.7.3-1                       OK
mingw64-x86_64-gcc-core               4.7.3-1                       OK
mingw64-x86_64-gcc-fortran            4.7.3-1                       OK
mingw64-x86_64-gcc-g++                4.7.3-1                       OK
mingw64-x86_64-gcc-objc               4.7.3-1                       OK

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

15.再参考其做法,也去弄个测试的helloworld.c去试试gcc-4,能否正常编译:

#include <stdio.h>

int main(void)
{
    printf("gcc-4 ok");
    return 0;
}

编译执行:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ gcc-4 ../test_gcc_4/helloworld.c -o ../test_gcc_4/helloworld

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ ../test_gcc_4/helloworld
gcc-4 ok
CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

很明显,都是正常的。

即此处的gcc-4,是正常的。

不存在那个帖子

gcc4.7.2 cc1 error while loading shared libraries

中所遇到的问题。

15.这人:

Re: Possible Windows 7 issue? cc1.exe: error while loading shared libraries: ?

貌似是通过:

怀疑缺少cyggcc_s-1.dll,然后手动拷贝到cygwin的/bin下面,结果就解决了问题。

而我此处,是正常的,不缺的:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ ls /bin/cyggcc* -lha
-rwxr-xr-x 1 CLi Domänen-Benutzer 104K Jun 16 12:23 /bin/cyggcc_s-1.dll*
-rwxr-xr-x 1 CLi Domänen-Benutzer 6.1K Sep  2  2012 /bin/cyggccpp-1.dll*

16.此处,郁闷的是,

4.7.3/cc1.exe

只是报错:

cannot open shared object file: No such file or directory

但是却是只是输出个问号:

cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

从而,不知道是缺少了那个库,从而不知道根本原因,也就没法解决了。

17.自己去手动执行一下那个命令:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ cd output/build/host-libtool-2.2.10

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ pwd
/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c
gcc: error: conftest.c: No such file or directory

然后再想办法找到conftest.c,结果发现是在配置期间生成的。

即:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\configure

中的:

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF

所以,自己弄一个:

#include <stdio.h>

int
main ()
{

  ;
  return 0;
}

然后去测试:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib ~/develop/buildroot/libtool_test/conftest.c

很明显,是可以运行的,然后可以看到输出的a.exe文件的:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ file a.exe
a.exe: PE32 executable (console) Intel 80386, for MS Windows

所以,这就很诡异了。

此处手动执行命令是OK的,但是make编译buildroot期间的libtool中自动执行,却不行。

 

18.再参考之前的:

Re: hard-coded library search path in gcc-4

去手动执行cc1试试:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ /usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe

但是无任何输出,所以中断。

19.再去试试,PATH设置为空,然后执行cc1试试:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ PATH=

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ /usr/bin/cygcheck /usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe
D:\tmp\tmp_dev_root\cgwin\lib\gcc\i686-pc-cygwin\4.7.3\cc1.exe
  C:\Windows\system32\KERNEL32.dll
    C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll
    C:\Windows\system32\ntdll.dll
    C:\Windows\system32\KERNELBASE.dll
    C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll
    C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll
cygcheck: WARNING: PATH is not set

cygcheck: track_down: could not find cygcloog-0.dll

cygcheck: track_down: could not find cygwin1.dll

cygcheck: track_down: could not find cyggmp-3.dll

cygcheck: track_down: could not find cygiconv-2.dll

cygcheck: track_down: could not find cygintl-8.dll

cygcheck: track_down: could not find cygmpc-3.dll

cygcheck: track_down: could not find cygmpfr-4.dll

cygcheck: track_down: could not find cygppl_c-4.dll

cygcheck: track_down: could not find cygz.dll


CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$

很明显,其是需要对应的

C:\Windows\system32

和,之前看到的:

D:\tmp\tmp_dev_root\cgwin\bin

即:

/bin

的路径的。

然后去看了看对应的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

其中是包含system32的路径的,也有/usr/bin:

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /cygdrive/c/Windows/system32
PATH: /cygdrive/c/Windows

但是还的确没有看到有/bin这个路径的。

难道是PATH中,缺少了/bin这个路径,而导致cc1找不到其所依赖的

D:\tmp\tmp_dev_root\cgwin\bin

即:

/bin

其下的各个dll库,比如:

cygcloog-0.dll

??

20.那就:

(1)重新关于当前cygwin(因为已经把PATH设置为空了)

(2)去给PATH中添加对应的/bin路径:

修改.bashrc,改为:

PATH=/bin:$HOME/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:$HOME/develop/crosstool-ng/x-tools/armxscalecurl/bin:$PATH:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux

(3)重启cygwin,且去确认一下,路径中包含/bin:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ echo $PATH
/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux

(4)进入buildroot,make clean一下。

再去make,看看最后到此libtool还是否会出错,如果出错,错误是否一样。

(5)此处,注意到一个现象:

内存占用,又是缓缓上升:

当前8G内存,已经从5.8G左右,变成6.07G左右了。

而之前cygwin下编译crosstool-ng,遇到类似的内存泄露的问题:

【未解决】用cygwin编译crosstool-ng,好像有内存泄露(memory leak)

所以,怀疑此处也是:

是cygwin本身的cc1相关的,内存泄露?

暂时不确定。以观后效。

(6)此刻已经占用6.22->6.42->6.66->6.85->7.04内存了。

然后觉得,还真有点可能是:

cygwin的内存泄露?

而导致内存占用太多,最后是使得cc1,找不到对应的cygwin中所依赖的库了。

从而报此错误。

(7)估计就是和之前:

【未解决】用cygwin编译crosstool-ng,好像有内存泄露(memory leak)

类似的:

Cygwin中(或许是cc1,ld等东西)有bug,导致内存泄露

导致:

编译(crosstool-ng,buildroot等)时间很长,占用内存比较多的话,

无法及时释放,导致内存被耗光(我的8G内存,被用掉7G多。。。)

导致后续出现各种问题:

比如

无法分配内存:之前遇到的:can not allocate memory

无法载入库:此处的cc1,无法找到所需要的库文件

解决办法是:

重启Win7,重新开始编译

-> 至少使得,内存相对较多,够其泄露的。。。

-> 或许最后可以一点点编译,知道编译成功吧。。

(8)但是结果证明:

不是cygwin的内存泄露问题:

此处编译到此处,还是问题依旧:

## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/.stamp_configured] Error 77

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

对应的

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

还是:

PATH: /bin
...
configure:3496: checking for C compiler version
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc --version >&5
gcc (GCC) 4.7.3
Copyright (C) 2012 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:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=/bin/gcc
COLLECT_LTO_WRAPPER=/bin/../lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib
Thread model: posix
gcc version 4.7.3 (GCC) 
configure:3516: $? = 0
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3505: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3516: $? = 1
configure:3536: checking whether the C compiler works
configure:3558: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
/usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
configure:3562: $? = 1
configure:3600: result: no

所以,还是程序问题。不是内存泄露问题(虽然内存泄露问题,貌似的确存在。)

21.还是重新Win7后,重新打开Cygwin,先

make clean

后,再去重新make编译,确保结果的确是此问题,而不是内存泄露问题。

现在,重新开始编译。

当前内存为3.15G。

22.突然想起来了。

此处错误是关于:

checking for C compiler version

的,而别的程序,应该也有类似的动作的。

所以去找了另外一个m4的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\config.log

看了看对应的相关部分的内容是:

configure:4244: checking for C compiler version
configure:4253: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc --version >&5
gcc (GCC) 4.7.3
Copyright (C) 2012 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:4264: $? = 0
configure:4253: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=/bin/gcc
COLLECT_LTO_WRAPPER=/bin/../lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib
Thread model: posix
gcc version 4.7.3 (GCC) 
configure:4264: $? = 0
configure:4253: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4264: $? = 1
configure:4253: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:4264: $? = 1
configure:4284: checking whether the C compiler works
configure:4306: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
configure:4310: $? = 0
configure:4358: result: yes
configure:4361: checking for C compiler default output file name
configure:4363: result: a.exe
configure:4369: checking for suffix of executables
configure:4376: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -o conftest.exe -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
configure:4380: $? = 0
configure:4402: result: .exe

很明显,此处的m4的:

/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c

结果就是正常的输出:

configure:4310: $? = 0
configure:4358: result: yes

而没有出现libtool的

/usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

所以此处的libtool,还是很奇怪。

23.想到了,会不会是由于此处libtool的configure文件有误。

所以去比较m4和libtool的两configure文件看看,(估计应该是正常的)

libtool configure 3516 ok but before exist diff

可以看到,对应的libtool的configure,在3516前后,和m4的一样,

但是前面的as_fn_error,少了一点输出。

所以,现在去手动把:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\configure

中的:

as_fn_error "no acceptable C compiler found in \$PATH
See \`config.log' for more details." "$LINENO" 5; }

改为:

as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }

然后再去编译看看是否可以解决此问题。

结果问题依旧。

24.然后再去比较,两者此处的configure传入的参数配置如何。

正常的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\config.log

是:

  $ ./configure --prefix=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr --sysconfdir=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc --enable-shared --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-static CC=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc CFLAGS=-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include LDFLAGS=-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib CPPFLAGS=-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include CPP=/bin/cpp CXX=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++ CXXFLAGS=-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include --no-create --no-recursion

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

hostname = PC-CLI-1
uname -m = i686
uname -r = 1.7.24(0.269/5/3)
uname -s = CYGWIN_NT-6.1-WOW64
uname -v = 2013-08-15 11:55

/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

而出错的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

是:

  $ ./configure --prefix=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr --sysconfdir=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no

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

hostname = PC-CLI-1
uname -m = i686
uname -r = 1.7.24(0.269/5/3)
uname -s = CYGWIN_NT-6.1-WOW64
uname -v = 2013-08-15 11:55

/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

看起来,m4的配置时,添加了很多对应的变量:

CC=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc 
CFLAGS=-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include 
LDFLAGS=-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib 
-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib 
-Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib 
CPPFLAGS=-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include 
CPP=/bin/cpp 
CXX=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache 
/bin/g++ 
CXXFLAGS=-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include

感觉估计就是缺少这些路径和配置,导致编译出错的。

25.还是再去参考:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

去再次测试一下那个conftest.c,手动模拟编译,看看效果:

去新建:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\conftest.c

内容为config.log输出的内容:

/* confdefs.h */
#define PACKAGE_NAME "libtool"
#define PACKAGE_TARNAME "libtool"
#define PACKAGE_VERSION "2.2.10"
#define PACKAGE_STRING "libtool 2.2.10"
#define PACKAGE_BUGREPORT "bug-libtool@gnu.org"
#define PACKAGE_URL ""
#define PACKAGE "libtool"
#define VERSION "2.2.10"
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}

然后再去到对应目录下编译:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ cd output/build/host-libtool-2.2.10/

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
bash: 5: Bad file descriptor

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ ls a
a.exe       aclocal.m4

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ ls a.exe -lha
-rwxr-xr-x 1 CLi Domänen-Benutzer 53K Sep  6 17:05 a.exe*

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ file a.exe
a.exe: PE32 executable (console) Intel 80386, for MS Windows

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$

结果很明显,还是正常的,可以编译对应的测试文件的。

26.去看看,此处用的那个:

/bin/gcc

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ ls /bin/gcc -lha
-rwxr-xr-x 3 CLi Domänen-Benutzer 507K Jun 16 12:50 /bin/gcc*

貌似也不是软链接,也是ok的。

27.想到了,之前看到某个帖子,给gcc的-v的参数,可以显示详细过程。

所以再去重新编译一次,给-v参数,看看效果:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -v conftest.c
Using built-in specs.
COLLECT_GCC=/bin/gcc
COLLECT_LTO_WRAPPER=/bin/../lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib
Thread model: posix
gcc version 4.7.3 (GCC)
COLLECT_GCC_OPTIONS='-O2' '-I' '/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include' '-I' '/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include' '-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib' '-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib' '-v' '-mtune=generic' '-march=i686'
 /bin/../lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe -quiet -v -I /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -iprefix /bin/../lib/gcc/i686-pc-cygwin/4.7.3/ -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter /usr/lib/../include/w32api -idirafter ../../include/w32api conftest.c -quiet -dumpbase conftest.c -mtune=generic -march=i686 -auxbase conftest -O2 -version -o /tmp/ccxPx4IF.s
GNU C (GCC) version 4.7.3 (i686-pc-cygwin)
        compiled by GNU C version 4.7.3, GMP version 4.3.2, MPFR version 3.0.1-p4, MPC version 1.0.1
warning: MPFR header version 3.0.1-p4 differs from library version 3.1.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/bin/../lib/gcc/i686-pc-cygwin/4.7.3/../../../../i686-pc-cygwin/include"
ignoring duplicate directory "/bin/../lib/gcc/../../lib/gcc/i686-pc-cygwin/4.7.3/include"
ignoring nonexistent directory "/usr/local/include"
ignoring duplicate directory "/bin/../lib/gcc/../../lib/gcc/i686-pc-cygwin/4.7.3/include-fixed"
ignoring nonexistent directory "/bin/../lib/gcc/../../lib/gcc/i686-pc-cygwin/4.7.3/../../../../i686-pc-cygwin/include"
ignoring nonexistent directory "../../include/w32api"
ignoring duplicate directory "/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include
 /bin/../lib/gcc/i686-pc-cygwin/4.7.3/include
 /bin/../lib/gcc/i686-pc-cygwin/4.7.3/include-fixed
 /usr/include
 /usr/lib/../include/w32api
End of search list.
GNU C (GCC) version 4.7.3 (i686-pc-cygwin)
        compiled by GNU C version 4.7.3, GMP version 4.3.2, MPFR version 3.0.1-p4, MPC version 1.0.1
warning: MPFR header version 3.0.1-p4 differs from library version 3.1.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: da7649da3bc960a98e1e54fd1c08b870
COLLECT_GCC_OPTIONS='-O2' '-I' '/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include' '-I' '/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include' '-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib' '-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib' '-v' '-mtune=generic' '-march=i686'
 as -v -I /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -o /tmp/ccE9izkN.o /tmp/ccxPx4IF.s
GNU assembler version 2.23.52 (i686-cygwin) using BFD version (GNU Binutils) 2.23.52.20130309
COMPILER_PATH=/bin/../lib/gcc/i686-pc-cygwin/4.7.3/:/bin/../lib/gcc/
LIBRARY_PATH=/bin/../lib/gcc/i686-pc-cygwin/4.7.3/:/bin/../lib/gcc/:/bin/../lib/gcc/i686-pc-cygwin/4.7.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-O2' '-I' '/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include' '-I' '/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include' '-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib' '-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib' '-v' '-mtune=generic' '-march=i686'
 /bin/../lib/gcc/i686-pc-cygwin/4.7.3/collect2.exe --wrap _Znwj --wrap _Znaj --wrap _ZdlPv --wrap _ZdaPv --wrap _ZnwjRKSt9nothrow_t --wrap _ZnajRKSt9nothrow_t --wrap _ZdlPvRKSt9nothrow_t --wrap _ZdaPvRKSt9nothrow_t -Bdynamic --dll-search-prefix=cyg --large-address-aware --tsaware /bin/../lib/gcc/i686-pc-cygwin/4.7.3/../../../crt0.o /bin/../lib/gcc/i686-pc-cygwin/4.7.3/crtbegin.o -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -L/bin/../lib/gcc/i686-pc-cygwin/4.7.3 -L/bin/../lib/gcc -L/bin/../lib/gcc/i686-pc-cygwin/4.7.3/../../.. -rpath /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib /tmp/ccE9izkN.o -lgcc_s -lgcc -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32 -lgcc_s -lgcc /bin/../lib/gcc/i686-pc-cygwin/4.7.3/crtend.o

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$

此处,可以看到cc1是:

/bin/../lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe

而此处make时出错的是:

/usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe

所以去看看,到底哪个cc1对的:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ ls /lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe -lha
-rwxr-xr-x 1 CLi Domänen-Benutzer 11M Jun 16 12:57 /lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe*

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ ls /usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe -lha
-rwxr-xr-x 1 CLi Domänen-Benutzer 11M Jun 16 12:57 /usr/lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe*

貌似两个都是一样的。

另外,对于:

/bin/../lib/gcc/i686-pc-cygwin/4.7.3/cc1.exe

执行时,有个提示:

warning: MPFR header version 3.0.1-p4 differs from library version 3.1.2.

所以,难道是这个版本不兼容,而导致的错误??

28.那就手动去执行原先:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

中的配置,即:

./configure --prefix=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr --sysconfdir=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no

去试试:

(先用

rm a.exe conftest.c

去删除我之前弄的那个conftest.c)

再去配置,然后的确是可以的:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ ./configure --prefix=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr --sysconfdir=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /bin/nm -B output from gcc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for as... as
checking for dlltool... dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking which extension is used for runtime loadable modules... .dll
checking which variable specifies run-time module search path... PATH
checking for the default library search path... /lib /usr/lib
checking for library containing dlopen... none required
checking for dlerror... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking whether cygwin_conv_path is declared... yes
checking for dld_link in -ldld... no
checking for _ prefix in compiled symbols... yes
checking whether we have to add an underscore for dlsym... unknown
checking whether deplibs are loaded by dlopen... unknown
checking for argz.h... yes
checking for error_t... yes
checking for argz_add... yes
checking for argz_append... yes
checking for argz_count... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking if argz actually works... yes
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for unistd.h... (cached) yes
checking for dl.h... no
checking for sys/dl.h... no
checking for dld.h... no
checking for mach-o/dyld.h... no
checking for dirent.h... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking whether the g++ linker (/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gfortran option to produce PIC... -DDLL_EXPORT
checking if gfortran PIC flag -DDLL_EXPORT works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gfortran option to produce PIC... -DDLL_EXPORT
checking if gfortran PIC flag -DDLL_EXPORT works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for gcj... gcj
checking if gcj supports -fno-rtti -fno-exceptions... (cached) no
checking for gcj option to produce PIC...
checking if gcj static flag -static works... no
checking if gcj supports -c -o file.o... no
checking if gcj supports -c -o file.o... (cached) no
checking whether the gcj linker (/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking for windres... windres
config.status: creating Makefiletus
config.status: creating config.h
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$

所以,此处,可以确定:

估计是当上层的makefile,传递给底层的libtool时,

然后丢失了一些环境,比如PATH等环境变量,所以才导致各种问题的。

但是具体根本原因,在什么时候丢失的这些环境,也还是没搞懂。

29,然后再去对比了:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\config.log

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

然后看到的结果是:

ok use bin ccache bin gcc wrong use bin gcc

即,

正确的m4,用的gcc是:result: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc

错误的libtool,用的gcc是:result: gcc

原因应该是:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\config.log

中对应的./configure时给了参数:

CC=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc

但是为何此处libtool中./configure时没有传入这些参数。还是没搞懂。

不过后来发现,其实上面,最开始的时候,也是出错的时候,也就已经是:

result: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc

了,所以,貌似此处不是问题原因。

30.再去看看,别的已经编译好的:

host-gmp-5.1.1

host-mpc-1.0.1

host-mpfr-3.1.2

看看其configure时,CC等参数都是否传入进来了。

发现:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-gmp-5.1.1\config.log

中也是和从此处类似的:

./configure中,没有额外的CC等参数:

$ ./configure --prefix=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr --sysconfdir=/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no

然后检查c编译器版本的结果,当然是yes正常的:

configure:8295: checking for gcc
configure:8322: result: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
configure:8551: checking for C compiler version
configure:8560: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc --version >&5
gcc (GCC) 4.7.3
Copyright (C) 2012 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:8571: $? = 0
configure:8560: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=/bin/gcc
COLLECT_LTO_WRAPPER=/bin/../lib/gcc/i686-pc-cygwin/4.7.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib : (reconfigured) /cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/git/cygwin-ports-gcc/gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-ppl --with-system-zlib
Thread model: posix
gcc version 4.7.3 (GCC) 
configure:8571: $? = 0
configure:8560: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:8571: $? = 1
configure:8560: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:8571: $? = 1
configure:8591: checking whether the C compiler works
configure:8613: /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib conftest.c  >&5
configure:8617: $? = 0
configure:8665: result: yes

所以,还是没找到出错的根本原因。

30.看到之前的最开始的错误输出中,换行处理后,可以更容易看清楚刚开始的配置:

>>> host-libtool 2.2.10 Configuring
(
cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/
&& 
rm -rf config.cache;
PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux"
AR="/bin/ar" 
AS="/bin/as" 
LD="/bin/ld" 
NM="/bin/nm" 
CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" 
GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" 
CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" 
CPP="/bin/cpp" 
CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" 
CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" 
CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" 
LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" 
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 
PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" 
PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" 
LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" 
CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" 
LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  
./configure 
--prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" 
--sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" 
--enable-shared 
--disable-static 
--disable-gtk-doc 
--disable-doc 
--disable-docs 
--disable-documentation 
--with-xmlto=no 
--with-fop=no  
)

是有切换到对应的路径:

cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/

然后传入很多参数,然后再去调用配置的

./configure –prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" ……

然后,突然注意到,一个很奇怪的:

LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:"

即,LD_LIBRARY_PATH的值,最后竟然是一个冒号,

感觉此冒号,是多余的,应该没有才对。

然后就去找,是哪里,弄出了此多余的冒号。

31.不过,对于之前的:

>>> host-mpfr 3.1.2 Configuring

其中也有同样的冒号的:

LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:"

32.后来看之前的输出的log,看到一个提示:

make[5]: Entering directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-gmp-5.1.1'
libtool: install: /bin/install -c .libs/libgmp-10.dll /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/libgmp-10.dll

libtool: install: (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib && { ln -s -f libgmp-10.dll libgmp.lib || { rm -f libgmp.lib && ln -s libgmp-10.dll libgmp.lib; }; })
+-------------------------------------------------------------+
libtool: install: /bin/install -c .libs/libgmp.lai /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/libgmp.la
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so.                                        |
|                                                             |
| GMP has been carefully tested by its authors, but compilers |
| are all too often released with serious bugs.  GMP tends to |
| explore interesting corners in compilers and has hit bugs   |
| on quite a few occasions.                                   |
|                                                             |
+-------------------------------------------------------------+

make[5]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-gmp-5.1.1'
make[4]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-gmp-5.1.1'
make[3]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-gmp-5.1.1'
make[2]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-gmp-5.1.1'
make[1]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-gmp-5.1.1'
>>> host-mpfr 3.1.2 Extracting
bzcat /home/CLi/develop/buildroot/buildroot-2013.05/dl/mpfr-3.1.2.tar.bz2 | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-mpfr-3.1.2  -xf -

所以,抽空可以去:

make clean

然后再去

make check

一下,然后再

make

或许会有新发现。

不过,发现,buildroot中,貌似就没有

make check

这个target:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ cd ../../..

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make help
Cleaning:
  clean                  - delete all files created by build
  distclean              - delete all non-source files (including .config)

Build:
  all                    - make world
  toolchain              - build toolchain
  <package>-rebuild      - force recompile <package>
  <package>-reconfigure  - force reconfigure <package>

Configuration:
  menuconfig             - interactive curses-based configurator
  nconfig                - interactive ncurses-based configurator
  xconfig                - interactive Qt-based configurator
  gconfig                - interactive GTK-based configurator
  oldconfig              - resolve any unresolved symbols in .config
  silentoldconfig        - Same as oldconfig, but quietly, additionally update deps
  olddefconfig           - Same as silentoldconfig but sets new symbols to their default value
  randconfig             - New config with random answer to all options
  defconfig              - New config with default answer to all options
                             BR2_DEFCONFIG, if set, is used as input
  savedefconfig          - Save current config as ./defconfig (minimal config)
  allyesconfig           - New config where all options are accepted with yes
  allnoconfig            - New config where all options are answered with no
  randpackageconfig      - New config with random answer to package options
  allyespackageconfig    - New config where pkg options are accepted with yes
  allnopackageconfig     - New config where package options are answered with no
  busybox-menuconfig     - Run BusyBox menuconfig
  uclibc-menuconfig      - Run uClibc menuconfig

Documentation:
  manual                 - build manual in HTML, split HTML, PDF and txt
  manual-html            - build manual in HTML
  manual-split-html      - build manual in split HTML
  manual-pdf             - build manual in PDF
  manual-txt             - build manual in txt
  manual-epub            - build manual in ePub

Miscellaneous:
  source                 - download all sources needed for offline-build
  source-check           - check selected packages for valid download URLs
  external-deps          - list external packages used
  legal-info             - generate info about license compliance

  make V=0|1             - 0 => quiet build (default), 1 => verbose build
  make O=dir             - Locate all output files in "dir", including .config

  arm_foundationv8_defconfig          - Build for arm_foundationv8
  armadeus_apf27_defconfig            - Build for armadeus_apf27
  armadeus_apf28_defconfig            - Build for armadeus_apf28
  armadeus_apf9328_defconfig          - Build for armadeus_apf9328
  at91rm9200df_defconfig              - Build for at91rm9200df
  at91sam9260dfc_defconfig            - Build for at91sam9260dfc
  at91sam9260eknf_defconfig           - Build for at91sam9260eknf
  at91sam9261ek_defconfig             - Build for at91sam9261ek
  at91sam9263ek_defconfig             - Build for at91sam9263ek
  at91sam9g20dfc_defconfig            - Build for at91sam9g20dfc
  at91sam9g45m10ek_defconfig          - Build for at91sam9g45m10ek
  atngw100_defconfig                  - Build for atngw100
  atstk100x_defconfig                 - Build for atstk100x
  beaglebone_defconfig                - Build for beaglebone
  calao_qil_a9260_defconfig           - Build for calao_qil_a9260
  calao_snowball_defconfig            - Build for calao_snowball
  calao_usb_a9260_defconfig           - Build for calao_usb_a9260
  calao_usb_a9263_defconfig           - Build for calao_usb_a9263
  calao_usb_a9g20_lpw_defconfig       - Build for calao_usb_a9g20_lpw
  ea3250_defconfig                    - Build for ea3250
  fdi3250_defconfig                   - Build for fdi3250
  freescale_mpc8315erdb_defconfig     - Build for freescale_mpc8315erdb
  freescale_p1010rdb_defconfig        - Build for freescale_p1010rdb
  gnublin_defconfig                   - Build for gnublin
  integrator926_defconfig             - Build for integrator926
  kb9202_defconfig                    - Build for kb9202
  mini2440_defconfig                  - Build for mini2440
  mx53loco_defconfig                  - Build for mx53loco
  nitrogen6x_defconfig                - Build for nitrogen6x
  openblocks_a6_defconfig             - Build for openblocks_a6
  pandaboard_defconfig                - Build for pandaboard
  phy3250_defconfig                   - Build for phy3250
  qemu_arm_nuri_defconfig             - Build for qemu_arm_nuri
  qemu_arm_versatile_defconfig        - Build for qemu_arm_versatile
  qemu_arm_vexpress_defconfig         - Build for qemu_arm_vexpress
  qemu_microblazebe_mmu_defconfig     - Build for qemu_microblazebe_mmu
  qemu_microblazeel_mmu_defconfig     - Build for qemu_microblazeel_mmu
  qemu_mips64_malta_defconfig         - Build for qemu_mips64_malta
  qemu_mips_malta_defconfig           - Build for qemu_mips_malta
  qemu_mipsel_malta_defconfig         - Build for qemu_mipsel_malta
  qemu_ppc_g3beige_defconfig          - Build for qemu_ppc_g3beige
  qemu_ppc_mpc8544ds_defconfig        - Build for qemu_ppc_mpc8544ds
  qemu_ppc_virtex_ml507_defconfig     - Build for qemu_ppc_virtex_ml507
  qemu_sh4_r2d_defconfig              - Build for qemu_sh4_r2d
  qemu_sparc_ss10_defconfig           - Build for qemu_sparc_ss10
  qemu_x86_64_defconfig               - Build for qemu_x86_64
  qemu_x86_defconfig                  - Build for qemu_x86
  rpi_defconfig                       - Build for rpi
  s6lx9_microboard_defconfig          - Build for s6lx9_microboard
  sheevaplug_defconfig                - Build for sheevaplug
  telit_evk_pro3_defconfig            - Build for telit_evk_pro3

See docs/README, or generate the Buildroot manual for further details


CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

所以,也就不用去试了。

33.再去libtool目录下,去删除刚才的配置:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ cd output/build/host-libtool-2.2.10/

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ make help
make: *** No rule to make target `help'.  Stop.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ make distclean
Making distclean in tests/tagdemo
make[1]: Entering directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/tests/tagdemo'
make[1]: *** No rule to make target `distclean'.  Stop.
make[1]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/tests/tagdemo'
make: *** [distclean-recursive] Error 1

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$

结果没发删除。

算了,还是把整个host-libtool-2.2.10 文件夹删除掉,然后去buildroot根目录make吧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ rm -rf output/build/host-libtool-2.2.10/

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make

结果是:

错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-libtool 2.2.10 Extracting
gzip -d -c /home/CLi/develop/buildroot/buildroot-2013.05/dl/libtool-2.2.10.tar.gz | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10  -xf -
>>> host-libtool 2.2.10 Patching package//libtool
>>> host-libtool 2.2.10 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10 -name $file); do cp support/gnuconfig/$file $i; done; done
>>> host-libtool 2.2.10 Configuring
(cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/.stamp_configured] Error 77

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

所以,可以接着刚才那些命令,去手动输入测试一下:

(cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )

看看效果:

然后错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

34.那么再把那个LD_LIBRARY_PATH最后的冒号去掉试试:

结果也是错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

35.再把其中的PATH中的,带特殊路径,即包含空格和括号的值,都去掉,再去试试:

结果错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

36.再去把之前那几个configure不支持的参数去掉,试试:

结果是,错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static )
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

 

37.然后发现有两个

LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"

所以去掉一个,再去试试:

结果错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static )
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

38.然后再去把LD_LIBRARY_PATH去掉,试试:

结果是,错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static )
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

 

39.再把

rm -rf config.cache

后面的冒号,改为&&

试试,结果错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache &&  PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static )
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

40。测试到现在,感觉还是由于此处

libtool的configure文件中,调用的时候,没有传入对应的CC等参数。

然后突然看到个奇怪的现象:

对于三个不用的config.log,对应的头部信息中,所用的libtool都不同:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\config.log

中是:

It was created by GNU M4 configure 1.4.16, which was
generated by GNU Autoconf 2.69.  Invocation command line was

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-gmp-5.1.1\config.log

是:

It was created by GNU MP configure 5.1.1, which was
generated by GNU Autoconf 2.69.  Invocation command line was

而此处出错的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

是:

It was created by libtool configure 2.2.10, which was
generated by GNU Autoconf 2.65.  Invocation command line was

即,此处的用的是autoconf 2.65,而不是正常的m4和gmp用的autoconf 2.69

 

41.看到一个buildroot的patch:

http://git.buildroot.net/buildroot/plain/package/autoconf/autoconf-dont-add-dirty-to-version.patch

也提到这两个版本,但是此问题没关系。

然后看到:

http://git.buildroot.net/buildroot/plain/package/autoconf/autoconf.mk

写的是

AUTOCONF_VERSION = 2.69

去本地的buildroot对应位置看看:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\autoconf\autoconf.mk

看到的是:

AUTOCONF_VERSION = 2.68

另外也看了看:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\libtool\Config.in

和:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\libtool\libtool.mk

没感觉有什么特殊的。

42.所以去重新配置看看,能否把autoconf,从此处的2.68,换成最新的(buildroot网站上面的那个)2.69

结果没找到配置。

算了,手动修改:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\autoconf\autoconf.mk

中的:

AUTOCONF_VERSION = 2.68

为:

#AUTOCONF_VERSION = 2.68
AUTOCONF_VERSION = 2.69

然后再去make试试:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-autoconf 2.69 Downloading
--2013-09-06 18:40:30--  http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.69.tar.gz
Resolving ftp.gnu.org (ftp.gnu.org)... 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1927468 (1.8M) [application/x-gzip]
Saving to: `/home/CLi/develop/buildroot/buildroot-2013.05/dl/autoconf-2.69.tar.gz.tmp'

100%[==================================================================================================================================>] 1,927,468    409K/s   in 4.6s

2013-09-06 18:40:36 (409 KB/s) - `/home/CLi/develop/buildroot/buildroot-2013.05/dl/autoconf-2.69.tar.gz.tmp' saved [1927468/1927468]

>>> host-autoconf 2.69 Extracting
gzip -d -c /home/CLi/develop/buildroot/buildroot-2013.05/dl/autoconf-2.69.tar.gz | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-autoconf-2.69  -xf -
>>> host-autoconf 2.69 Patching package//autoconf

Applying autoconf-dont-add-dirty-to-version.patch using patch:
patching file build-aux/git-version-gen
Hunk #1 FAILED at 135.
1 out of 1 hunk FAILED -- saving rejects to file build-aux/git-version-gen.rej
Patch failed!  Please fix autoconf-dont-add-dirty-to-version.patch!
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-autoconf-2.69/.stamp_patched] Error 1

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

很明显,是那个:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\autoconf\autoconf-dont-add-dirty-to-version.patch

打补丁失败,然后看到其中内容是:

--- autoconf-2.65.orig/build-aux/git-version-gen
+++ autoconf-2.65/build-aux/git-version-gen

即,针对的是2.65的,所以应该对于此处的2.69没影响,所以去去掉:

从:

autoconf-dont-add-dirty-to-version.patch

改名为:

__autoconf-dont-add-dirty-to-version.patch

再去make编译:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-autoconf 2.69 Patching package//autoconf

Applying __autoconf-dont-add-dirty-to-version.patch using patch:
patching file build-aux/git-version-gen
Hunk #1 FAILED at 135.
1 out of 1 hunk FAILED -- saving rejects to file build-aux/git-version-gen.rej
Patch failed!  Please fix __autoconf-dont-add-dirty-to-version.patch!
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-autoconf-2.69/.stamp_patched] Error 1

算了,暂时改为别的名字吧:

000autoconf000000-dont-add-dirty-to-version.patch

再去make:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-autoconf 2.69 Patching package//autoconf

Applying 000autoconf000000-dont-add-dirty-to-version.patch using patch:
patching file build-aux/git-version-gen
Hunk #1 FAILED at 135.
1 out of 1 hunk FAILED -- saving rejects to file build-aux/git-version-gen.rej
Patch failed!  Please fix 000autoconf000000-dont-add-dirty-to-version.patch!
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-autoconf-2.69/.stamp_patched] Error 1

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05

算了,彻底去掉此文件再make:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ rm package/autoconf/000autoconf000000-dont-add-dirty-to-version.patch

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make

然后是错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-autoconf 2.69 Patching package//autoconf
>>> host-autoconf 2.69 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-autoconf-2.69 -name $file); do cp support/gnuconfig/$file $i; done; done
>>> host-autoconf 2.69 Patching libtool
>>> host-libtool 2.2.10 Configuring
(cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/.stamp_configured] Error 77

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

43.再去看:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

结果竟然还是2.65的:

It was created by libtool configure 2.2.10, which was
generated by GNU Autoconf 2.65.  Invocation command line was

然后看到当前cygwin中,是2.69的:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ autoconf
autoconf       autoconf-2.13  autoconf-2.69

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ which autoconf
/bin/autoconf

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

现在去删除libtool,再重新make:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ rm output/build/host-libtool-2.2.10/ -rf

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make

结果错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-libtool 2.2.10 Extracting
gzip -d -c /home/CLi/develop/buildroot/buildroot-2013.05/dl/libtool-2.2.10.tar.gz | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10  -xf -
>>> host-libtool 2.2.10 Patching package//libtool
>>> host-libtool 2.2.10 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10 -name $file); do cp support/gnuconfig/$file $i; done; done
>>> host-libtool 2.2.10 Configuring
(cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/.stamp_configured] Error 77

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

44.再去看看:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\config.log

依旧是2.65:

It was created by libtool configure 2.2.10, which was
generated by GNU Autoconf 2.65.  Invocation command line was

看来,不是此处buildroot中的autoconf所决定的。

然后发现,好像是其自己下面对应的文件决定的:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\aclocal.m4

中的:

m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
[m4_warning([this file was generated for autoconf 2.65.

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\configure

中的:

#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for libtool 2.2.10.
#

所以,得抽空再去研究。

45.再去手动试试:

结果还是错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ rm -rf config.cache

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$ PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10
$

46.看到这里:

compile error – conftest.c:14625: must be after ` <at> defmac’ to use ` <at> defmacx’

即:

compile error – conftest.c:14625: must be after address@hidden’ to use a

也提到了类似的,2.65,2.69的autoconf的问题。但是和我此处错误不同。

然后去看看其提到的

autoconf-2.65/doc/autoconf.texi

但是此处没有源码。没法查看。

47.此处再尝试:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\autoconf\autoconf.mk

改为:

#AUTOCONF_VERSION = 2.68
#AUTOCONF_VERSION = 2.69
AUTOCONF_VERSION = 2.65

然后把之前的patch文件:

autoconf-dont-add-dirty-to-version.patch

内容为:

autoconf: don't append -dirty to version

Don't append -dirty to autoconf version number if the buildroot git tree
has uncommited changes.

This script is meant for the autoconf developers, but it also activates
if you build autoconf in a subdirectory of a git tree (E.G. like how it's
commonly done in buildroot).

The affect is that autoconf gets built as being version 2.65-dirty, which
breaks programs (like Python) which explicitly checks for autoconf-2.65.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 build-aux/git-version-gen |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: autoconf-2.65/build-aux/git-version-gen
===================================================================
--- autoconf-2.65.orig/build-aux/git-version-gen
+++ autoconf-2.65/build-aux/git-version-gen
@@ -135,7 +135,7 @@ case "$dirty" in
     *) # Append the suffix only if there isn't one already.
 	case $v in
 	  *-dirty) ;;
-	  *) v="$v-dirty" ;;
+	  #*) v="$v-dirty" ;;
 	esac ;;
 esac
 

恢复出来:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\autoconf\autoconf-dont-add-dirty-to-version.patch

然后再去删除旧的libtool:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ rm output/build/host-libtool-2.2.10/ -rf

然后再去make试试:

结果错误依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-autoconf 2.65 Downloading
--2013-09-06 19:07:02--  http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.65.tar.gz
Resolving ftp.gnu.org (ftp.gnu.org)... 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1738880 (1.7M) [application/x-gzip]
Saving to: `/home/CLi/develop/buildroot/buildroot-2013.05/dl/autoconf-2.65.tar.gz.tmp'

100%[==================================================================================================================================>] 1,738,880    303K/s   in 7.3s

2013-09-06 19:07:11 (232 KB/s) - `/home/CLi/develop/buildroot/buildroot-2013.05/dl/autoconf-2.65.tar.gz.tmp' saved [1738880/1738880]

>>> host-autoconf 2.65 Extracting
gzip -d -c /home/CLi/develop/buildroot/buildroot-2013.05/dl/autoconf-2.65.tar.gz | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-autoconf-2.65  -xf -
>>> host-autoconf 2.65 Patching package//autoconf

Applying autoconf-dont-add-dirty-to-version.patch using patch:
patching file build-aux/git-version-gen
>>> host-autoconf 2.65 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-autoconf-2.65 -name $file); do cp support/gnuconfig/$file $i; done; done
>>> host-autoconf 2.65 Patching libtool
>>> host-libtool 2.2.10 Extracting
gzip -d -c /home/CLi/develop/buildroot/buildroot-2013.05/dl/libtool-2.2.10.tar.gz | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10  -xf -
>>> host-libtool 2.2.10 Patching package//libtool
>>> host-libtool 2.2.10 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10 -name $file); do cp support/gnuconfig/$file $i; done; done
>>> host-libtool 2.2.10 Configuring
(cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/.stamp_configured] Error 77

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

48.看到:

rpms/mingw32-libltdl/devel libtool-2.2.10-rpath.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 mingw32-libltdl.spec, 1.7, 1.8 sources, 1.3, 1.4

所以,去试试给此处的libtool 2.2.10也打上此补丁试试:

修改:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\libltdl\m4\libtool.m4

为:

  # This implies no fast_install, which is unacceptable.
  # Some rework will be needed to allow for fast_install
  # before this can be enabled.
  hardcode_into_libs=yes

  # Add ABI-specific directories to the system library path.
  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"

  # Append ld.so.conf contents to the search path
  if test -f /etc/ld.so.conf; then
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
  fi

  # We used to test for /lib/ld.so.1 and disable shared libraries on

然后再去make编译试试:

结果问题依旧:

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$ make
>>> host-libtool 2.2.10 Configuring
(cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/bin/ar" AS="/bin/as" LD="/bin/ld" NM="/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/g++" CPP="/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib"  ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop
## -------------------------- ##
## Configuring libtool 2.2.10 ##
## -------------------------- ##

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether subdir libobjs are useable... yes
checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /bin/gcc
checking whether the C compiler works... no
configure: error: in `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-libtool-2.2.10/.stamp_configured] Error 77

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

感觉此处对于:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-libtool-2.2.10\libltdl\m4\libtool.m4

的补丁都没生效啊。

 

 

【总结】

暂时不知道具体什么原因导致的此处编译有问题。


【后记 2013-09-10】

1。后来继续折腾:

【已解决】再次研究:Cygwin下编译Buildroot时在编译libtool-2.2.10时出错:/usr/lib/gcc/i686-pc- cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

还是没搞定。

2.再次继续折腾,终于搞定了。

关于问题的解决办法,详见该贴的最后:

【记录】第三次去研究:Cygwin下编译Buildroot时在编译libtool-2.2.10时出错:/usr/lib/gcc/i686-pc- cygwin/4.7.3/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量