[MPICH] mpich2-1.0.3 configure: error: C compiler cannot create executables

Darius Buntinas buntinas at mcs.anl.gov
Tue Jan 29 15:15:34 CST 2008


It looks like you might have CFLAGS and LDFLAGS set to -m32, but your 
new machines ias a 64-bit OS installed.  Try this to unset those 
variables (assuming you're running bash):

   unset CFLAGS
   unset LDFLAGS

and give it a try again.  If this works, look in your .bashrc or 
.bash_profile to see if you're setting those there.

-d

On 01/29/2008 03:05 PM, spam.me at gmx.info wrote:
> Hello!
> 
> I used for a long time a 2xXEON 2,4GHz Workstation with Debian Sarge. Now I changed to a new AMD Athlon X2 computer and installed Kubuntu - Gutsy.
> 
> But unfortunately, I get the following error by the configure-command. What's happend and what can I do to solve the problem?
> 
> Thanks a lot!
> 
> 
> # /---------\
> # | command |
> # \---------/
> 
> hoffi at Blade:~/install/src/mpich2-1.0.3$ ./configure --prefix=$HOME/install
> Configuring MPICH2 version 1.0.3 with --prefix=/home/hoffi/install
> sourcing /home/hoffi/install/src/mpich2-1.0.3/src/pm/mpd/setup_pm
> checking for gcc... gcc
> 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 configure, which was
> generated by GNU Autoconf 2.59.  Invocation command line was
> 
>   $ ./configure --prefix=/home/hoffi/install
> 
> ## --------- ##
> ## Platform. ##
> ## --------- ##
> 
> hostname = Blade
> uname -m = x86_64
> uname -r = 2.6.22-14-generic
> uname -s = Linux
> uname -v = #1 SMP Tue Dec 18 05:28:27 UTC 2007
> 
> /usr/bin/uname -p = unknown
> /bin/uname -X     = unknown
> 
> /bin/arch              = unknown
> /usr/bin/arch -k       = unknown
> /usr/convex/getsysinfo = unknown
> hostinfo               = unknown
> /bin/machine           = unknown
> /usr/bin/oslevel       = unknown
> /bin/universe          = unknown
> 
> PATH: /home/hoffi/bin
> PATH: /home/hoffi/OpenFOAM/OpenFOAM-1.3/src/lam-7.1.1/platforms/linuxGcc4DPOpt/bin
> PATH: /home/hoffi/OpenFOAM/OpenFOAM-1.3/src/mico-2.3.11/platforms/linuxGcc4DPOpt/bin
> PATH: /home/hoffi/OpenFOAM/linux/j2sdk1.4.2_05/bin
> PATH: /home/hoffi/OpenFOAM/hoffi-1.3/applications/bin/linuxGcc4DPOpt
> PATH: /home/hoffi/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt
> PATH: /home/hoffi/OpenFOAM/OpenFOAM-1.3/wmake
> PATH: /home/hoffi/OpenFOAM/OpenFOAM-1.3/bin
> PATH: /home/hoffi/bin
> PATH: /usr/local/sbin
> PATH: /usr/local/bin
> PATH: /usr/sbin
> PATH: /usr/bin
> PATH: /sbin
> PATH: /bin
> PATH: /usr/games
> 
> 
> ## ----------- ##
> ## Core tests. ##
> ## ----------- ##
> 
> configure:2719: checking for gcc
> configure:2745: result: gcc
> configure:2989: checking for C compiler version
> configure:2992: gcc --version </dev/null >&5
> gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
> Copyright (C) 2006 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:2995: $? = 0
> configure:2997: gcc -v </dev/null >&5
> Using built-in specs.
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
> Thread model: posix
> gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
> configure:3000: $? = 0
> configure:3002: gcc -V </dev/null >&5
> gcc: '-V' option must have argument
> configure:3005: $? = 1
> configure:3028: checking for C compiler default output file name
> configure:3031: gcc -m32  -m32 conftest.c  >&5
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.1.3/libgcc.a when searching for -lgcc
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.1.3/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc
> collect2: ld returned 1 exit status
> configure:3034: $? = 1
> configure: failed program was:
> | /* confdefs.h.  */
> | 
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
> | #define PACKAGE_VERSION ""
> | #define PACKAGE_STRING ""
> | #define PACKAGE_BUGREPORT ""
> | #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL
> | #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG_ALL
> | #define USE_LOGGING MPID_LOGGING_NONE
> | #define MPICH_SINGLE_THREADED 1
> | #define MPICH_THREAD_LEVEL MPI_THREAD_FUNNELED
> | #define USE_THREAD_IMPL MPICH_THREAD_IMPL_NONE
> | #define HAVE_ROMIO 1
> | /* end confdefs.h.  */
> | 
> | int
> | main ()
> | {
> | 
> |   ;
> |   return 0;
> | }
> configure:3073: error: C compiler cannot create executables
> See `config.log' for more details.
> 
> ## ---------------- ##
> ## Cache variables. ##
> ## ---------------- ##
> 
> ac_cv_env_CC_set=set
> ac_cv_env_CC_value=gcc
> ac_cv_env_CFLAGS_set=set
> ac_cv_env_CFLAGS_value=-m32
> ac_cv_env_CPPFLAGS_set=
> ac_cv_env_CPPFLAGS_value=
> ac_cv_env_CPP_set=
> ac_cv_env_CPP_value=
> ac_cv_env_CXXFLAGS_set=set
> ac_cv_env_CXXFLAGS_value=-m32
> ac_cv_env_CXX_set=set
> ac_cv_env_CXX_value=g++
> ac_cv_env_F77_set=
> ac_cv_env_F77_value=
> ac_cv_env_F90FLAGS_set=
> ac_cv_env_F90FLAGS_value=
> ac_cv_env_F90_set=
> ac_cv_env_F90_value=
> ac_cv_env_FFLAGS_set=
> ac_cv_env_FFLAGS_value=
> ac_cv_env_LDFLAGS_set=set
> ac_cv_env_LDFLAGS_value=-m32
> 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=gcc
> pac_cv_my_conf_dir=/home/hoffi/install/src/mpich2-1.0.3
> 
> ## ----------------- ##
> ## Output variables. ##
> ## ----------------- ##
> 
> ADDRESS_KIND=''
> ALLOCA=''
> AR=''
> BSEND_OVERHEAD=''
> BUILD_TVDLL=''
> CC='gcc'
> CC_SHL=''
> CC_SHL_DBG=''
> CFLAGS='-m32'
> CONFIGURE_ARGUMENTS='--prefix=/home/hoffi/install'
> CPP=''
> CPPFLAGS=''
> CREATESHLIB=''
> CXX='g++'
> CXXFLAGS='-m32'
> CXX_LINKPATH_SHL=''
> CXX_SHL=''
> C_LINKPATH_SHL=''
> C_LINK_SHL=''
> C_LINK_SHL_DBG=''
> DEFS=''
> DEVICE='ch3'
> DLLIMPORT=''
> DOCTEXT=''
> DOCTEXTSTYLE=''
> ECHO_C=''
> ECHO_N='-n'
> ECHO_T=''
> EGREP=''
> ENABLE_SHLIB=''
> ETAGS=''
> ETAGSADD=''
> EXAMPLE_LIBS=''
> EXEEXT=''
> EXTERNAL_SRC_DIRS=''
> EXTRA_STATUS_DECL=''
> F77=''
> F77CPP=''
> F77_COMPLEX16=''
> F77_COMPLEX32=''
> F77_COMPLEX8=''
> F77_INCDIR=''
> F77_INTEGER16=''
> F77_INTEGER1=''
> F77_INTEGER2=''
> F77_INTEGER4=''
> F77_INTEGER8=''
> F77_IN_C_LIBS=''
> F77_LIBDIR_LEADER=''
> F77_NAME_MANGLE=''
> F77_REAL16=''
> F77_REAL4=''
> F77_REAL8=''
> F90=''
> F90CPP=''
> F90EXT=''
> F90FLAGS=''
> F90INC=''
> F90INCFLAG=''
> F90MODEXT=''
> F90MODINCFLAG=''
> F90MODINCSPEC=''
> F90_LINKPATH_SHL=''
> F90_SHL=''
> F90_WORK_FILES_ARG=''
> FC=''
> FC_LINKPATH_SHL=''
> FC_SHL=''
> FFLAGS=''
> FINCLUDES=''
> FLIBS=''
> FWRAPNAME='fmpich'
> GCC=''
> HAVE_CXX_EXCEPTIONS=''
> HAVE_ROMIO='#include "mpio.h"'
> INCLUDE_MPICXX_H=''
> INSTALL_DATA=''
> INSTALL_PROGRAM=''
> INSTALL_SCRIPT=''
> INT16_T=''
> INT32_T=''
> INT64_T=''
> LDFLAGS='-m32'
> LIBOBJS=''
> LIBS=''
> LIBTOOL=''
> LTLIBOBJS=''
> MAKE=''
> MAKE_DEPEND_C=''
> MANY_PM='no'
> MKDIR_P=''
> MPE_THREAD_LIB_NAME=''
> MPICC=''
> MPICH_TIMER_KIND=''
> MPICVSHOME=''
> MPICXX=''
> MPICXXLIBNAME='mpichcxx'
> MPID_TIMER_TYPE=''
> MPIF77=''
> MPIF90=''
> MPIFLIBNAME='mpich'
> MPIFPMPI=''
> MPILIBNAME='mpich'
> MPIMODNAME=''
> MPIU_DLL_SPEC_DEF=''
> MPI_2COMPLEX=''
> MPI_2DOUBLE_COMPLEX=''
> MPI_2DOUBLE_PRECISION=''
> MPI_2INT=''
> MPI_2INTEGER=''
> MPI_2REAL=''
> MPI_AINT=''
> MPI_BYTE=''
> MPI_CFLAGS=''
> MPI_CHAR=''
> MPI_CHARACTER=''
> MPI_COMPLEX16=''
> MPI_COMPLEX32=''
> MPI_COMPLEX8=''
> MPI_COMPLEX=''
> MPI_CXXFLAGS=''
> MPI_DOUBLE=''
> MPI_DOUBLE_COMPLEX=''
> MPI_DOUBLE_INT=''
> MPI_DOUBLE_PRECISION=''
> MPI_F77_BYTE=''
> MPI_F77_LB=''
> MPI_F77_PACKED=''
> MPI_F77_UB=''
> MPI_F90FLAGS=''
> MPI_FFLAGS=''
> MPI_FINT=''
> MPI_FLOAT=''
> MPI_FLOAT_INT=''
> MPI_INT=''
> MPI_INTEGER16=''
> MPI_INTEGER1=''
> MPI_INTEGER2=''
> MPI_INTEGER4=''
> MPI_INTEGER8=''
> MPI_INTEGER=''
> MPI_LB=''
> MPI_LDFLAGS=''
> MPI_LOGICAL=''
> MPI_LONG=''
> MPI_LONG_DOUBLE=''
> MPI_LONG_DOUBLE_INT=''
> MPI_LONG_INT=''
> MPI_LONG_LONG=''
> MPI_MAX_PROCESSOR_NAME=''
> MPI_OFFSET=''
> MPI_OFFSET_TYPEDEF=''
> MPI_PACKED=''
> MPI_REAL16=''
> MPI_REAL4=''
> MPI_REAL8=''
> MPI_REAL=''
> MPI_SHORT=''
> MPI_SHORT_INT=''
> MPI_SIGNED_CHAR=''
> MPI_STATUS_SIZE=''
> MPI_UB=''
> MPI_UNSIGNED_CHAR=''
> MPI_UNSIGNED_INT=''
> MPI_UNSIGNED_LONG=''
> MPI_UNSIGNED_LONG_LONG=''
> MPI_UNSIGNED_SHORT=''
> MPI_WCHAR=''
> NEEDSPLIB=''
> NO_WEAK_SYM=''
> NO_WEAK_SYM_TARGET=''
> OBJEXT=''
> OFFSET_KIND=''
> PACKAGE_BUGREPORT='mpich2-maint at mcs.anl.gov'
> PACKAGE_NAME='MPICH2'
> PACKAGE_STRING=''
> PACKAGE_TARNAME='mpich2-1.0.3'
> PACKAGE_VERSION='1.0.3'
> PATH_SEPARATOR=':'
> PERL5=''
> PERL=''
> PMPIFLIBNAME='pmpich'
> PMPILIBNAME='pmpich'
> PROFILE_DEF_MPI=''
> RANLIB=''
> RANLIB_AFTER_INSTALL=''
> SET_CFLAGS=''
> SET_MAKE=''
> SHELL='/bin/bash'
> SHLIB_EXT=''
> SHLIB_FROM_LO=''
> SHLIB_INSTALL=''
> SIZEOF_MPI_STATUS=''
> TESTCPP=''
> THR_CFLAGS=''
> THR_CPPFLAGS=''
> THR_DEFS=''
> THR_LDFLAGS=''
> THR_LIBS=''
> VERSION='1.0.3'
> VPATH=''
> ac_ct_CC='gcc'
> ac_ct_CXX=''
> ac_ct_F77=''
> ac_ct_F90=''
> ac_ct_RANLIB=''
> bindings=''
> bindings_dirs=''
> bindir='${exec_prefix}/bin'
> build_alias=''
> datadir='${prefix}/share'
> debugger_dir=''
> device_name='ch3'
> docdir='${prefix}/doc'
> exec_prefix='NONE'
> host_alias=''
> htmldir='${prefix}/www'
> includedir='${prefix}/include'
> infodir='${prefix}/info'
> libdir='${exec_prefix}/lib'
> libexecdir='${exec_prefix}/libexec'
> localstatedir='${prefix}/var'
> logging_dir=''
> logging_name='none'
> logging_subdirs=''
> mandir='${prefix}/man'
> master_top_builddir='/home/hoffi/install/src/mpich2-1.0.3'
> master_top_srcdir='/home/hoffi/install/src/mpich2-1.0.3'
> modincdir=''
> mpe_dir='mpe2'
> nameserv_name=''
> oldincludedir='/usr/include'
> other_install_dirs=' src/pm/mpd src/mpe2'
> other_pm_names=''
> pac_prog=''
> pm_name='mpd'
> pmi_name='simple'
> prefix='/home/hoffi/install'
> program_transform_name='s,x,x,'
> romio_dir='romio'
> sbindir='${exec_prefix}/sbin'
> sharedstatedir='${prefix}/com'
> subdirs=''
> subsystems=' src/mpi/romio src/pmi/simple src/pm/mpd src/mpe2'
> sysconfdir='${prefix}/etc'
> target_alias=''
> 
> ## ------------- ##
> ## Output files. ##
> ## ------------- ##
> 
> MPE_THREAD_FUNCS=''
> MPE_THREAD_TYPEDEFS=''
> 
> ## ----------- ##
> ## confdefs.h. ##
> ## ----------- ##
> 
> #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL
> #define HAVE_ROMIO 1
> #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG_ALL
> #define MPICH_SINGLE_THREADED 1
> #define MPICH_THREAD_LEVEL MPI_THREAD_FUNNELED
> #define PACKAGE_BUGREPORT ""
> #define PACKAGE_NAME ""
> #define PACKAGE_STRING ""
> #define PACKAGE_TARNAME ""
> #define PACKAGE_VERSION ""
> #define USE_LOGGING MPID_LOGGING_NONE
> #define USE_THREAD_IMPL MPICH_THREAD_IMPL_NONE
> 
> configure: exit 77
> 




More information about the mpich-discuss mailing list