LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 05-22-2020, 07:26 PM   #1
soz
LQ Newbie
 
Registered: May 2020
Posts: 2

Rep: Reputation: Disabled
Unhappy LFS Book 9.1 Section 6.9.1 cannot compute suffix of object files


It's my first time building linux from scratch, I'm stuck on section 6.9.1, building Glibc 2.31 inside the chroot, what I'm running:

Code:
$ 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
This inside
Code:
 /sources/glibc-2.31/build
The full output is:

Code:
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
And path is

Code:
 /bin:/usr/bin:/sbin:/usr/sbin:/tools/bin

Thanks in advance for any help.

Last edited by soz; 05-22-2020 at 08:11 PM.
 
Old 05-23-2020, 04:50 AM   #2
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware, OpenBSD
Posts: 4,382
Blog Entries: 11

Rep: Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473
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.

Last edited by hazel; 05-23-2020 at 04:53 AM.
 
Old 05-23-2020, 06:17 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,825

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
check the links made earlier on in the chapter
 
Old 05-26-2020, 12:22 AM   #4
soz
LQ Newbie
 
Registered: May 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hey, I tried redoing all the commands from chapter 6, but everything seemed to be fine, I managed to solve it though by using
Code:
 ln -sv /tools/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
However, now theres a new error while running configure
Code:
(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
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

Config.log contains
Code:
(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:2346: found /tools/bin/gcc
configure:2357: result: gcc
configure:2586: checking for C compiler version
configure:2595: gcc --version >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -v >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -V >&5
../configure: line 2597: /tools/bin/gcc: No such file or directory
configure:2606: $? = 127
configure:2595: gcc -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 -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=
ac_cv_env_CC_value=
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
libc_cv_slibdir=/lib

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

AR=''
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC=''
CC='gcc'
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'
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
 
Old 05-26-2020, 04:13 AM   #5
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware, OpenBSD
Posts: 4,382
Blog Entries: 11

Rep: Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473Reputation: 2473
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.
 
  


Reply

Tags
compile error, compiling, lfs error, lfs glibc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS 7.6 Chp 5.51, GCC: configure: error: cannot compute suffix of object files... thinkrorbot Linux From Scratch 10 03-06-2015 05:44 AM
Cannot compute suffix of object files: cannot compile salathia Linux - Newbie 4 06-22-2013 01:31 AM
checking for suffix of object files... configure: error: cannot compute suffix of obj megras Linux - Kernel 1 10-15-2012 07:21 AM
LFS 7.2 GCC make error: Cannot compute suffix of object files Dylan 2228 Linux From Scratch 1 10-08-2012 02:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration