帮忙看下C compiler cannot create executables错误

本帖最后由 officercat 于 2014-09-23 10:51:32 编辑 centos 6.5  gcc 4.8.2 编译clang 最新的代码(3.5)

经典的错误,我下面贴了config.log

我自己gcc一个hello world的c程序没问题。

看样子又是少了一堆依赖库?要手动安装?centos6.5版本也不算低了,装了gcc 4.8.2,编译clang 3.4还是缺很多东西啊。。


uname -s = Linux
uname -v = #1 SMP Thu May 30 16:06:10 CST 2013

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

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

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin


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

configure:2057: checking for clang
configure:2073: found /usr/bin/clang
configure:2084: result: clang
configure:2120: checking for C compiler version
configure:2127: clang --version >&5
clang: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by clang)
clang: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by clang)
configure:2130: $? = 1
configure:2137: clang -v >&5
clang: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by clang)
clang: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by clang)
configure:2140: $? = 1
configure:2147: clang -V >&5
clang: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by clang)
clang: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by clang)
configure:2150: $? = 1
configure:2173: checking for C compiler default output file name
configure:2200: clang    conftest.c  >&5
clang: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by clang)
clang: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by clang)
clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by clang)
configure:2203: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "LLVM"
| #define PACKAGE_TARNAME "llvm"
| #define PACKAGE_VERSION "3.6.0svn"
| #define PACKAGE_STRING "LLVM 3.6.0svn"
| #define PACKAGE_BUGREPORT "http://llvm.org/bugs/"
| #define LLVM_VERSION_MAJOR 3
| #define LLVM_VERSION_MINOR 6
| #define LLVM_VERSION_PATCH 0
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2242: 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_LDFLAGS_set=
ac_cv_env_LDFLAGS_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_prog_ac_ct_CC=clang

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

ALL_BINDINGS=''
ALL_TARGETS=''
AR=''
ARCH=''
BINDINGS_TO_BUILD=''
BINPWD=''
BINUTILS_INCDIR=''
BUILD_CC=''
BUILD_CXX=''
BUILD_EXEEXT=''
BZIP2=''
CAT=''
CC='clang'
CFLAGS=''
CLANG_PLUGIN_SUPPORT=''
CLANG_SRC_ROOT=''
CMP=''
COVERED_SWITCH_DEFAULT=''
CP=''
CPP=''
CPPFLAGS=''
CVSBUILD=''
CXX=''
CXXCPP=''
CXXFLAGS=''
DATE=''
DEBUG_RUNTIME=''
DEBUG_SYMBOLS=''
DEFS=''
DISABLE_ASSERTIONS=''
DOT=''
DOXYGEN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_CLANG_ARCMT=''
ENABLE_CLANG_STATIC_ANALYZER=''
ENABLE_CXX1Y=''
ENABLE_DOCS=''
ENABLE_DOXYGEN=''
ENABLE_EMBED_STDCXX=''
ENABLE_EXPENSIVE_CHECKS=''
ENABLE_LIBCPP=''
ENABLE_OPTIMIZED=''
ENABLE_PIC=''
ENABLE_POLLY=''
ENABLE_PROFILING=''
ENABLE_PTHREADS=''
ENABLE_SHARED=''
ENABLE_SPLIT_DWARF=''
ENABLE_TERMINFO=''
ENABLE_TIMESTAMPS=''
ENABLE_VISIBILITY_INLINES_HIDDEN=''
ENABLE_WERROR=''
EXEEXT=''
EXPENSIVE_CHECKS=''
EXTRA_LD_OPTIONS=''
EXTRA_OPTIONS=''
FIND=''
GAS=''
GREP=''
GROFF=''
GZIPBIN=''
HAVE_DLOPEN=''
HAVE_LIBZ=''
HAVE_LINK_VERSION_SCRIPT=''
HAVE_PTHREAD=''
HAVE_TERMINFO=''
HOST_ARCH=''
HOST_OS=''
HUGE_VAL_SANITY=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INTERNAL_PREFIX=''
JIT=''
KEEP_SYMBOLS=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBXML2_INC=''
LIBXML2_LIBS=''
LINKALL=''
LLVM_BINDIR=''
LLVM_CONFIGTIME=''
LLVM_COPYRIGHT='Copyright (c) 2003-2014 University of Illinois at Urbana-Champaign.'
LLVM_CROSS_COMPILING=''
LLVM_DATADIR=''
LLVM_DOCSDIR=''
LLVM_ENABLE_THREADS=''
LLVM_ENABLE_ZLIB=''
LLVM_ENUM_ASM_PARSERS=''
LLVM_ENUM_ASM_PRINTERS=''
LLVM_ENUM_DISASSEMBLERS=''
LLVM_ENUM_TARGETS=''
LLVM_ETCDIR=''
LLVM_HAS_POLLY=''
LLVM_INCLUDEDIR=''
LLVM_INFODIR=''
LLVM_MANDIR=''
LLVM_NATIVE_ARCH=''
LLVM_ON_UNIX=''
LLVM_ON_WIN32=''
LLVM_PREFIX=''
LLVM_VERSION_MAJOR='3'
LLVM_VERSION_MINOR='6'
LLVM_VERSION_PATCH='0'
LLVM_VERSION_SUFFIX='svn'
LN_S=''
LTLIBOBJS=''
MKDIR=''
MMAP_FILE=''
MV=''
NM=''
NOLINKALL=''
NO_MAYBE_UNINITIALIZED=''
NO_MISSING_FIELD_INITIALIZERS=''
NO_UNINITIALIZED=''
NO_VARIADIC_MACROS=''
OBJEXT=''
OCAMLC=''
OCAMLDEP=''
OCAMLDOC=''
OCAMLOPT=''
OCAML_LIBDIR=''
OPTIMIZE_OPTION=''
OS=''
PACKAGE_BUGREPORT='http://llvm.org/bugs/'
PACKAGE_NAME='LLVM'
PACKAGE_STRING='LLVM 3.6.0svn'
PACKAGE_TARNAME='llvm'
PACKAGE_VERSION='3.6.0svn'
PATH_SEPARATOR=':'
PDFROFF=''
PYTHON=''
RANLIB=''
RDYNAMIC=''
RM=''
RPATH=''
SED=''
SHELL='/bin/sh'
SHLIBEXT=''
TAR=''
TARGETS_TO_BUILD=''
TARGETS_WITH_JIT=''
TARGET_HAS_JIT=''
TARGET_OS=''
USE_INTEL_JITEVENTS=''
USE_OPROFILE=''
XML2CONFIG=''
ZIP=''
ac_ct_CC='clang'
ac_ct_CXX=''
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}'
ifGNUmake=''
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
subdirs=''
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''

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

#define PACKAGE_NAME "LLVM"
#define PACKAGE_TARNAME "llvm"
#define PACKAGE_VERSION "3.6.0svn"
#define PACKAGE_STRING "LLVM 3.6.0svn"
#define PACKAGE_BUGREPORT "http://llvm.org/bugs/"
#define LLVM_VERSION_MAJOR 3
#define LLVM_VERSION_MINOR 6
#define LLVM_VERSION_PATCH 0

configure: exit 77
                        2,1           Top
|
缺少GLIBC你把2.15装上,再编译看看。



    延伸阅读