Hi All , I am building gcc-4.5.0 on my centos5.4 machine(x86_64 ). I have compiled the latest version of gmp , mpc, and mpfr libraries in a directory under my home directory. The library has been properly installed there. Therefore I am exporting the LDFLAGS with value "-L/home/aaditya/gmp/install/lib -L/home/aaditya/mpc/install/lib -L/home/aaditya/mpfr/install/lib" But the build fails because make cant find those library (LDFLAGS is empty string in config.log in x86_64-unknown-linux-gnu/libgcc direcotry ). this is the same directory where the build fails. Very strangely the gcc source's top direcotry config.log reflects the correct LDFLAGS value. Why is the LDFLAGS set to empty string after I exported it with the correct value and which is also reflected in config.log of source's top directory. Am I missing something or Not doing someting that needs to be done ? PS: I am doing make clean and make distclean before ./configure and i am using the --with-gmp and similar options for configure command . my ./configure command line is : ./configure --prefix=/home/aaditya/gcc/ --with-gmp=/home/aaditya/gmp/install/ --with-mpfr=/home/aaditya/mpfr/install/ --with-mpc=/home/aaditya/mpc/install/ I am attaching the error output and the relevent portion of two config.log files . checking for suffix of object files... configure: error: in `/home/aaditya/gcc-4.5.0/x86_64-unknown-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[2]: *** [configure-stage1-target-libgcc] Error 1 make[2]: Leaving directory `/home/aaditya/gcc-4.5.0' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/aaditya/gcc-4.5.0' make: *** [all] Error 2 x86_64-unknown-linux-gnu/libgcc/config.log configure:3020: /home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/include -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/sys-include -o conftest -g -O2 -m64 -I/home/aaditya/gmp/install/include -I/home/aaditya/mpc/install/include -I/home/aaditya/mpfr/install/include conftest.c >&5 /home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory configure:3023: $? = 1 configure:3211: checking for suffix of object files configure:3233: /home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/include -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/sys-include -c -g -O2 -m64 -I/home/aaditya/gmp/install/include -I/home/aaditya/mpc/install/include -I/home/aaditya/mpfr/install/include conftest.c >&5 /home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory configure:3237: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3251: error: in `/home/aaditya/gcc-4.5.0/x86_64-unknown-linux-gnu/libgcc': configure:3254: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=x86_64-unknown-linux-gnu ac_cv_env_CC_set=set ac_cv_env_CC_value='/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/include -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/sys-include ' ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-g -O2 -m64 -I/home/aaditya/gmp/install/include -I/home/aaditya/mpc/install/include -I/home/aaditya/mpfr/install/include' ac_cv_env_CPPFLAGS_set=set ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set=set ac_cv_env_build_alias_value=x86_64-unknown-linux-gnu ac_cv_env_host_alias_set=set ac_cv_env_host_alias_value=x86_64-unknown-linux-gnu ac_cv_env_target_alias_set=set ac_cv_env_target_alias_value=x86_64-unknown-linux-gnu ac_cv_host=x86_64-unknown-linux-gnu ac_cv_prog_AR=ar ac_cv_prog_AWK=gawk ac_cv_prog_CC='/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/include -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/sys-include ' ac_cv_prog_LIPO=lipo ac_cv_prog_NM=/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/nm ac_cv_prog_RANLIB=ranlib ac_cv_prog_STRIP=strip ## ----------------- ## ## Output variables. ## ## ----------------- ## AR='ar' AWK='gawk' CC='/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/aaditya/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/include -isystem /home/aaditya/gcc/x86_64-unknown-linux-gnu/sys-include ' CFLAGS='-g -O2 -m64 -I/home/aaditya/gmp/install/include -I/home/aaditya/mpc/install/include -I/home/aaditya/mpfr/install/include' CPP='' CPPFLAGS='' DEFS='' ECHO_C='' ECHO_N='-n' ECHO_T='' EXEEXT='' INSTALL_DATA='/usr/bin/install -c -m 644' INSTALL_PROGRAM='/usr/bin/install -c' INSTALL_SCRIPT='/usr/bin/install -c' LDFLAGS='' LIBOBJS='' LIBS='' LIPO='lipo' LN_S='ln -s' LTLIBOBJS='' MAINT='#' NM='/home/aaditya/gcc-4.5.0/host-x86_64-unknown-linux-gnu/gcc/nm' OBJEXT='' PACKAGE_BUGREPORT='' PACKAGE_NAME='GNU C Runtime Library' PACKAGE_STRING='GNU C Runtime Library 1.0' PACKAGE_TARNAME='libgcc' PACKAGE_URL='http://www.gnu.org/software/libgcc/' PACKAGE_VERSION='1.0' PATH_SEPARATOR=':' RANLIB='ranlib' SHELL='/bin/sh' STRIP='strip' ac_ct_CC='' asm_hidden_op='' bindir='${exec_prefix}/bin' build='x86_64-unknown-linux-gnu' build_alias='x86_64-unknown-linux-gnu' build_cpu='x86_64' build_libsubdir='build-x86_64-unknown-linux-gnu' build_os='linux-gnu' build_subdir='build-x86_64-unknown-linux-gnu' build_vendor='unknown' datadir='${datarootdir}' datarootdir='${prefix}/share' decimal_float='' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' enable_decimal_float='' enable_shared='yes' exec_prefix='NONE' extra_parts='' fixed_point='' host='x86_64-unknown-linux-gnu' host_alias='x86_64-unknown-linux-gnu' host_cpu='x86_64' host_noncanonical='x86_64-unknown-linux-gnu' host_os='linux-gnu' host_subdir='host-x86_64-unknown-linux-gnu' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' libgcc_topdir='../.././libgcc/..' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/home/aaditya/gcc' program_transform_name='s,y,y,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' set_have_cc_tls='' set_use_emutls='' sharedstatedir='${prefix}/com' slibdir='$(libdir)' sysconfdir='${prefix}/etc' target_alias='x86_64-unknown-linux-gnu' target_subdir='x86_64-unknown-linux-gnu' tmake_file='' vis_hide='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "GNU C Runtime Library" #define PACKAGE_TARNAME "libgcc" #define PACKAGE_VERSION "1.0" #define PACKAGE_STRING "GNU C Runtime Library 1.0" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" configure: exit 1 The config.log file for gcc source's top directory ## ----------------- ## ## Output variables. ## ## ----------------- ## AR='ar' AR_FOR_BUILD='$(AR)' AR_FOR_TARGET='$(AR)' AS='as' AS_FOR_BUILD='$(AS)' AS_FOR_TARGET='$(AS)' AWK='gawk' BISON='/home/aaditya/gcc-4.5.0/missing bison' BUILD_CONFIG='bootstrap-debug' CC='gcc' CC_FOR_BUILD='$(CC)' CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/' CFLAGS='-g -O2 -m64 -I/home/aaditya/gmp/install/include -I/home/aaditya/mpc/install/include -I/home/aaditya/mpfr/install/include' CFLAGS_FOR_BUILD='-g -O2 -m64 -I/home/aaditya/gmp/install/include -I/home/aaditya/mpc/install/include -I/home/aaditya/mpfr/install/include' CFLAGS_FOR_TARGET='-g -O2 -m64 -I/home/aaditya/gmp/install/include -I/home/aaditya/mpc/install/include -I/home/aaditya/mpfr/install/include' COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as' COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld' COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm' CONFIGURE_GDB_TK='' CPP='gcc -E' CPPFLAGS='' CXX='g++' CXXFLAGS='' CXXFLAGS_FOR_BUILD='' CXXFLAGS_FOR_TARGET='-g ' CXX_FOR_BUILD='$(CXX)' CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' DEBUG_PREFIX_CFLAGS_FOR_TARGET='' DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DLT_OBJDIR=\".libs/\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1' DLLTOOL='dlltool' DLLTOOL_FOR_BUILD='$(DLLTOOL)' DLLTOOL_FOR_TARGET='$(DLLTOOL)' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='/bin/grep -E' EXEEXT='' EXPECT='expect' FLAGS_FOR_TARGET=' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include' FLEX='/home/aaditya/gcc-4.5.0/missing flex' GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/' GCC_SHLIB_SUBDIR='' GCJ_FOR_BUILD='$(GCJ)' GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/' GDB_TK='' GFORTRAN_FOR_BUILD='$(GFORTRAN)' GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/' GNATBIND='no' GNATMAKE='no' GREP='/bin/grep' INSTALL_DATA='${INSTALL} -m 644' INSTALL_GDB_TK='' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' LD='ld' LDFLAGS='-L/home/aaditya/gmp/install/lib -L/home/aaditya/mpc/install/lib -L/home/aaditya/mpfr/install/lib' LDFLAGS_FOR_BUILD='-L/home/aaditya/gmp/install/lib -L/home/aaditya/mpc/install/lib -L/home/aaditya/mpfr/install/lib' LD_FOR_BUILD='$(LD)' LD_FOR_TARGET='$(LD)' LEX='/home/aaditya/gcc-4.5.0/missing flex' LIBOBJS='' LIBS='' LIPO='lipo' LIPO_FOR_TARGET='$(LIPO)' LN='ln' LN_S='ln -s' LTLIBOBJS='' M4='m4' MAINT='#' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='#' MAKEINFO='/home/aaditya/gcc-4.5.0/missing makeinfo' NM='nm' NM_FOR_BUILD='$(NM)' NM_FOR_TARGET='$(NM)' OBJCOPY='objcopy' OBJDUMP='objdump' OBJDUMP_FOR_TARGET='$(OBJDUMP)' OBJEXT='o' PACKAGE_BUGREPORT='' PACKAGE_NAME='' PACKAGE_STRING='' PACKAGE_TARNAME='' PACKAGE_URL='' PACKAGE_VERSION='' PATH_SEPARATOR=':' RANLIB='ranlib' RANLIB_FOR_BUILD='$(RANLIB)' RANLIB_FOR_TARGET='$(RANLIB)' RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' RPATH_ENVVAR='LD_LIBRARY_PATH' RUNTEST='runtest' SED='/bin/sed' SHELL='/bin/sh' STRIP='strip' STRIP_FOR_TARGET='$(STRIP)' SYSROOT_CFLAGS_FOR_TARGET='' TOPLEVEL_CONFIGURE_ARGUMENTS='./configure --prefix=/home/aaditya/gcc/ --with-gmp=/home/aaditya/gmp/install/ --with-mpfr=/home/aaditya/mpfr/install/ --with-mpc=/home/aaditya/mpc/install/' WINDMC='windmc' WINDMC_FOR_BUILD='$(WINDMC)' WINDMC_FOR_TARGET='$(WINDMC)' WINDRES='windres' WINDRES_FOR_BUILD='$(WINDRES)' WINDRES_FOR_TARGET='$(WINDRES)' YACC='/home/aaditya/gcc-4.5.0/missing bison -y' ac_ct_CC='gcc' ac_ct_CXX='' bindir='${exec_prefix}/bin' build='x86_64-unknown-linux-gnu' build_alias='' build_configargs='--cache-file=../config.cache '\''--prefix=/home/aaditya/gcc/'\'' '\''--with-gmp=/home/aaditya/gmp/install/'\'' '\''--with-mpfr=/home/aaditya/mpfr/install/'\'' '\''--with-mpc=/home/aaditya/mpc/install/'\'' '\''--enable-languages=c,c++,fortran,java,objc'\'' --program-transform-name='\''s,y,y,'\'' --disable-option-checking' build_configdirs=' libiberty fixincludes' build_cpu='x86_64' build_libsubdir='build-x86_64-unknown-linux-gnu' build_noncanonical='x86_64-unknown-linux-gnu' build_os='linux-gnu' build_subdir='build-x86_64-unknown-linux-gnu' build_tooldir='${exec_prefix}/x86_64-unknown-linux-gnu' build_vendor='unknown' clooginc='' clooglibs='' compare_exclusions='gcc/cc*-checksum$(objext) | gcc/ada/*tools/*' config_shell='/bin/sh' configdirs=' intl libiberty zlib libcpp libdecnumber fixincludes gcc' datadir='${datarootdir}' datarootdir='${prefix}/share' do_compare='cmp --ignore-initial=16 $$f1 $$f2' docdir='${datarootdir}/doc/${PACKAGE}' dvidir='${docdir}' exec_prefix='${prefix}' extra_host_libiberty_configure_flags='' extra_mpc_gmp_configure_flags='' extra_mpc_mpfr_configure_flags='' extra_mpfr_configure_flags='' gmpinc='-I/home/aaditya/gmp/install//include -I/home/aaditya/mpfr/install//include -I/home/aaditya/mpc/install//include ' gmplibs='-L/home/aaditya/gmp/install//lib -L/home/aaditya/mpfr/install//lib -L/home/aaditya/mpc/install//lib -lmpc -lmpfr -lgmp' host='x86_64-unknown-linux-gnu' host_alias='' host_configargs='--cache-file=./config.cache '\''--prefix=/home/aaditya/gcc/'\'' '\''--with-gmp=/home/aaditya/gmp/install/'\'' '\''--with-mpfr=/home/aaditya/mpfr/install/'\'' '\''--with-mpc=/home/aaditya/mpc/install/'\'' '\''--enable-languages=c,c++,fortran,java,objc'\'' --program-transform-name='\''s,y,y,'\'' --disable-option-checking' host_cpu='x86_64' host_noncanonical='x86_64-unknown-linux-gnu' host_os='linux-gnu' host_subdir='host-x86_64-unknown-linux-gnu' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libelfinc='' libelflibs='' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' poststage1_ldflags='' poststage1_libs='' pplinc='' ppllibs='' prefix='/home/aaditya/gcc' program_transform_name='s,y,y,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' stage1_cflags='-g -fkeep-inline-functions' stage1_checking='--enable-checking=yes,types' stage1_languages='c' stage1_ldflags='' stage1_libs='' stage2_werror_flag='' sysconfdir='${prefix}/etc' target='x86_64-unknown-linux-gnu' target_alias='' target_configargs='--cache-file=./config.cache --enable-multilib '\''--prefix=/home/aaditya/gcc/'\'' '\''--with-gmp=/home/aaditya/gmp/install/'\'' '\''--with-mpfr=/home/aaditya/mpfr/install/'\'' '\''--with-mpc=/home/aaditya/mpc/install/'\'' '\''--enable-languages=c,c++,fortran,java,objc'\'' --program-transform-name='\''s,y,y,'\'' --disable-option-checking' target_configdirs=' libgcc libiberty libgomp libstdc++-v3 libmudflap libssp libgfortran boehm-gc libffi zlib libjava libobjc' target_cpu='x86_64' target_noncanonical='x86_64-unknown-linux-gnu' target_os='linux-gnu' target_subdir='x86_64-unknown-linux-gnu' target_vendor='unknown' tooldir='${exec_prefix}/x86_64-unknown-linux-gnu' ## ------------------- ## ## File substitutions. ## ## ------------------- ## alphaieee_frag='/dev/null' host_makefile_frag='/dev/null' ospace_frag='/dev/null' serialization_dependencies='serdep.tmp' target_makefile_frag='./config/mt-gnu' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define PACKAGE_STRING "" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" #define LT_OBJDIR ".libs/" #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 configure: exit 0