LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.2 GCC make error: Cannot compute suffix of object files (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-2-gcc-make-error-cannot-compute-suffix-of-object-files-4175430765/)

Dylan 2228 10-05-2012 06:49 PM

LFS 7.2 GCC make error: Cannot compute suffix of object files
 
Hi everyone, this is my first post on this forum, and my first attempt at an LFS build.
I get to chapter 5.5, and I have followed everything exactly, but when I try the 'make' command for GCC-4.7.1 I get the following error (My host system is Ubuntu 11.10);
Code:

checking for suffix of object files... configure: error: in `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2

This is the contents of my config.log
Code:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ /mnt/lfs/sources/gcc-4.7.1/libgcc/configure --cache-file=./config.cache --with-cross-host=i686-pc-linux-gnu --prefix=/tools --with-sysroot=/mnt/lfs --with-newlib --without-headers --with-local-prefix=/tools --with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --enable-languages=c,lto --program-transform-name=s&^&i686-lfs-linux-gnu-& --disable-option-checking --with-target-subdir=i686-lfs-linux-gnu --build=i686-pc-linux-gnu --host=i686-lfs-linux-gnu --target=i686-lfs-linux-gnu --srcdir=../../../gcc-4.7.1/libgcc

## --------- ##
## Platform. ##
## --------- ##

hostname = E7212
uname -m = i686
uname -r = 3.0.0-26-generic-pae
uname -s = Linux
uname -v = #42-Ubuntu SMP Wed Sep 5 08:58:09 UTC 2012

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

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

PATH: /tools/bin
PATH: /bin
PATH: /usr/bin
PATH: /tools/bin


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

configure:1976: creating cache ./config.cache
configure:2144: checking build system type
configure:2158: result: i686-pc-linux-gnu
configure:2178: checking host system type
configure:2191: result: i686-lfs-linux-gnu
configure:2289: checking for --enable-version-specific-runtime-libs
configure:2302: result: no
configure:2350: checking for a BSD-compatible install
configure:2418: result: /usr/bin/install -c
configure:2434: checking for gawk
configure:2461: result: gawk
configure:2561: checking for i686-lfs-linux-gnu-ar
configure:2588: result: i686-lfs-linux-gnu-ar
configure:2653: checking for i686-lfs-linux-gnu-lipo
configure:2680: result: i686-lfs-linux-gnu-lipo
configure:2745: checking for i686-lfs-linux-gnu-nm
configure:2772: result: /mnt/lfs/sources/gcc-build/./gcc/nm
configure:2837: checking for i686-lfs-linux-gnu-ranlib
configure:2864: result: i686-lfs-linux-gnu-ranlib
configure:2929: checking for i686-lfs-linux-gnu-strip
configure:2956: result: i686-lfs-linux-gnu-strip
configure:3018: checking whether ln -s works
configure:3022: result: yes
configure:3039: checking for i686-lfs-linux-gnu-gcc
configure:3066: result: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include 
configure:3335: checking for C compiler version
configure:3344: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include    --version >&5
xgcc (GCC) 4.7.1
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:3355: $? = 0
configure:3344: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include    -v >&5
Reading specs from /mnt/lfs/sources/gcc-build/./gcc/specs
COLLECT_GCC=/mnt/lfs/sources/gcc-build/./gcc/xgcc
COLLECT_LTO_WRAPPER=/mnt/lfs/sources/gcc-build/./gcc/lto-wrapper
Target: i686-lfs-linux-gnu
Configured with: ../gcc-4.7.1/configure --target=i686-lfs-linux-gnu --prefix=/tools --with-sysroot=/mnt/lfs --with-newlib --without-headers --with-local-prefix=/tools --with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --enable-languages=c --with-mpfr-include=/mnt/lfs/sources/gcc-build/../gcc-4.7.1/mpfr/src --with-mpfr-lib=/mnt/lfs/sources/gcc-build/mpfr/src/.libs
Thread model: single
gcc version 4.7.1 (GCC)
configure:3355: $? = 0
configure:3344: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3355: $? = 1
configure:3344: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3355: $? = 1
configure:3371: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include    -o conftest -g -O2  conftest.c  >&5
/mnt/lfs/sources/gcc-build/./gcc/as: line 87: exec: --: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
configure:3374: $? = 1
configure:3562: checking for suffix of object files
configure:3584: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include    -c -g -O2  conftest.c >&5
/mnt/lfs/sources/gcc-build/./gcc/as: line 87: exec: --: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
configure:3588: $? = 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:3602: error: in `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc':
configure:3605: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include  '
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-g -O2'
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=i686-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i686-lfs-linux-gnu
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=i686-lfs-linux-gnu
ac_cv_host=i686-lfs-linux-gnu
ac_cv_prog_AR=i686-lfs-linux-gnu-ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC='/mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include  '
ac_cv_prog_LIPO=i686-lfs-linux-gnu-lipo
ac_cv_prog_NM=/mnt/lfs/sources/gcc-build/./gcc/nm
ac_cv_prog_RANLIB=i686-lfs-linux-gnu-ranlib
ac_cv_prog_STRIP=i686-lfs-linux-gnu-strip

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

