LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-27-2008, 05:58 PM   #16
h8ck3rs
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0

Quote:
Originally Posted by lakeat View Post
I suggest to look at LD_LIBRARY_PATH or LD_LIBRARYN32_PATH, and you may fix it!

Daniel
export LD_LIBRARY_PATH=/usr/local/lib worked for me.
Quote:
Originally Posted by gcc43
checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc... /home/user/download/gcc-4.3.0/host-i686-pc-linux-gnu/gcc/xgcc -B/home/user/download/gcc-4.3.0/host-i686-pc-linux-gnu/gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
gmake[2]: *** [configure-stage1-target-libgcc] Error 1
gmake[2]: Leaving directory `/home/user/download/gcc-4.3.0'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/home/user/download/gcc-4.3.0'
gmake: *** [all] Error 2
 
Old 08-22-2008, 11:59 AM   #17
orcaja
Member
 
Registered: Aug 2008
Posts: 94

Rep: Reputation: 1
GCC install error cannot compute suffix of object files

Hi there!
I have this on config.log file

configure:3906: g++ -c conftest.cc >&5
g++: error trying to exec '/usr/libexec/gcc/i486-slackware-linux/4.1.2/cc1plus': execv: Exec format error
configure:3912: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
i am following the instructions on
http://www.nongnu.org/avr-libc/user-...nstall_avr_gcc
Any help will be very appreciated

Thanks
Joc
 
Old 08-22-2008, 12:46 PM   #18
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
@orcaja, I recommend you start your own thread rather than reviving a 3-year old thread (again) that has nothing to do with your problem.
 
0 members found this post helpful.
Old 03-18-2009, 04:22 AM   #19
srsblue
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Cross compile glibc -configure:3342: error: cannot compute suffix of object files: ca

Hi,
I am trying to cross compile GCC tool chain for powerpc. I am getting following error. I checked the config.log, not getting clue for the problem. I have searched previous messages with respect to glib configuration errors, but could not figure out the root cause.

CC=${TARGET}-gcc ../glibc-2.9/configure --enable-add-ons --target=$TARGET --prefix=$PREFIX --with-headers=${TARGET_PREFIX}/include
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
configure: running configure fragment for add-on nptl
checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for gcc... powerpc-linux-gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

Please find below the 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.61. Invocation command line was

$ ../glibc-2.9/configure --enable-add-ons --target=powerpc-linux --prefix=/home/rams/crossgcc --with-headers=/home/rams/crossgcc/powerpc-linux/include

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


uname -m = i686
uname -r = 2.6.23.17-88.fc7PAE
uname -s = Linux
uname -v = #1 SMP Thu May 15 00:22:53 EDT 2008

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

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

PATH: /usr/kerberos/bin
PATH: /usr/lib/ccache
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/NX/bin
PATH: /home/rams/crossgcc/bin


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

configure:2182: checking build system type
configure:2200: result: i686-pc-linux-gnulibc1
configure:2222: checking host system type
configure:2237: result: i686-pc-linux-gnulibc1
configure:2417: running configure fragment for add-on nptl
configure:2554: checking sysdep dirs
configure:2790: result: sysdeps/generic/elf sysdeps/generic
configure:2868: checking for a BSD-compatible install
configure:2924: result: /usr/bin/install -c
configure:2939: checking whether ln -s works
configure:2943: result: yes
configure:2999: checking for gcc
configure:3026: result: powerpc-linux-gcc
configure:3264: checking for C compiler version
configure:3271: powerpc-linux-gcc --version >&5
powerpc-linux-gcc (GCC) 4.3.3
Copyright (C) 2008 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:3274: $? = 0
configure:3281: powerpc-linux-gcc -v >&5
Using built-in specs.
Target: powerpc-linux
Configured with: ../gcc-4.3.3/configure --target=powerpc-linux --prefix=/home/rams/crossgcc --without-headers --with-newlib -v
Thread model: posix
gcc version 4.3.3 (GCC)
configure:3284: $? = 0
configure:3291: powerpc-linux-gcc -V >&5
powerpc-linux-gcc: '-V' option must have argument
configure:3294: $? = 1
configure:3298: checking for suffix of object files
configure:3324: powerpc-linux-gcc -c conftest.c >&5
as: unrecognized option `-mppc'
configure:3327: $? = 1
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:3342: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

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

ac_cv_build=i686-pc-linux-gnulibc1
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=powerpc-linux-gcc
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=set
ac_cv_env_target_alias_value=powerpc-linux
ac_cv_host=i686-pc-linux-gnulibc1
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_ac_ct_CC=powerpc-linux-gcc

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

