LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   glibc in capter 6 -- error: cannot compute suffix of object files (https://www.linuxquestions.org/questions/linux-from-scratch-13/glibc-in-capter-6-error-cannot-compute-suffix-of-object-files-339554/)

Yoyo302 07-03-2005 05:51 AM

glibc in capter 6 -- error: cannot compute suffix of object files
 
hi, i am trying to build glibc in 6 capter of lfs handbook, while i'm starting "configure" i get sth like that:
root:/sources/glibc-3# ../glibc-2.3.5/configure
checking build system type... i686-pc-linux-gnu
(...)
checking for gcc... gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
root:/sources/glibc-3#

i tried to rebuild "gcc pass2" but after it problem is same,
please help me.

freegianghu 07-03-2005 07:43 AM

Re: glibc in capter 6 -- error: cannot compute suffix of object files
 
Quote:

Originally posted by Yoyo302
hi, i am trying to build glibc in 6 capter of lfs handbook, while i'm starting "configure" i get sth like that:
root:/sources/glibc-3# ../glibc-2.3.5/configure
checking build system type... i686-pc-linux-gnu
(...)
checking for gcc... gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
root:/sources/glibc-3#

i tried to rebuild "gcc pass2" but after it problem is same,
please help me.


Yoyo302 07-03-2005 08:01 AM

i looked into this file and i think that's important:
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| #define USE_REGPARMS 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2689: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

buy i still don't know where problem is

freegianghu 07-03-2005 10:51 AM

Quote:

Originally posted by Yoyo302
i looked into this file and i think that's important:
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| #define USE_REGPARMS 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2689: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

buy i still don't know where problem is

Try post output of:
Code:

$ gcc -v

Yoyo302 07-03-2005 11:58 AM

amm...

root:/sources/glibc-3# gcc -v
bash: /bin/gcc: No such file or directory
root:/sources/glibc-3#

but:

root:/tools/bin# ./gcc -v
Reading specs from /tools/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Configured with: ../gcc-3.4.4/configure --prefix=/tools --libexecdir=/tools/lib --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch
Thread model: posix
gcc version 3.4.4
root:/tools/bin#

freegianghu 07-03-2005 12:06 PM

Code:

# export PATH=$PATH:/tools/bin

Yoyo302 07-03-2005 12:57 PM

ok, thx for advices, but i've found solution.
just:
ln -s /tools/bin/gcc /bin/gcc and i think i'll work, i tried "configure" again and the problem disapierd.
once again thanks

Super7 03-13-2006 02:55 PM

Help please
 
I got the same issues as yoyo the same error message. I am running LFS 6.1.1. but this is my question. Should I be running ./config and chroot or as root on the lfs LiveCD? I can get it to work running from LFS Live CD root but not from chroot.

I changed the command from book to suit the situation.

glibc-2.3.4/configure --prefix=/mnt/lfs/usr \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --libexecdir=/mnt/lfs/usr/lib/glibc

I have a funny feeling it should all be done under chroot. let me know please!

Super7 03-13-2006 04:30 PM

I posted the last message my other box. I just brought up eth0 on my LFS livecd box. I know error messages help so here it goes.

$ glibc-2.3.4/configure --prefix=/usr --disable-profile --enable-add-ons --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc

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

hostname = lfslivecd
uname -m = i686
uname -r = 2.6.11.12
uname -s = Linux
uname -v = #1 SMP Sat Dec 17 04:12:33 GMT 2005

/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: /tools/bin


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

configure:1706: checking build system type
configure:1724: result: i686-pc-linux-gnu
configure:1732: checking host system type
configure:1746: result: i686-pc-linux-gnu
configure:1878: result: running configure fragment for add-on linuxthreads
configure:9: result: linuxthreads disabled because nptl add-on is also in use
configure:1878: result: running configure fragment for add-on nptl
configure:1998: checking sysdep dirs
configure:2214: result: sysdeps/generic/elf sysdeps/generic
configure:2233: checking for a BSD-compatible install
configure:2288: result: /tools/bin/install -c
configure:2303: checking whether ln -s works
configure:2307: result: yes
configure:2361: checking for gcc
configure:2377: found /tools/bin/gcc
configure:2387: result: gcc
configure:2631: checking for C compiler version
configure:2634: gcc --version </dev/null >&5
glibc-2.3.4/configure: line 2635: /tools/bin/gcc: No such file or directory
configure:2637: $? = 127
configure:2639: gcc -v </dev/null >&5
glibc-2.3.4/configure: line 2640: /tools/bin/gcc: No such file or directory
configure:2642: $? = 127
configure:2644: gcc -V </dev/null >&5
glibc-2.3.4/configure: line 2645: /tools/bin/gcc: No such file or directory
configure:2647: $? = 127
configure:2651: checking for suffix of object files
configure:2672: gcc -c conftest.c >&5
glibc-2.3.4/configure: line 2673: /tools/bin/gcc: No such file or directory
configure:2675: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| #define USE_REGPARMS 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2689: 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=
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_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=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_path_install='/tools/bin/install -c'
ac_cv_prog_ac_ct_CC=gcc

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

AR=''
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH='/bin/sh'
BISON=''
BUILD_CC=''
CC='gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_INFO=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
KSH=''
LD=''
LDFLAGS=''
LIBGD=''
LIBOBJS=''
LIBS=''
LN_S='ln -s'
LTLIBOBJS=''
MAKE=''
MAKEINFO=''
MIG=''
MSGFMT=''
OBJDUMP=''
OBJEXT=''
PACKAGE_BUGREPORT='glibc'
PACKAGE_NAME='GNU C Library'
PACKAGE_STRING='GNU C Library (see version.h)'
PACKAGE_TARNAME='c-library'
PACKAGE_VERSION='(see version.h)'
PATH_SEPARATOR=':'
PERL=''
PWD_P=''
RANLIB=''
RELEASE=''
SED=''
SHELL='/bin/sh'
SYSINCLUDES=''
VERSION=''
VERSIONING=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_RANLIB=''
add_ons='nptl'
all_warnings=''
base_machine='i386'
bindir='${exec_prefix}/bin'
bindnow='no'
bounded='no'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
cross_compiling='no'
datadir='${prefix}/share'
elf='yes'
enable_check_abi='no'
exceptions=''
exec_prefix='NONE'
fno_unit_at_a_time=''
force_install='yes'
gnu_as='yes'
gnu_ld='yes'
have_selinux=''
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
includedir='${prefix}/include'
infodir='${prefix}/info'
ldd_rewrite_script=''
libc_cv_Bgroup=''
libc_cv_as_needed=''
libc_cv_asm_protected_directive=''
libc_cv_cc_with_libunwind=''
libc_cv_cpp_asm_debuginfo=''
libc_cv_forced_unwind=''
libc_cv_fpie=''
libc_cv_gcc_static_libgcc=''
libc_cv_gcc_unwind_find_fde=''
libc_cv_have_bash2=''
libc_cv_have_initfini=''
libc_cv_have_ksh=''
libc_cv_initfinit_array=''
libc_cv_libgcc_s_suffix=''
libc_cv_localedir=''
libc_cv_rootsbindir=''
libc_cv_slibdir=''
libc_cv_sysconfdir=''
libc_cv_z_combreloc=''
libc_cv_z_execstack=''
libc_cv_z_initfirst=''
libc_cv_z_nodelete=''
libc_cv_z_nodlopen=''
libc_cv_z_relro=''
libdir='${exec_prefix}/lib'
libexecdir='/usr/lib/glibc'
linux_doors=''
localstatedir='${prefix}/var'
mach_interface_list=''
mandir='${prefix}/man'
no_whole_archive=''
nopic_initfini=''
old_glibc_headers=''
oldest_abi='default'
oldincludedir='/usr/include'
omitfp='no'
pic_default=''
prefix='/usr'
profile='no'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
shared='default'
sharedstatedir='${prefix}/com'
sizeof_long_double=''
static='yes'
static_nss='no'
subdirs=' '
sysconfdir='${prefix}/etc'
sysnames=' sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread nptl/sysdeps/unix/sysv nptl/sysdeps/unix nptl/sysdeps/i386/i686 nptl/sysdeps/i386 sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic'
target_alias=''
uname_release=''
uname_sysname=''
uname_version=''
use_ldconfig=''
with_cvs='yes'
with_fp='yes'
xcoff='no'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_BUGREPORT "glibc"
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_TARNAME "c-library"
#define PACKAGE_VERSION "(see version.h)"
#define USE_REGPARMS 1

configure: exit 1

from Live CD root:

lfslivecd:root | Mon Mar 13 17:31:36 2006 | /mnt/lfs/tools/bin
# ./gcc -v
Reading specs from /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/tools --libexecdir=/tools/lib --with-local-prefix=/tools --disable-nls --enable-shared --enable-languages=c : (reconfigured) ./configure --prefix=/tools --libexecdir=/tools/lib --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch
Thread model: posix
gcc version 3.4.3


from chroot:

root:/tools/bin# gcc -v
bash: /tools/bin/gcc: No such file or directory


something has gone haywire on me

Yoyo302 03-14-2006 03:56 PM

Quote:

I have a funny feeling it should all be done under chroot. let me know please!
yes, if we're speaking about chapter 6...

you know, as i wrote before, i made a link, and then it was working, but not forever, i don't remember perfectly, but i think that i had some problems later when i tried to build sth like rpm. that while compiling i got error about some libs, which were not reachable, because they were laying in "tools" dir. i haven't found any solution to that problem then...

chuckler 04-01-2006 10:36 AM

glibc error LFS 6.1.1 Chapter 6.11
 
I have this exact same problem..... anyone have any solution for this?
my config.log has the exact same output as the one posted above...
any idea what could be the problem?

somone solved this problem by linking.. is it a safe method? or will it break anything later even if it works now?

Yoyo302 04-02-2006 05:56 AM

you know, after making link to that file there wasn't any problem during building lfs system, or something after.
I just do not remember what got wrong then, because i have deleted all from lfs i made, and now i am using gentoo :P
never mind that, you have 2 solutions, 1st is to make sth with that, making some maybe not safe link, and 2nd is to make everything from begining,
it's your choise what you will do.

chuckler 04-02-2006 07:08 AM

glibc error LFS 6.1.1 Chapter 6.11
 
I just redid gcc-pass2 and everything seemed alright...
glibc configured and compiled properly.. even the test failed only in two places.. (something tst-clock2.out or something )which i continued with anyway.. did not have any issues so far... hope nothing is broken :D

butchcassidy1717 05-29-2007 02:16 PM

Quote:

Originally Posted by Yoyo302
you have 2 solutions, 1st is to make sth with that, making some maybe not safe link, and 2nd is to make everything from begining,
it's your choise what you will do.

This is my third time trying to build glibc-2.3.6 in LFS V6.2 Chapter 6.9 amd I cannot resolve this error "cannot compute suffix of object files: cannot compile .."
I looked at the config.log which tells me the /bin/gcc is not a file or directory.
What am I missing here? Any help would very appreciated..

lakeat 04-13-2008 10:15 AM

I suggest to look at LD_LIBRARY_PATH or LD_LIBRARYN32_PATH, and you may fix it! :)

Daniel


All times are GMT -5. The time now is 07:34 PM.