LFS Book 9.1 Section 6.9.1 cannot compute suffix of object files
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc -ffile-prefix-map=/tools=/usr
checking for suffix of object files... configure: error: in `/sources/glibc-2.31/build':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
And config.log says
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 Library configure (see version.h), which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ../configure --prefix=/usr --disable-werror --enable-kernel=3.2 --enable-stack-protector=strong -with-headers=/usr/include libc_cv_slibdir=/lib
## --------- ##
## Platform. ##
## --------- ##
hostname = soz-manjaro
uname -m = x86_64
uname -r = 5.6.12-1-MANJARO
uname -s = Linux
uname -v = #1 SMP PREEMPT Sun May 10 14:36:43 UTC 2020
/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: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /tools/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2214: checking build system type
configure:2228: result: x86_64-pc-linux-gnu
configure:2248: checking host system type
configure:2261: result: x86_64-pc-linux-gnu
configure:2330: checking for gcc
configure:2357: result: gcc -ffile-prefix-map=/tools=/usr
configure:2586: checking for C compiler version
configure:2595: gcc -ffile-prefix-map=/tools=/usr --version >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -ffile-prefix-map=/tools=/usr -v >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -ffile-prefix-map=/tools=/usr -V >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -ffile-prefix-map=/tools=/usr -qversion >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2611: checking for suffix of object files
configure:2633: gcc -ffile-prefix-map=/tools=/usr -c conftest.c >&5
../configure: line 2635: /tools/bin/gcc: No such file or directory
configure:2637: $? = 127
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "glibc"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/"
| #define PACKAGE_URL "https://www.gnu.org/software/glibc/"
| #define PKGVERSION "(GNU libc) "
| #define REPORT_BUGS_TO "<https://www.gnu.org/software/libc/bugs.html>"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2651: error: in `/sources/glibc-2.31/build':
configure:2653: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='gcc -ffile-prefix-map=/tools=/usr'
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_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_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=x86_64-pc-linux-gnu
ac_cv_prog_ac_ct_CC='gcc -ffile-prefix-map=/tools=/usr'
libc_cv_slibdir=/lib
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR=''
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC=''
CC='gcc -ffile-prefix-map=/tools=/usr'
CFLAGS=''
CPP=''
CPPFLAGS=''
CPPUNDEFS=''
CXX=''
CXXFLAGS=''
CXX_BITS_STD_ABS_H=''
CXX_CMATH_HEADER=''
CXX_CSTDLIB_HEADER=''
CXX_SYSINCLUDES=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
GPROF=''
INSTALL_DATA=''
INSTALL_INFO=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LD=''
LDFLAGS=''
LIBGD=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBOBJS=''
MAKE=''
MAKEINFO=''
MSGFMT=''
NM=''
OBJCOPY=''
OBJDUMP=''
OBJEXT=''
PACKAGE_BUGREPORT='https://sourceware.org/bugzilla/'
PACKAGE_NAME='GNU C Library'
PACKAGE_STRING='GNU C Library (see version.h)'
PACKAGE_TARNAME='glibc'
PACKAGE_URL='https://www.gnu.org/software/glibc/'
PACKAGE_VERSION='(see version.h)'
PATH_SEPARATOR=':'
PERL=''
PKGVERSION='(GNU libc) '
PKGVERSION_TEXI='(GNU libc) '
PYTHON=''
PYTHON_PROG=''
READELF=''
RELEASE=''
REPORT_BUGS_TEXI='@uref{https://www.gnu.org/software/libc/bugs.html}'
REPORT_BUGS_TO='<https://www.gnu.org/software/libc/bugs.html>'
SED=''
SHELL='/bin/sh'
SYSINCLUDES=''
VERSION=''
ac_ct_CC='gcc -ffile-prefix-map=/tools=/usr'
ac_ct_CXX=''
all_warnings=''
base_machine=''
bindir='${exec_prefix}/bin'
bindnow=''
build='x86_64-pc-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_crypt=''
build_nscd=''
build_obsolete_nsl=''
build_os='linux-gnu'
build_pt_chown=''
build_vendor='pc'
cross_compiling='no'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
enable_timezone_tools=''
enable_werror='no'
exec_prefix='NONE'
experimental_malloc=''
extra_nonshared_cflags=''
fno_unit_at_a_time=''
force_install=''
hardcoded_path_in_tests=''
have_libaudit=''
have_libcap=''
have_selinux=''
have_tunables=''
host='x86_64-pc-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
ldd_rewrite_script=''
libc_cv_cc_loop_to_function=''
libc_cv_cc_nofma=''
libc_cv_cc_pie_default=''
libc_cv_cc_submachine=''
libc_cv_cc_with_libunwind=''
libc_cv_complocaledir=''
libc_cv_cxx_thread_local=''
libc_cv_fpie=''
libc_cv_gcc_unwind_find_fde=''
libc_cv_has_glob_dat=''
libc_cv_hashstyle=''
libc_cv_insert=''
libc_cv_localstatedir=''
libc_cv_mtls_dialect_gnu2=''
libc_cv_multidir=''
libc_cv_nss_crypt=''
libc_cv_output_format=''
libc_cv_pic_default=''
libc_cv_pie_default=''
libc_cv_protected_data=''
libc_cv_rootsbindir=''
libc_cv_rtlddir=''
libc_cv_slibdir='/lib'
libc_cv_ssp=''
libc_cv_static_nss_crypt=''
libc_cv_sysconfdir=''
libc_cv_textrel_ifunc=''
libc_cv_with_fp=''
libc_cv_z_combreloc=''
libc_cv_z_execstack=''
libc_extra_cflags=''
libc_extra_cppflags=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
link_obsolete_rpc=''
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mach_interface_list=''
mandir='${datarootdir}/man'
multi_arch=''
no_stack_protector=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
profile=''
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
shared=''
sharedstatedir='${prefix}/com'
stack_protector=''
static=''
static_nss=''
subdirs=' '
submachine=''
sysconfdir='${prefix}/etc'
sysheaders=''
sysnames=''
target_alias=''
use_default_link=''
use_ldconfig=''
use_nscd=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_TARNAME "glibc"
#define PACKAGE_VERSION "(see version.h)"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/"
#define PACKAGE_URL "https://www.gnu.org/software/glibc/"
#define PKGVERSION "(GNU libc) "
#define REPORT_BUGS_TO "<https://www.gnu.org/software/libc/bugs.html>"
configure: exit 1
(lfs chroot) root:/sources/glibc-2.31/build# CC="gcc -ffile-prefix-map=/tools=/usr"; ../configure --prefix=/usr --disable-werror --enable-kernel=3.2 --enable-stack-protector=strong -with-headers=/usr/include libc_cv_slibdir=/lib
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc -ffile-prefix-map=/tools=/usr
checking for suffix of object files... configure: error: in `/sources/glibc-2.31/build':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
(lfs chroot) root:/sources/glibc-2.31/build# cat 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 GNU C Library configure (see version.h), which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ../configure --prefix=/usr --disable-werror --enable-kernel=3.2 --enable-stack-protector=strong -with-headers=/usr/include libc_cv_slibdir=/lib
## --------- ##
## Platform. ##
## --------- ##
hostname = soz-manjaro
uname -m = x86_64
uname -r = 5.6.12-1-MANJARO
uname -s = Linux
uname -v = #1 SMP PREEMPT Sun May 10 14:36:43 UTC 2020
/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: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /tools/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2214: checking build system type
configure:2228: result: x86_64-pc-linux-gnu
configure:2248: checking host system type
configure:2261: result: x86_64-pc-linux-gnu
configure:2330: checking for gcc
configure:2357: result: gcc -ffile-prefix-map=/tools=/usr
configure:2586: checking for C compiler version
configure:2595: gcc -ffile-prefix-map=/tools=/usr --version >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -ffile-prefix-map=/tools=/usr -v >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -ffile-prefix-map=/tools=/usr -V >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -ffile-prefix-map=/tools=/usr -qversion >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2611: checking for suffix of object files
configure:2633: gcc -ffile-prefix-map=/tools=/usr -c conftest.c >&5
../configure: line 2635: /tools/bin/gcc: No such file or directory
configure:2637: $? = 127
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "glibc"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/"
| #define PACKAGE_URL "https://www.gnu.org/software/glibc/"
| #define PKGVERSION "(GNU libc) "
| #define REPORT_BUGS_TO "<https://www.gnu.org/software/libc/bugs.html>"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2651: error: in `/sources/glibc-2.31/build':
configure:2653: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='gcc -ffile-prefix-map=/tools=/usr'
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_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_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=x86_64-pc-linux-gnu
ac_cv_prog_ac_ct_CC='gcc -ffile-prefix-map=/tools=/usr'
libc_cv_slibdir=/lib
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR=''
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC=''
CC='gcc -ffile-prefix-map=/tools=/usr'
CFLAGS=''
CPP=''
CPPFLAGS=''
CPPUNDEFS=''
CXX=''
CXXFLAGS=''
CXX_BITS_STD_ABS_H=''
CXX_CMATH_HEADER=''
CXX_CSTDLIB_HEADER=''
CXX_SYSINCLUDES=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
GPROF=''
INSTALL_DATA=''
INSTALL_INFO=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LD=''
LDFLAGS=''
LIBGD=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBOBJS=''
MAKE=''
MAKEINFO=''
MSGFMT=''
NM=''
OBJCOPY=''
OBJDUMP=''
OBJEXT=''
PACKAGE_BUGREPORT='https://sourceware.org/bugzilla/'
PACKAGE_NAME='GNU C Library'
PACKAGE_STRING='GNU C Library (see version.h)'
PACKAGE_TARNAME='glibc'
PACKAGE_URL='https://www.gnu.org/software/glibc/'
PACKAGE_VERSION='(see version.h)'
PATH_SEPARATOR=':'
PERL=''
PKGVERSION='(GNU libc) '
PKGVERSION_TEXI='(GNU libc) '
PYTHON=''
PYTHON_PROG=''
READELF=''
RELEASE=''
REPORT_BUGS_TEXI='@uref{https://www.gnu.org/software/libc/bugs.html}'
REPORT_BUGS_TO='<https://www.gnu.org/software/libc/bugs.html>'
SED=''
SHELL='/bin/sh'
SYSINCLUDES=''
VERSION=''
ac_ct_CC='gcc -ffile-prefix-map=/tools=/usr'
ac_ct_CXX=''
all_warnings=''
base_machine=''
bindir='${exec_prefix}/bin'
bindnow=''
build='x86_64-pc-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_crypt=''
build_nscd=''
build_obsolete_nsl=''
build_os='linux-gnu'
build_pt_chown=''
build_vendor='pc'
cross_compiling='no'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
enable_timezone_tools=''
enable_werror='no'
exec_prefix='NONE'
experimental_malloc=''
extra_nonshared_cflags=''
fno_unit_at_a_time=''
force_install=''
hardcoded_path_in_tests=''
have_libaudit=''
have_libcap=''
have_selinux=''
have_tunables=''
host='x86_64-pc-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
ldd_rewrite_script=''
libc_cv_cc_loop_to_function=''
libc_cv_cc_nofma=''
libc_cv_cc_pie_default=''
libc_cv_cc_submachine=''
libc_cv_cc_with_libunwind=''
libc_cv_complocaledir=''
libc_cv_cxx_thread_local=''
libc_cv_fpie=''
libc_cv_gcc_unwind_find_fde=''
libc_cv_has_glob_dat=''
libc_cv_hashstyle=''
libc_cv_insert=''
libc_cv_localstatedir=''
libc_cv_mtls_dialect_gnu2=''
libc_cv_multidir=''
libc_cv_nss_crypt=''
libc_cv_output_format=''
libc_cv_pic_default=''
libc_cv_pie_default=''
libc_cv_protected_data=''
libc_cv_rootsbindir=''
libc_cv_rtlddir=''
libc_cv_slibdir='/lib'
libc_cv_ssp=''
libc_cv_static_nss_crypt=''
libc_cv_sysconfdir=''
libc_cv_textrel_ifunc=''
libc_cv_with_fp=''
libc_cv_z_combreloc=''
libc_cv_z_execstack=''
libc_extra_cflags=''
libc_extra_cppflags=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
link_obsolete_rpc=''
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mach_interface_list=''
mandir='${datarootdir}/man'
multi_arch=''
no_stack_protector=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
profile=''
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
shared=''
sharedstatedir='${prefix}/com'
stack_protector=''
static=''
static_nss=''
subdirs=' '
submachine=''
sysconfdir='${prefix}/etc'
sysheaders=''
sysnames=''
target_alias=''
use_default_link=''
use_ldconfig=''
use_nscd=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_TARNAME "glibc"
#define PACKAGE_VERSION "(see version.h)"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/"
#define PACKAGE_URL "https://www.gnu.org/software/glibc/"
#define PKGVERSION "(GNU libc) "
#define REPORT_BUGS_TO "<https://www.gnu.org/software/libc/bugs.html>"
configure: exit 1
It says gcc was not found in /tools/bin, but it is there, both gcc and cc are:
Code:
(lfs chroot) root:/tools/bin# ls /tools/bin/gcc
/tools/bin/gcc
(lfs chroot) root:/tools/bin# ls /tools/bin/cc
/tools/bin/cc
It says it can't find /tools/bin/gcc which is decidedly weird. This is the 2nd-pass gcc which you have been using up till now to build everything. The only difference is that previously you were accessing /tools through a symlink from the host system, whereas now you are in chroot and should be accessing it directly.
I wonder if the missing file is one of gcc's libraries. There are a couple that you have to make symlinks to in order for gcc to find them when running in chroot. Check in section 6.6 and make sure that the specified links are there.
I've just checked and you do need to create some extra symlinks before building glibc. See chapter 6.9. There are two links and I think they are different from the one you created.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.