AR='i686-lfs-linux-gnu-ar'
AWK='gawk'
CC='/mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include  '
CFLAGS='-g -O2'
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='i686-lfs-linux-gnu-lipo'
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
NM='/mnt/lfs/sources/gcc-build/./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=':'
PICFLAG='-fpic'
RANLIB='i686-lfs-linux-gnu-ranlib'
SHELL='/bin/sh'
STRIP='i686-lfs-linux-gnu-strip'
ac_ct_CC=''
asm_hidden_op=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias='i686-pc-linux-gnu'
build_cpu='i686'
build_libsubdir='build-i686-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-i686-pc-linux-gnu'
build_vendor='pc'
cpu_type=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
decimal_float=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
double_type_size=''
dvidir='${docdir}'
enable_decimal_float='no'
enable_shared='no'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
host='i686-lfs-linux-gnu'
host_alias='i686-lfs-linux-gnu'
host_cpu='i686'
host_noncanonical='i686-lfs-linux-gnu'
host_os='linux-gnu'
host_subdir='.'
host_vendor='lfs'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='../../../gcc-4.7.1/libgcc/..'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
long_double_type_size=''
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/tools'
program_transform_name='s&^&i686-lfs-linux-gnu-&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
set_use_emutls=''
sfp_machine_header=''
sharedstatedir='${prefix}/com'
slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
sysconfdir='${prefix}/etc'
target_alias='i686-lfs-linux-gnu'
target_noncanonical='i686-lfs-linux-gnu'
target_subdir='i686-lfs-linux-gnu'
tm_defines=''
tm_file=''
tmake_file=''
toolexecdir='$(exec_prefix)/$(target_noncanonical)'
toolexeclibdir='$(toolexecdir)/lib'
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

And here is my version-check.sh result
Code:

09:47:12_dylan@E7212:~$ export LC_ALL=C
09:47:12_dylan@E7212:~$ bash --version | head -n1 | cut -d" " -f2-4
bash, version 4.2.10(1)-release
09:47:12_dylan@E7212:~$ echo "/bin/sh -> `readlink -f /bin/sh`"
/bin/sh -> /bin/bash
09:47:12_dylan@E7212:~$ echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
Binutils: (GNU Binutils) 2.22
09:47:12_dylan@E7212:~$ bison --version | head -n1
bison (GNU Bison) 2.4.1
09:47:12_dylan@E7212:~$ if [ -e /usr/bin/yacc ];
> then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
> else echo "yacc not found"; fi
/usr/bin/yacc -> /usr/bin/bison.yacc
09:47:12_dylan@E7212:~$ bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
bzip2,  Version 1.0.5, 10-Dec-2007.
09:47:12_dylan@E7212:~$ echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
Coreutils:  8.5
09:47:12_dylan@E7212:~$ diff --version | head -n1
diff (GNU diffutils) 3.0
09:47:12_dylan@E7212:~$ find --version | head -n1
find (GNU findutils) 4.4.2
09:47:12_dylan@E7212:~$ gawk --version | head -n1
GNU Awk 3.1.8
09:47:12_dylan@E7212:~$ if [ -e /usr/bin/awk ];
> then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
> else echo "awk not found"; fi
/usr/bin/awk -> /usr/bin/gawk
09:47:12_dylan@E7212:~$ gcc --version | head -n1
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
09:47:12_dylan@E7212:~$ ldd --version | head -n1 | cut -d" " -f2- # glibc version
(Ubuntu EGLIBC 2.13-20ubuntu5) 2.13
09:47:12_dylan@E7212:~$ grep --version | head -n1
grep (GNU grep) 2.9
09:47:12_dylan@E7212:~$ gzip --version | head -n1
gzip 1.3.12
09:47:12_dylan@E7212:~$ cat /proc/version
Linux version 3.0.0-26-generic-pae (buildd@roseapple) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #42-Ubuntu SMP Wed Sep 5 08:58:09 UTC 2012
09:47:12_dylan@E7212:~$ m4 --version | head -n1
m4 (GNU M4) 1.4.16
09:47:12_dylan@E7212:~$ make --version | head -n1
GNU Make 3.81
09:47:12_dylan@E7212:~$ patch --version | head -n1
patch 2.6.1
09:47:12_dylan@E7212:~$ echo Perl `perl -V:version`
Perl version='5.12.4';
09:47:12_dylan@E7212:~$ sed --version | head -n1
GNU sed version 4.2.1
09:47:12_dylan@E7212:~$ tar --version | head -n1
tar (GNU tar) 1.25
09:47:12_dylan@E7212:~$ echo "Texinfo: `makeinfo --version | head -n1`"
Texinfo: makeinfo (GNU texinfo) 4.13
09:47:12_dylan@E7212:~$ xz --version | head -n1
xz (XZ Utils) 5.0.0
09:47:12_dylan@E7212:~$ echo 'main(){}' > dummy.c && gcc -o dummy dummy.c
09:47:12_dylan@E7212:~$ if [ -x dummy ]
> then echo "gcc compilation OK";
> else echo "gcc compilation failed"; fi
gcc compilation OK

I probably have missed something really obvious, so I apologize in advance. Hopefully somebody can help me out.

spiky0011 10-08-2012 02:47 PM

Hi

What is the output of
Code:

ls -l /tools
on host


All times are GMT -5. The time now is 06:16 AM.