This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
libgcc build fails with "cannot compute suffix of object files: cannot compile"
- From: Devin <hdqdevin at gmail dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 19 Dec 2012 17:54:51 +0800
- Subject: libgcc build fails with "cannot compute suffix of object files: cannot compile"
Hi,
I was building native client toolchain on my own Linux OS, when it
went to libgcc it fails with following:
mkdir -p -- x86_64-nacl/libgcc
Configuring in x86_64-nacl/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking build system type... i686-pc-linux-gnu
checking host system type... x86_64-pc-nacl
checking for x86_64-nacl-ar... x86_64-nacl-ar
checking for x86_64-nacl-lipo... x86_64-nacl-lipo
checking for x86_64-nacl-nm...
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/nm
checking for x86_64-nacl-ranlib... x86_64-nacl-ranlib
checking for x86_64-nacl-strip... x86_64-nacl-strip
checking whether ln -s works... yes
checking for x86_64-nacl-gcc...
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include
checking for suffix of object files... configure: error: in
`/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/x86_64-nacl/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-target-libgcc] Error 1
make[2]: Leaving directory
`/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl'
============================================
The full config.log pasted below:
============================================
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.59. Invocation command line was
$ /opt/home/root/native-upstream/native_client/tools/SRC/gcc/libgcc/configure
--cache-file=./config.cache --enable-multilib
--with-cross-host=i686-pc-linux-gnu
--prefix=/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl
--disable-decimal-float --disable-libgomp --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch
--with-gmp=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-gmp
--with-mpfr=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-mpfr
--with-ppl=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-ppl
--with-host-libstdcxx=-lpwl -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm
--with-cloog=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-cloog-ppl
--disable-ppl-version-check --disable-shared --disable-threads
--without-headers --enable-languages=c
--program-transform-name=s,^,x86_64-nacl-,
--with-target-subdir=x86_64-nacl --build=i686-pc-linux-gnu
--host=x86_64-nacl --target=x86_64-nacl
--srcdir=/opt/home/root/native-upstream/native_client/tools/SRC/gcc/libgcc
## --------- ##
## Platform. ##
## --------- ##
hostname = hdell32
uname -m = i686
uname -r = 3.5.0-17-generic
uname -s = Linux
uname -v = #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012
/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: /tmp/nacl-glibc/nacl-sdk/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1199: creating cache ./config.cache
configure:1388: checking for --enable-version-specific-runtime-libs
configure:1403: result: no
configure:1435: checking for a BSD-compatible install
configure:1490: result: /usr/bin/install -c
configure:1506: checking for gawk
configure:1522: found /usr/bin/gawk
configure:1532: result: gawk
configure:1555: checking build system type
configure:1573: result: i686-pc-linux-gnu
configure:1581: checking host system type
configure:1595: result: x86_64-pc-nacl
configure:1654: checking for x86_64-nacl-ar
configure:1680: result: x86_64-nacl-ar
configure:1733: checking for x86_64-nacl-lipo
configure:1759: result: x86_64-nacl-lipo
configure:1813: checking for x86_64-nacl-nm
configure:1839: result:
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/nm
configure:1892: checking for x86_64-nacl-ranlib
configure:1918: result: x86_64-nacl-ranlib
configure:1972: checking for x86_64-nacl-strip
configure:1998: result: x86_64-nacl-strip
configure:2049: checking whether ln -s works
configure:2053: result: yes
configure:2070: checking for x86_64-nacl-gcc
configure:2096: result:
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include
configure:2380: checking for C compiler version
configure:2383:
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include
--version </dev/null >&5
xgcc (GCC) 4.4.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:2386: $? = 0
configure:2388:
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include
-v </dev/null >&5
Reading specs from
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/specs
Target: x86_64-nacl
Configured with:
/opt/home/root/native-upstream/native_client/tools/SRC/gcc/configure
CC='gcc -m32' CFLAGS='-O2 -g -Dinhibit_libc -D__gthr_posix_h'
LDFLAGS=-s 'CFLAGS_FOR_TARGET=-O2 -g ' 'CXXFLAGS_FOR_TARGET=-O2 -g '
--prefix=/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl
--disable-decimal-float --disable-libgomp --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch --target=x86_64-nacl
--with-gmp=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-gmp
--with-mpfr=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-mpfr
--with-ppl=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-ppl
--with-host-libstdcxx='-lpwl -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm'
--with-cloog=/opt/home/root/native-upstream/native_client/tools/BUILD/.gcc-extra-install-cloog-ppl
--disable-ppl-version-check --disable-shared --disable-threads
--enable-languages=c --without-headers
Thread model: single
gcc version 4.4.3 (GCC)
configure:2391: $? = 0
configure:2393:
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include
-V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2396: $? = 1
configure:2415:
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include
-o conftest -O2 -g conftest.c >&5
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/as:
line 76: exec: : not found
configure:2418: $? = 1
configure:2590: checking for suffix of object files
configure:2611:
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include
-c -O2 -g conftest.c >&5
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/as:
line 76: exec: : not found
configure:2614: $? = 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 ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2627: error: in
`/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/x86_64-nacl/libgcc':
configure:2630: 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_build_alias=i686-pc-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -g '
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_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=x86_64-nacl
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=x86_64-nacl
ac_cv_host=x86_64-pc-nacl
ac_cv_host_alias=x86_64-nacl
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AR=x86_64-nacl-ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC='
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include'
ac_cv_prog_LIPO=x86_64-nacl-lipo
ac_cv_prog_NM=/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/nm
ac_cv_prog_RANLIB=x86_64-nacl-ranlib
ac_cv_prog_STRIP=x86_64-nacl-strip
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR='x86_64-nacl-ar'
AWK='gawk'
CC=' /opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/xgcc
-B/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/bin/
-B/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/lib/
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/include
-isystem /opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl/x86_64-nacl/sys-include'
CFLAGS='-O2 -g '
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIPO='x86_64-nacl-lipo'
LN_S='ln -s'
LTLIBOBJS=''
NM='/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/nm'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='GNU C Runtime Library'
PACKAGE_STRING='GNU C Runtime Library 1.0'
PACKAGE_TARNAME='libgcc'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
RANLIB='x86_64-nacl-ranlib'
SHELL='/bin/sh'
STRIP='x86_64-nacl-strip'
ac_ct_AR=''
ac_ct_CC=''
ac_ct_LIPO=''
ac_ct_NM=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
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'
datadir='${prefix}/share'
decimal_float=''
enable_decimal_float='no'
enable_shared='no'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
host='x86_64-pc-nacl'
host_alias='x86_64-nacl'
host_cpu='x86_64'
host_noncanonical='x86_64-nacl'
host_os='nacl'
host_subdir='.'
host_vendor='pc'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='/opt/home/root/native-upstream/native_client/tools/SRC/gcc/libgcc/..'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/opt/home/root/native-upstream/native_client/tools/BUILD/install-pregcc-x86_64-nacl'
program_transform_name='s,^,x86_64-nacl-,'
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
sharedstatedir='${prefix}/com'
slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
sysconfdir='${prefix}/etc'
target_alias='x86_64-nacl'
target_subdir='x86_64-nacl'
tmake_file=''
vis_hide=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "GNU C Runtime Library"
#define PACKAGE_STRING "GNU C Runtime Library 1.0"
#define PACKAGE_TARNAME "libgcc"
#define PACKAGE_VERSION "1.0"
configure: exit 1
============================================
Looks like it failed in the file `as`, so I also pasted
/opt/home/root/native-upstream/native_client/tools/BUILD/build-pregcc-x86_64-nacl/./gcc/as
below:
============================================
#! /bin/sh
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# This file is part of GCC.
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# Invoke as, ld or nm from the build tree.
ORIGINAL_AS_FOR_TARGET=""
ORIGINAL_LD_FOR_TARGET=""
ORIGINAL_NM_FOR_TARGET=""
exeext=
fast_install=needless
objdir=.libs
invoked=`basename "$0"`
case "$invoked" in
as)
original=$ORIGINAL_AS_FOR_TARGET
prog=as-new$exeext
dir=gas
;;
collect-ld)
original=$ORIGINAL_LD_FOR_TARGET
prog=ld-new$exeext
dir=ld
;;
nm)
original=$ORIGINAL_NM_FOR_TARGET
prog=nm-new$exeext
dir=binutils
;;
esac
case "$original" in
../*)
# compute absolute path of the location of this script
tdir=`dirname "$0"`
scriptdir=`cd "$tdir" && pwd`
if test -x $scriptdir/../$dir/$prog; then
test "$fast_install" = yes || exec $scriptdir/../$dir/$prog ${1+"$@"}
# if libtool did everything it needs to do, there's a fast path
lt_prog=$scriptdir/../$dir/$objdir/lt-$prog
test -x $lt_prog && exec $lt_prog ${1+"$@"}
# libtool has not relinked ld-new yet, but we cannot just use the
# previous stage (because then the relinking would just never happen!).
# So we take extra care to use prev-ld/ld-new *on recursive calls*.
test x"$LT_RCU" = x"1" && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
LT_RCU=1; export LT_RCU
$scriptdir/../$dir/$prog ${1+"$@"}
result=$?
exit $result
else
exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
fi
;;
*)
exec "$original" ${1+"$@"}
;;
esac
Thanks,
Devin