主题 : 请问error: C++ compiler cannot create executables 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 30330
精华: 0
发帖: 2
金钱: 10 两
威望: 2 点
综合积分: 4 分
注册时间: 2010-10-15
最后登录: 2010-10-16
楼主  发表于: 2010-10-15 01:32

 请问error: C++ compiler cannot create executables

用友善提供的ARM-Linux GCC 4.4.3 交叉编译tslib  遇到如下错误。请问如何解决。谢谢!
checking for a BSD-compatible install... /usr/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 for arm-linux-strip... arm-linux-strip
checking for arm-linux-g++... arm-linux-g++
checking for C++ compiler default output file name...
configure: error: C++ compiler cannot create executables
See `config.log' for more details.



config.log 内容如下

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

It was created by tslib configure 0.0.2, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure --prefix=/usr/local/tslib/ --host=arm-linux --target=arm-linux --enable-inputapi=no --cache-file=mytslib.cache

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

hostname = localhost.localdomain
uname -m = i686
uname -r = 2.6.23.1-42.fc8
uname -s = Linux
uname -v = #1 SMP Tue Oct 30 13:55:12 EDT 2007

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

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

PATH: /usr/kerberos/sbin
PATH: /usr/lib/qt-3.3/bin
PATH: /usr/kerberos/bin
PATH: /usr/lib/ccache
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/X11R6/bin
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/local/arm/4.4.3/bin


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

configure:1901: loading cache mytslib.cache
configure:2041: checking for a BSD-compatible install
configure:2097: result: /usr/bin/install -c
configure:2108: checking whether build environment is sane
configure:2151: result: yes
configure:2179: checking for a thread-safe mkdir -p
configure:2218: result: /bin/mkdir -p
configure:2231: checking for gawk
configure:2247: found /usr/bin/gawk
configure:2258: result: gawk
configure:2269: checking whether make sets $(MAKE)
configure:2290: result: yes
configure:2370: checking for arm-linux-strip
configure:2386: found /usr/local/arm/4.4.3/bin/arm-linux-strip
configure:2397: result: arm-linux-strip
configure:2507: checking for arm-linux-g++
configure:2523: found /usr/local/arm/4.4.3/bin/arm-linux-g++
configure:2534: result: arm-linux-g++
configure:2609: checking for C++ compiler version
configure:2616: arm-linux-g++ --version >&5
.arm-none-linux-gnueabi-g++ (ctng-1.6.1) 4.4.3
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:2619: $? = 0
configure:2626: arm-linux-g++ -v >&5
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /opt/FriendlyARM/mini2440/build-toolschain/working/src/gcc-4.4.3/configure --build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu --target=arm-none-linux-gnueabi --prefix=/opt/FriendlyARM/toolschain/4.4.3 --with-sysroot=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --enable-languages=c,c++ --disable-multilib --with-arch=armv4t --with-cpu=arm920t --with-tune=arm920t --with-float=soft --with-pkgversion=ctng-1.6.1 --disable-sjlj-exceptions --enable-__cxa_atexit --with-gmp=/opt/FriendlyARM/toolschain/4.4.3 --with-mpfr=/opt/FriendlyARM/toolschain/4.4.3 --with-ppl=/opt/FriendlyARM/toolschain/4.4.3 --with-cloog=/opt/FriendlyARM/toolschain/4.4.3 --with-mpc=/opt/FriendlyARM/toolschain/4.4.3 --with-local-prefix=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.4.3 (ctng-1.6.1)
configure:2629: $? = 0
configure:2636: arm-linux-g++ -V >&5
.arm-none-linux-gnueabi-g++: '-V' option must have argument
configure:2639: $? = 1
configure:2662: checking for C++ compiler default output file name
configure:2689: arm-linux-g++    conftest.cpp  >&5
/usr/local/arm/4.4.3/bin/../libexec/gcc/arm-none-linux-gnueabi/4.4.3/cc1plus: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/local/arm/4.4.3/lib/libppl_c.so.2)
/usr/local/arm/4.4.3/bin/../libexec/gcc/arm-none-linux-gnueabi/4.4.3/cc1plus: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/local/arm/4.4.3/lib/libppl.so.7)
configure:2692: $? = 1
configure:2730: result:
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "tslib"
| #define PACKAGE_TARNAME "tslib"
| #define PACKAGE_VERSION "0.0.2"
| #define PACKAGE_STRING "tslib 0.0.2"
| #define PACKAGE_BUGREPORT "kergoth@handhelds.org"
| #define PACKAGE "tslib"
| #define VERSION "0.0.2"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2737: 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=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
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=set
ac_cv_env_host_alias_value=arm-linux
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=arm-linux
ac_cv_func_malloc_0_nonnull=yes
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CXX=arm-linux-g++
ac_cv_prog_STRIP=arm-linux-strip
ac_cv_prog_make_make_set=yes

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

ACLOCAL='${SHELL} /root/program/tslib/missing --run aclocal-1.10'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /root/program/tslib/missing --run tar'
AR=''
AUTOCONF='${SHELL} /root/program/tslib/missing --run autoconf'
AUTOHEADER='${SHELL} /root/program/tslib/missing --run autoheader'
AUTOMAKE='${SHELL} /root/program/tslib/missing --run automake-1.10'
AWK='gawk'
CC=''
CCDEPMODE=''
CFLAGS='-O2 -Wall -W'
CPP=''
CPPFLAGS=''
CXX='arm-linux-g++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEBUGFLAGS=''
DEFS=''
DEPDIR=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_ARCTIC2_MODULE_FALSE=''
ENABLE_ARCTIC2_MODULE_TRUE=''
ENABLE_COLLIE_MODULE_FALSE=''
ENABLE_COLLIE_MODULE_TRUE=''
ENABLE_CORGI_MODULE_FALSE=''
ENABLE_CORGI_MODULE_TRUE=''
ENABLE_DEJITTER_MODULE_FALSE=''
ENABLE_DEJITTER_MODULE_TRUE=''
ENABLE_H2200_LINEAR_MODULE_FALSE=''
ENABLE_H2200_LINEAR_MODULE_TRUE=''
ENABLE_H3600_MODULE_FALSE=''
ENABLE_H3600_MODULE_TRUE=''
ENABLE_INPUT_MODULE_FALSE=''
ENABLE_INPUT_MODULE_TRUE=''
ENABLE_LINEAR_MODULE_FALSE=''
ENABLE_LINEAR_MODULE_TRUE=''
ENABLE_MK712_MODULE_FALSE=''
ENABLE_MK712_MODULE_TRUE=''
ENABLE_PTHRES_MODULE_FALSE=''
ENABLE_PTHRES_MODULE_TRUE=''
ENABLE_UCB1X00_MODULE_FALSE=''
ENABLE_UCB1X00_MODULE_TRUE=''
ENABLE_VARIANCE_MODULE_FALSE=''
ENABLE_VARIANCE_MODULE_TRUE=''
EXEEXT=''
F77=''
FFLAGS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
LT_AGE=''
LT_CURRENT=''
LT_RELEASE=''
LT_REVISION=''
MAKEINFO='${SHELL} /root/program/tslib/missing --run makeinfo'
OBJEXT=''
PACKAGE='tslib'
PACKAGE_BUGREPORT='kergoth@handhelds.org'
PACKAGE_DESCRIPTION='Touchscreen Access Library'
PACKAGE_NAME='tslib'
PACKAGE_STRING='tslib 0.0.2'
PACKAGE_TARNAME='tslib'
PACKAGE_VERSION='0.0.2'
PATH_SEPARATOR=':'
PLUGIN_DIR=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP='arm-linux-strip'
TS_CONF=''
VERSION='0.0.2'
VIS_CFLAGS=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_F77=''
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='arm-linux'
host_alias='arm-linux'
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /root/program/tslib/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/tslib/'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias='arm-linux'

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

#define PACKAGE_NAME "tslib"
#define PACKAGE_TARNAME "tslib"
#define PACKAGE_VERSION "0.0.2"
#define PACKAGE_STRING "tslib 0.0.2"
#define PACKAGE_BUGREPORT "kergoth@handhelds.org"
#define PACKAGE "tslib"
#define VERSION "0.0.2"

configure: exit 77




configure:2737 内容如下
if test -z "$ac_file"; then
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C++ compiler cannot create executables
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-10-15 05:45
/usr/local/arm/4.4.3/bin/../libexec/gcc/arm-none-linux-gnueabi/4.4.3/cc1plus: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/local/arm/4.4.3/lib/libppl_c.so.2)
/usr/local/arm/4.4.3/bin/../libexec/gcc/arm-none-linux-gnueabi/4.4.3/cc1plus: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/local/arm/4.4.3/lib/libppl.so.7)

看起来是这个交叉编译器不能在你的PC Linux系统上正常运行,不能提供它所依赖的libstdc++版本。你PC上装的是Red Hat 9?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 30330
精华: 0
发帖: 2
金钱: 10 两
威望: 2 点
综合积分: 4 分
注册时间: 2010-10-15
最后登录: 2010-10-16
2楼  发表于: 2010-10-16 01:37

 回 1楼(kasim) 的帖子

PC上安装了Fedoar 12 用4.1.2 的ToolChain 能成功编译TSLIB,但编译QT时遇到错误。所以换个高版本的ToolChain 试试看