AR=''
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC=''
CC='powerpc-linux-gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
CXX_SYSINCLUDES=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
GREP=''
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='powerpc-linux-gcc'
ac_ct_CXX=''
add_on_subdirs=''
add_ons='nptl'
all_warnings=''
base_machine='i386'
bindir='${exec_prefix}/bin'
bindnow='no'
bounded='no'
build='i686-pc-linux-gnulibc1'
build_alias=''
build_cpu='i686'
build_os='linux-gnulibc1'
build_vendor='pc'
cross_compiling='no'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
elf='yes'
enable_check_abi='no'
exceptions=''
exec_prefix='NONE'
fno_unit_at_a_time=''
force_install='yes'
have_libaudit=''
have_libcap=''
have_selinux=''
host='i686-pc-linux-gnulibc1'
host_alias=''
host_cpu='i686'
host_os='linux-gnulibc1'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
ldd_rewrite_script=''
libc_cv_Bgroup=''
libc_cv_as_needed=''
libc_cv_cc_submachine=''
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_gnu89_inline=''
libc_cv_hashstyle=''
libc_cv_have_bash2=''
libc_cv_have_initfini=''
libc_cv_have_ksh=''
libc_cv_libgcc_s_suffix=''
libc_cv_localedir=''
libc_cv_rootsbindir=''
libc_cv_slibdir=''
libc_cv_ssp=''
libc_cv_sysconfdir=''
libc_cv_z_combreloc=''
libc_cv_z_execstack=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mach_interface_list=''
mandir='${datarootdir}/man'
no_whole_archive=''
nopic_initfini=''
old_glibc_headers=''
oldest_abi='default'
oldincludedir='/usr/include'
omitfp='no'
pdfdir='${docdir}'
pic_default=''
prefix='/home/rams/crossgcc'
profile='no'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
shared='default'
sharedstatedir='${prefix}/com'
sizeof_long_double=''
static='yes'
static_nss='no'
subdirs=' '
submachine=''
sysconfdir='${prefix}/etc'
sysdeps_add_ons=' nptl'
sysnames=' sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 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='powerpc-linux'
uname_release=''
uname_sysname=''
uname_version=''
use_ldconfig=''
with_cvs='yes'
with_fp='yes'
xcoff='no'

## ----------- ##
## 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

configure: exit 1

Thanks in advance

Regards
Rams
 
Old 04-04-2009, 12:50 AM   #20
prashantsangal
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
Lightbulb configure: error: cannot compute suffix of object files: cannot compile

Hello Friends,

I am new here and this is my first mail. If i am breaking any rules, kindly forgive me.

I am trying to build "buildroot" package on my PC for ARM Based board. It first tries to build cross-compiler toolchain for ARM. while configuring gcc, it gives following error:
checking for suffix of object files... configure: error: cannot compute

suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1


when i see config.log file, i found following:

configure:3325: checking for suffix of object files
configure:3346: /usr/bin/gcc -c conftest.c >&5
configure:3349: $? = 0
configure:3371: result: o


which, i think, suggests that it is computing what should be the suffix of the object files.

I went through your conversation, and i tried

]#gcc -v

and the output was

Using built-in specs.
Target: i586-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.2.1 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.2 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=i586-suse-linux
Thread model: posix
gcc version 4.2.1 (SUSE Linux)


and gcc is at /usr/bin,
i created the link in /bin too by using

]#ln -s /usr/bin/gcc /bin/gcc

as yoyo suggested in previous postings.

also i tried
]#export LD_LIBRARY_PATH=/usr/local/lib

but no gain.
does anyone has any clue about this problem's solution?

help is always appriciated friends.

regards,
Prashant Sangal
 
Old 05-08-2009, 10:45 PM   #21
m++
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Could this be caused by forgetting to remove the files in the build-gcc directory after pass 1?
I believe pass 2 requires a configure and make in an empty directory.
 
Old 09-22-2009, 07:32 PM   #22
metal.han
LQ Newbie
 
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
why couldn't a root excute the gcc?

Quote:
Originally Posted by Yoyo302 View Post
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#
I enccounter the exact problem like #5. who can tell me why ?
A host root can run gcc while a "new root" can not do it.
 
Old 03-13-2010, 12:27 AM   #23
yogesh605
LQ Newbie
 
Registered: Mar 2010
Distribution: mandriva 2010
Posts: 29

Rep: Reputation: 15
Smile

Quote:
Originally Posted by freegianghu View Post
Try post output of:
Code:
$ gcc -v
hi, i have also same problem i am posting gcc -v output.

"Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /mnt/lfs/gcc-build/gcc-4.4.3/configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib --with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap : (reconfigured) /mnt/lfs/gcc-build/gcc-4.4.3/configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib --with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
Thread model: posix
gcc version 4.4.3 (GCC)"

my problem is: "checking for suffix of object files... configure: error: in `/mnt/lfs/gcc-build1/i686-pc-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/gcc-build1'
make: *** [all] Error 2"

i am building gcc pass 2 from LFS 6.6 ebook. please tell me how to solve this error?
 
Old 05-21-2010, 08:28 AM   #24
sharrajesh
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
sharrajesh

Quote:
Originally Posted by lakeat View Post
I suggest to look at LD_LIBRARY_PATH or LD_LIBRARYN32_PATH, and you may fix it!

Daniel
Since the new glibc has dependency on mpc, gmp and mpfr hence you have to show that in your LD_LIBRARY_PATH. By making these changes I was able to move ahead.

LD_LIBRARY_PATH=$PREFIX/mpc/lib:$PREFIX/mpfr/lib:$PREFIX/gmp/lib:$LD_LIBRARY_PATH

--sharrajesh
 
  


Reply

Tags
glibc, lfs



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
Error creating library file from object files using xlc montylee AIX 3 03-04-2024 11:21 AM
Why cannot compute suffix of object files? bhxs1809 Linux From Scratch 11 03-05-2012 12:04 PM
Configure: error: cannot compute sizeof (long double) in glibc pass 2 irfanali Linux From Scratch 29 02-03-2010 06:48 AM
Help! 2.4.29 + nptl = glibc error: cannot compute (long double), 77 Yerp Linux From Scratch 3 03-25-2005 06:28 PM
error when installing gift: error: cannot compute sizeof (short), 77 v1pEr Linux - Software 5 11-04-2004 02:43 AM

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

All times are GMT -5. The time now is 05:18 PM.

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
Open Source Consulting | Domain Registration