BladeSystem Forums have moved here
To make BladeSystem information easier to find, we have moved the BladeSystem forums here, to Servers and Operating Systems.
Showing results for 
Search instead for 
Do you mean 

./configure error: C compiler cannot create executables

Occasional Contributor

./configure error: C compiler cannot create executables

my linux rpmlib is too low,so I want to install sourcecode rpm from

but I must ./configure then to make make install

but configure can't pass

next with config.log

gcc cpp gcc-cpp g++ c++ /usr/local/bin all be


@localhost rpm-5.3.5]$ gcc -v
使用内建 specs。
配置为:./configure --prefix=/usr/local/gcc-4.7.0/ --enable-threads=posix --disable-checking --disable-multilib --with-gmp=/usr/local/lib --with-mpfr=/usr/local/lib --with-mpc=/usr/local/lib
gcc 版本 4.7.0 (GCC)
@localhost rpm-5.3.5]$



@localhost rpm-5.3.5]$ ./configure --prefix=/tmp/rpm --with-dmalloc=/path/to/dmalloc
Configuring RPM Package Manager (RPM), Version 5.3.5

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-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 how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no

checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/home/HASEE/rpm/rpm-5.3.5':
configure: error: C compiler cannot create executables
See `config.log' for more details.


This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by rpm configure 5.3.5, which was generated by GNU Autoconf 2.63. Invocation command line was $ ./configure --prefix=/tmp/rpm --with-dmalloc=/path/to/dmalloc ## --------- ## ## Platform. ## ## --------- ## hostname = localhost uname -m = i686 uname -r = uname -s = Linux uname -v = #1 SMP Mon Jun 1 09:59:11 CST 2009 /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/local/gnat/bin PATH: /usr/lib/qt-3.3/bin PATH: /usr/kerberos/bin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/local/sbin PATH: /usr/sbin PATH: /sbin PATH: /opt/real/RealPlayer PATH: /home/HASEE/bin PATH: /opt/real/RealPlayer ## ----------- ## ## Core tests. ## ## ----------- ## configure:2587: checking build system type configure:2605: result: i686-pc-linux-gnu configure:2627: checking host system type configure:2642: result: i686-pc-linux-gnu configure:2664: checking target system type configure:2679: result: i686-pc-linux-gnu configure:2723: checking for a BSD-compatible install configure:2791: result: /usr/bin/install -c configure:2802: checking whether build environment is sane configure:2862: result: yes configure:3003: checking for a thread-safe mkdir -p configure:3042: result: /bin/mkdir -p configure:3055: checking for gawk configure:3071: found /usr/bin/gawk configure:3082: result: gawk configure:3093: checking whether make sets $(MAKE) configure:3115: result: yes configure:3192: checking how to create a ustar tar archive configure:3205: tar --version tar (GNU tar) 1.20 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. configure:3208: $? = 0 configure:3248: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar configure:3251: $? = 0 configure:3255: tar -xf - <conftest.tar configure:3258: $? = 0 configure:3271: result: gnutar configure:3281: checking whether to enable maintainer-specific portions of Makefiles configure:3290: result: no configure:3405: checking for style of include used by make configure:3433: result: GNU configure:3503: checking for gcc configure:3519: found /usr/local/bin/gcc configure:3530: result: gcc configure:3762: checking for C compiler version configure:3770: gcc --version >&5 gcc (GCC) 4.7.0 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:3774: $? = 0 configure:3781: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc Target: i686-pc-linux-gnu Configured with: ./configure --prefix=/usr/local/gcc-4.7.0/ --enable-threads=posix --disable-checking --disable-multilib --with-gmp=/usr/local/lib --with-mpfr=/usr/local/lib --with-mpc=/usr/local/lib Thread model: posix gcc version 4.7.0 (GCC) configure:3785: $? = 0 configure:3792: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:3796: $? = 1 configure:3819: checking for C compiler default output file name configure:3841: gcc conftest.c >&5 cc1: Invalid option `-iprefix' cc1: Invalid option `tune=generic' cc1: Invalid option `-auxbase' cc1: conftest: No such file or directory configure:3845: $? = 1 configure:3883: result: configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "rpm" | #define PACKAGE_TARNAME "rpm" | #define PACKAGE_VERSION "5.3.5" | #define PACKAGE_STRING "rpm 5.3.5" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "rpm" | #define VERSION "5.3.5" | #define RPM_NAME "RPM" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3889: error: in `/home/HASEE/rpm/rpm-5.3.5': configure:3892: error: C compiler cannot create executables See `config.log' for more details. ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=i686-pc-linux-gnu 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_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_YACC_set= ac_cv_env_YACC_value= ac_cv_env_YFLAGS_set= ac_cv_env_YFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_host=i686-pc-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=i686-pc-linux-gnu am_cv_prog_tar_ustar=gnutar ## ----------------- ## ## Output variables. ## ## ----------------- ## ACLOCAL='${SHELL} /home/HASEE/rpm/rpm-5.3.5/missing --run aclocal-1.11' ALLOCA='' AMDEPBACKSLASH='\' AMDEP_FALSE='#' AMDEP_TRUE='' AMTAR='${SHELL} /home/HASEE/rpm/rpm-5.3.5/missing --run tar' ANSI2KNR='' AR='' AS='' AUTOCONF='${SHELL} /home/HASEE/rpm/rpm-5.3.5/missing --run autoconf' AUTOHEADER='${SHELL} /home/HASEE/rpm/rpm-5.3.5/missing --run autoheader' AUTOMAKE='${SHELL} /home/HASEE/rpm/rpm-5.3.5/missing --run automake-1.11' AWK='gawk' BUILDROOTDIR_MACRO='' CC='gcc' CCDEPMODE='' CFLAGS='' CPP='' CPPFLAGS='' CXX='' CXXCPP='' CXXDEPMODE='' CXXFLAGS='' CYGPATH_W='echo' DBAPI='' DBLIBOBJS='' DBLIBSRCS='' DBPATH='' DBPATH_MACRO='' DEFS='' DEPDIR='.deps' DISTRO_MACROS='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' ENABLE_BUILD_EXTLIBDEP_FALSE='' ENABLE_BUILD_EXTLIBDEP_TRUE='' ENABLE_BUILD_INTLIBDEP_FALSE='' ENABLE_BUILD_INTLIBDEP_TRUE='' ENABLE_BUILD_LAFILES_FALSE='' ENABLE_BUILD_LAFILES_TRUE='' ENABLE_BUILD_MAXEXTLIBDEP_FALSE='' ENABLE_BUILD_MAXEXTLIBDEP_TRUE='' EXEEXT='' FGREP='' FIXPERMS='' GMSGFMT='' GMSGFMT_015='' GPSEE_MODULES_PATH='' GREP='' HAVE_LD_VERSION_SCRIPT_FALSE='' HAVE_LD_VERSION_SCRIPT_TRUE='' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' INTLLIBS='' INTL_MACOSX_LIBS='' LD='' LDFLAGS='' LDFLAGS_STATIC='' LIBICONV='' LIBINTL='' LIBOBJS='' LIBS='' LIBTOOL='' LIBTOOLIZE='' LIPO='' LN_S='' LOCALEDIR='' LTLIBICONV='' LTLIBINTL='' LTLIBOBJS='' LT_AGE='0' LT_CURRENT='5' LT_REVISION='3' MACROFILES='' MAGIC_MACRO='' MAINT='#' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='#' MAKEINFO='${SHELL} /home/HASEE/rpm/rpm-5.3.5/missing --run makeinfo' MKDIR='' MKDIR_P='/bin/mkdir -p' MSGFMT='' MSGFMT_015='' MSGMERGE='' NCPUS_COMMAND='' NM='' NMEDIT='' OBJDUMP='' OBJEXT='' OPENMP_CFLAGS='' OPENMP_CXXFLAGS='' OTOOL64='' OTOOL='' PACKAGE='rpm' PACKAGE_BUGREPORT='' PACKAGE_NAME='rpm' PACKAGE_STRING='rpm 5.3.5' PACKAGE_TARNAME='rpm' PACKAGE_VERSION='5.3.5' PATH_SEPARATOR=':' PERL='' PERL_INSTALLDIRS='' PKGSRCDIR='' PKGSRCDIR_MACRO='' POSUB='' PYTHON='' PYTHON_EXEC_PREFIX='' PYTHON_PREFIX='' PYTHON_VERSION='' RANLIB='' ROOT_GROUP='' RPMCANONARCH='' RPMCANONCOLOR='' RPMCANONGNU='' RPMCANONOS='' RPMCANONVENDOR='' RPMGID='' RPMGROUP='' RPMLUAFILES='' RPMPOPTFILES='' RPMUID='' RPMUSER='' RPM_TIMESTAMP='2010,9,18,0,0' RPM_VENDOR=''\''R'\'','\''P'\'','\''M'\'','\''5'\''' RPM_VERSION='5,3,r,5,0,_' SED='' SET_MAKE='' SHELL='/bin/sh' STRIP='' SYSCONFIGDIR='' U='' USE_LUA_CHKCONFIG_FALSE='' USE_LUA_CHKCONFIG_TRUE='' USE_LUA_CRYPTO_FALSE='' USE_LUA_CRYPTO_TRUE='' USE_LUA_SHADOW_FALSE='' USE_LUA_SHADOW_TRUE='' USE_LUA_SOCKET_FALSE='' USE_LUA_SOCKET_TRUE='' USE_NLS='' USE_NLS_FALSE='' USE_NLS_TRUE='' USRLIBRPM='' VERSION='5.3.5' WITH_ACL='' WITH_APIDOCS='' WITH_APIDOCS_TARGET='' WITH_ATERM='' WITH_ATTR='' WITH_AUGEAS='' WITH_AUGEAS_AUGTOOL='' WITH_BASH='' WITH_BASH_CPPFLAGS='' WITH_BASH_LDFLAGS='' WITH_BASH_LIBS='' WITH_BASH_SUBDIR='' WITH_BEECRYPT='' WITH_BEECRYPT_CPPFLAGS='' WITH_BEECRYPT_LDFLAGS='' WITH_BEECRYPT_LIBS='' WITH_BEECRYPT_SUBDIR='' WITH_BZIP2='' WITH_CPUINFO='' WITH_CUDF='' WITH_CUDF_CUDFTOOL='' WITH_DB='' WITH_DBSQL='' WITH_DBSQL_CODEGEN_FALSE='' WITH_DBSQL_CODEGEN_TRUE='' WITH_DBSQL_CPPFLAGS='' WITH_DBSQL_FALSE='' WITH_DBSQL_LDFLAGS='' WITH_DBSQL_LIBS='' WITH_DBSQL_SUBDIR='' WITH_DBSQL_TRUE='' WITH_DB_CPPFLAGS='' WITH_DB_FALSE='' WITH_DB_INTERNAL_FALSE='' WITH_DB_INTERNAL_TRUE='' WITH_DB_LDFLAGS='' WITH_DB_LIBS='' WITH_DB_RPC_FALSE='' WITH_DB_RPC_TRUE='' WITH_DB_SUBDIR='' WITH_DB_TOOLS_INTEGRATED_FALSE='' WITH_DB_TOOLS_INTEGRATED_TRUE='' WITH_DB_TRUE='' WITH_DMALLOC='' WITH_EFENCE='' WITH_EXPAT='' WITH_FICL='' WITH_FICL_CPPFLAGS='' WITH_FICL_LDFLAGS='' WITH_FICL_LIBS='' WITH_FICL_SUBDIR='' WITH_FILE='' WITH_FILE_CPPFLAGS='' WITH_FILE_INTERNAL_FALSE='' WITH_FILE_INTERNAL_TRUE='' WITH_FILE_LDFLAGS='' WITH_FILE_LIBS='' WITH_FILE_SUBDIR='' WITH_GCRYPT='' WITH_GNUTLS='' WITH_GPSEE='' WITH_GPSEE_CPPFLAGS='' WITH_GPSEE_LDFLAGS='' WITH_GPSEE_LIBS='' WITH_GPSEE_SUBDIR='' WITH_JS='' WITH_JS_CPPFLAGS='' WITH_JS_LDFLAGS='' WITH_JS_LIBS='' WITH_JS_SUBDIR='' WITH_KEYUTILS='' WITH_KEYUTILS_RPMKEY='' WITH_LIBELF_DEBUGEDIT='' WITH_LIBTASN1='' WITH_LUA='' WITH_LUA_CPPFLAGS='' WITH_LUA_LDFLAGS='' WITH_LUA_LIBS='' WITH_LUA_SUBDIR='' WITH_LUA_SUBDIR_DEF='' WITH_LUA_SUBDIR_LIB='' WITH_NEON='' WITH_NEON_CPPFLAGS='' WITH_NEON_LDFLAGS='' WITH_NEON_LIBS='' WITH_NEON_SUBDIR='' WITH_NIX='' WITH_NSS='' WITH_OPENSSL='' WITH_PAKCHOIS='' WITH_PATH_VERSIONED='' WITH_PATH_VERSIONED_FALSE='' WITH_PATH_VERSIONED_SUFFIX='' WITH_PATH_VERSIONED_TRUE='' WITH_PCRE='' WITH_PCRE_CPPFLAGS='' WITH_PCRE_LDFLAGS='' WITH_PCRE_LIBS='' WITH_PCRE_SUBDIR='' WITH_PERLEMBED='' WITH_PERL_LIBS='' WITH_PERL_SUBDIR='' WITH_PERL_SUBPACKAGE='' WITH_POPT='' WITH_POPT_CPPFLAGS='' WITH_POPT_LDFLAGS='' WITH_POPT_LIBS='' WITH_POPT_SUBDIR='' WITH_PYTHONEMBED='' WITH_PYTHON_INCDIR='' WITH_PYTHON_SUBDIR='' WITH_PYTHON_SUBPACKAGE='' WITH_RC='' WITH_RC_CPPFLAGS='' WITH_RC_LDFLAGS='' WITH_RC_LIBS='' WITH_RC_SUBDIR='' WITH_READLINE='' WITH_RUBY='' WITH_RUBY_SUBDIR='' WITH_SELINUX='' WITH_SEMANAGE='' WITH_SEMANAGE_SEMODULE='' WITH_SEPOL='' WITH_SPIDERMONKEY_SUBDIR='' WITH_SQLITE='' WITH_SQLITE_CPPFLAGS='' WITH_SQLITE_LDFLAGS='' WITH_SQLITE_LIBS='' WITH_SQLITE_SUBDIR='' WITH_SQUIRREL='' WITH_SYCK='' WITH_SYCK_CPPFLAGS='' WITH_SYCK_LDFLAGS='' WITH_SYCK_LIBS='' WITH_SYCK_SUBDIR='' WITH_TCL='' WITH_TCL_SUBDIR='' WITH_TOMCRYPT='' WITH_UUID='' WITH_XAR='' WITH_XAR_CPPFLAGS='' WITH_XAR_FALSE='' WITH_XAR_LDFLAGS='' WITH_XAR_LIBS='' WITH_XAR_SUBDIR='' WITH_XAR_TRUE='' WITH_XZ='' WITH_XZ_CPPFLAGS='' WITH_XZ_LDFLAGS='' WITH_XZ_LIBS='' WITH_XZ_SUBDIR='' WITH_ZLIB='' WITH_ZLIB_CPPFLAGS='' WITH_ZLIB_LDFLAGS='' WITH_ZLIB_LIBS='' WITH_ZLIB_SUBDIR='' XGETTEXT='' XGETTEXT_015='' YACC='' YFLAGS='' __BASH='' __BZIP2='' __CAT='' __CHGRP='' __CHGRP_RHF='' __CHMOD='' __CHOWN='' __CHOWN_RHF='' __CMAKE='' __CPIO='' __CURL='' __CVS='' __DB_ARCHIVE='' __DB_CHECKPOINT='' __DB_DUMP='' __DB_LOAD='' __DB_LOG_VERIFY='' __DB_PRINTLOG='' __DB_RECOVER='' __DB_STAT='' __DB_UPGRADE='' __DB_VERIFY='' __DIFF='' __DITTO='' __DOXYGEN='' __FILE='' __GIT='' __GPG='' __GSR='' __GZIP='' __HG='' __ID='' __ID_U='' __INSTALL='' __INSTALL_INFO='' __LD='' __LDCONFIG='' __LN='' __LZMA='' __LZOP='' __MAKE='' __MKDIR='' __MKDIR_P='' __MONGO='' __MV='' __NM='' __OBJCOPY='' __OBJDUMP='' __PATCH='' __PAX='' __PERL='' __PGP='' __PHP='' __PYTHON='' __RM='' __RSH='' __RUBY='' __SED='' __SH='' __SQLITE3='' __SSH='' __STRIP='' __SVN='' __TAR='' __TCLSH='' __UNZIP='' __XZ='' ac_ct_CC='gcc' ac_ct_CXX='' ac_ct_DUMPBIN='' am__EXEEXT_FALSE='' am__EXEEXT_TRUE='' am__fastdepCC_FALSE='' am__fastdepCC_TRUE='' am__fastdepCXX_FALSE='' am__fastdepCXX_TRUE='' am__include='include' am__isrc='' am__leading_dot='.' am__quote='' am__tar='tar --format=ustar -chf - "$$tardir"' am__untar='tar -xf -' autorelocate_dcolor='' autorelocate_path='' bindir='${exec_prefix}/bin' build='i686-pc-linux-gnu' build_alias='' build_cpu='i686' build_os='linux-gnu' build_vendor='pc' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' exeext='' host='i686-pc-linux-gnu' host_alias='' host_cpu='i686' host_os='linux-gnu' host_vendor='pc' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /home/HASEE/rpm/rpm-5.3.5/install-sh' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' libext='' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' mkdir_p='/bin/mkdir -p' objext='' oldincludedir='/usr/include' pdfdir='${docdir}' pkgpyexecdir='' pkgpythondir='' prefix='/tmp/rpm' program_transform_name='s,x,x,' psdir='${docdir}' pyexecdir='' pythondir='' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' shlibext='' subdirs='' sysconfdir='${prefix}/etc' target='i686-pc-linux-gnu' target_alias='' target_cpu='i686' target_os='linux-gnu' target_vendor='pc' testdir='' usrprefix='' varprefix='' ## ----------- ## ## confdefs.h. ## ## ----------- ## #define PACKAGE_NAME "rpm" #define PACKAGE_TARNAME "rpm" #define PACKAGE_VERSION "5.3.5" #define PACKAGE_STRING "rpm 5.3.5" #define PACKAGE_BUGREPORT "" #define PACKAGE "rpm" #define VERSION "5.3.5" #define RPM_NAME "RPM" configure: exit 77

