I'd like to build memcached from source on centos 6.4 x86_64 but only get following error.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
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 whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/opt/memcache/memcached-1.4.24':
configure: error: C compiler cannot create executables
See `config.log' for more details
And below contents are from 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 memcached configure 1.4.24, which was generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = localhost
uname -m = x86_64
uname -r = 2.6.32-358.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Fri Feb 22 00:31:26 UTC 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/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /nas/home/ssge/bin
PATH: /opt/jdk1.8.0_40/bin
PATH: /opt/jdk1.8.0_40/jre/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2331: checking build system type
configure:2345: result: x86_64-unknown-linux-gnu
configure:2365: checking host system type
configure:2378: result: x86_64-unknown-linux-gnu
configure:2398: checking target system type
configure:2411: result: x86_64-unknown-linux-gnu
configure:2455: checking for a BSD-compatible install
configure:2523: result: /usr/bin/install -c
configure:2534: checking whether build environment is sane
configure:2589: result: yes
configure:2740: checking for a thread-safe mkdir -p
configure:2779: result: /bin/mkdir -p
configure:2786: checking for gawk
configure:2802: found /usr/bin/gawk
configure:2813: result: gawk
configure:2824: checking whether make sets $(MAKE)
configure:2846: result: yes
configure:2875: checking whether make supports nested variables
configure:2892: result: yes
configure:3069: checking for gcc
configure:3085: found /usr/bin/gcc
configure:3096: result: gcc
configure:3325: checking for C compiler version
configure:3334: gcc --version >&5
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-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:3345: $? = 0
configure:3334: gcc -v >&5
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit -
-disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-e
cj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
configure:3345: $? = 0
configure:3334: gcc -V >&5
gcc: '-V' option must have argument
configure:3345: $? = 1
configure:3334: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:3345: $? = 1
configure:3365: checking whether the C compiler works
configure:3387: gcc conftest.c >&5
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../crt1.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
configure:3391: $? = 1
configure:3429: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "memcached"
| #define PACKAGE_TARNAME "memcached"
| #define PACKAGE_VERSION "1.4.24"
| #define PACKAGE_STRING "memcached 1.4.24"
| #define PACKAGE_BUGREPORT "memcached@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "memcached"
| #define VERSION "1.4.24"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3434: error: in `/opt/memcache/memcached-1.4.24':
configure:3436: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=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_host=x86_64-unknown-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=x86_64-unknown-linux-gnu
am_cv_make_support_nested_variables=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /opt/memcache/memcached-1.4.24/missing aclocal-1.14'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AUTOCONF='${SHELL} /opt/memcache/memcached-1.4.24/missing autoconf'
AUTOHEADER='${SHELL} /opt/memcache/memcached-1.4.24/missing autoheader'
AUTOMAKE='${SHELL} /opt/memcache/memcached-1.4.24/missing automake-1.14'
...skipping...
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /opt/memcache/memcached-1.4.24/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='unknown'
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "memcached"
#define PACKAGE_TARNAME "memcached"
#define PACKAGE_VERSION "1.4.24"
#define PACKAGE_STRING "memcached 1.4.24"
#define PACKAGE_BUGREPORT "memcached@googlegroups.com"
#define PACKAGE_URL ""
#define PACKAGE "memcached"
#define VERSION "1.4.24"
configure: exit 77