Honored Contributor

Re: ./configure error: C compiler cannot create executables

It looks like something might be wrong with your gcc installation.


Your config.log includes these messages:

configure:3819: checking for C compiler default output file name
configure:3841: gcc    conftest.c  >&5
cc1: Invalid option `-iprefix'
cc1: Invalid option `tune=generic'
cc1: Invalid option `-auxbase'
cc1: conftest: No such file or directory
configure:3845: $? = 1
configure:3883: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "rpm"
| #define PACKAGE_TARNAME "rpm"
| #define PACKAGE_VERSION "5.3.5"
| #define PACKAGE_STRING "rpm 5.3.5"
| #define PACKAGE "rpm"
| #define VERSION "5.3.5"
| #define RPM_NAME "RPM"
| /* end confdefs.h.  */
| int
| main ()
| {
|   ;
|   return 0;
| }
configure:3889: error: in `/home/HASEE/rpm/rpm-5.3.5':
configure:3892: error: C compiler cannot create executables
See `config.log' for more details.


In other words: the configure script created a very simple program named "conftest.c" and tried to compile it with "gcc conftest.c". The result was a number of error messages from cc1, which is part of the gcc compiler suite. Those error messages seem to say that cc1 does not understand the options gcc is giving it. This should not happen: gcc and cc1 should both be parts of the same compiler package, and cc1 should be able to accept anything the gcc is going to give it.


Since your gcc is in a non-standard location at /usr/local/gcc-4.7.0, my guess is that your gcc may be using an older version of cc1 that is located somewhere else on your system.


Have you successfully compiled anything else with that compiler on that system? Even a simple "hello world" program?


My Debian 7.2 system has gcc 4.7.2 in a standard location, and it can compile that small program without any errors.