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.
I've been trying to follow LFS 5.5 to intall GCC but have had no luck.... I'm getting the error message
'checking for suffix of object files... configure: error: cannot compute
suffix of object files: cannot compile'
I'm using
gcc-4.4.2
gmp-4.3.1.tar.gz
mpfr-2.4.1
The step I took was
1. tar xzf gcc-4.4.2.tar.gz
2. cd gcc-4.4.2
3. tar xzf ../gmp-4.3.1.tar.gz
4. tar xzf ../mpfr-2.4.1
5. mv gmp-4.3.1 gmp
6. mv mpfr-2.4.a mpfr
7. mkdir ../gcc-build
8. cd ../gcc-build
9. ../gcc-4.4.2/configure \
--target=$LFS_TGT --prefix=/tools \
--disable-nls --disable-shared --disable-multilib \
--disable-decimal-float --disable-threads \
--disable-libmudflap --disable-libssp \
--disable-libgomp --enable-languages=c
10. make
Then while running make I got the error
'checking for suffix of object files... configure: error: cannot compute
suffix of object files: cannot compile'
I've spent already many hours googling and finding a solution to it, but have it no luck so really hope someone could help out.
Many thanks!
######### MY 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 configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
configure:1563: checking build system type
configure:1581: result: i686-pc-linux-gnu
configure:1616: checking host system type
configure:1630: result: i686-pc-linux-gnu
configure:1638: checking target system type
configure:1652: result: i686-lfs-linux-gnu
configure:1696: checking for a BSD-compatible install
configure:1762: result: /usr/bin/install -c
configure:1773: checking whether ln works
configure:1795: result: yes
configure:1799: checking whether ln -s works
configure:1803: result: yes
configure:3002: checking for gcc
configure:3018: found /usr/bin/gcc
configure:3028: result: gcc
configure:3274: checking for C compiler version
configure:3277: gcc --version </dev/null >&5
gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)
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:3280: $? = 0
configure:3282: gcc -v </dev/null >&5
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
configure:3285: $? = 0
configure:3287: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:3290: $? = 1
configure:3313: checking for C compiler default output file name
configure:3316: gcc conftest.c >&5
configure:3319: $? = 0
configure:3367: result: a.out
configure:3372: checking whether the C compiler works
configure:3378: ./a.out
configure:3381: $? = 0
configure:3400: result: yes
configure:3407: checking whether we are cross compiling
configure:3409: result: no
configure:3412: checking for suffix of executables
configure:3414: gcc -o conftest conftest.c >&5
configure:3417: $? = 0
configure:3444: result:
configure:3450: checking for suffix of object files
configure:3471: gcc -c conftest.c >&5
configure:3474: $? = 0
configure:3498: result: o
configure:3502: checking whether we are using the GNU C compiler
configure:3526: gcc -c conftest.c >&5
configure:3532: $? = 0
configure:3536: test -z
|| test ! -s conftest.err
configure:3539: $? = 0
configure:3542: test -s conftest.o
configure:3545: $? = 0
configure:3558: result: yes
configure:3564: checking whether gcc accepts -g
configure:3585: gcc -c -g conftest.c >&5
configure:3591: $? = 0
configure:3595: test -z
|| test ! -s conftest.err
configure:3598: $? = 0
configure:3601: test -s conftest.o
configure:3604: $? = 0
configure:3615: result: yes
configure:3632: checking for gcc option to accept ANSI C
configure:3702: gcc -c -g -O2 conftest.c >&5
configure:3708: $? = 0
configure:3712: test -z
|| test ! -s conftest.err
configure:3715: $? = 0
configure:3718: test -s conftest.o
configure:3721: $? = 0
configure:3739: result: none needed
configure:3757: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
configure:3763: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:3948: checking for g++
configure:3977: result: no
configure:3948: checking for c++
configure:3977: result: no
configure:3948: checking for gpp
configure:3977: result: no
configure:3948: checking for aCC
configure:3977: result: no
configure:3948: checking for CC
configure:3977: result: no
configure:3948: checking for cxx
configure:3977: result: no
configure:3948: checking for cc++
configure:3977: result: no
configure:3948: checking for cl
configure:3977: result: no
configure:3948: checking for FCC
configure:3977: result: no
configure:3948: checking for KCC
configure:3977: result: no
configure:3948: checking for RCC
configure:3977: result: no
configure:3948: checking for xlC_r
configure:3977: result: no
configure:3948: checking for xlC
configure:3977: result: no
configure:3990: checking for C++ compiler version
configure:3993: g++ --version </dev/null >&5
../gcc-4.4.2/configure: line 3994: g++: command not found
configure:3996: $? = 127
configure:3998: g++ -v </dev/null >&5
../gcc-4.4.2/configure: line 3999: g++: command not found
configure:4001: $? = 127
configure:4003: g++ -V </dev/null >&5
../gcc-4.4.2/configure: line 4004: g++: command not found
configure:4006: $? = 127
configure:4009: checking whether we are using the GNU C++ compiler
configure:4033: g++ -c conftest.cc >&5
../gcc-4.4.2/configure: line 4034: g++: command not found
configure:4039: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
| #ifndef __GNUC__
| choke me
| #endif
|
| ;
| return 0;
| }
configure:4065: result: no
configure:4071: checking whether g++ accepts -g
configure:4092: g++ -c -g conftest.cc >&5
../gcc-4.4.2/configure: line 4093: g++: command not found
configure:4098: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4122: result: no
configure:4164: g++ -c conftest.cc >&5
../gcc-4.4.2/configure: line 4165: g++: command not found
configure:4170: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:4164: g++ -c conftest.cc >&5
../gcc-4.4.2/configure: line 4165: g++: command not found
configure:4170: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
| extern "C" void std::exit (int) throw (); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:4164: g++ -c conftest.cc >&5
../gcc-4.4.2/configure: line 4165: g++: command not found
configure:4170: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
| extern "C" void std::exit (int); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:4164: g++ -c conftest.cc >&5
../gcc-4.4.2/configure: line 4165: g++: command not found
configure:4170: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
| extern "C" void exit (int) throw ();
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:4164: g++ -c conftest.cc >&5
../gcc-4.4.2/configure: line 4165: g++: command not found
configure:4170: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
| extern "C" void exit (int);
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:4164: g++ -c conftest.cc >&5
../gcc-4.4.2/configure: line 4165: g++: command not found
configure:4170: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
| void exit (int);
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:4315: checking for gnatbind
configure:4342: result: no
configure:4395: checking for gnatmake
configure:4422: result: no
configure:4434: checking whether compiler driver understands Ada
configure:4457: result: no
configure:4466: checking how to compare bootstrapped objects
configure:4491: result: cmp --ignore-initial=16 $$f1 $$f2
configure:4890: checking for version 0.10 of PPL
configure:4912: gcc -c -g -O2 -I/include -I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr conftest.c >&5
conftest.c:12:19: error: ppl_c.h: No such file or directory
conftest.c: In function 'main':
conftest.c:18: error: 'choke' undeclared (first use in this function)
conftest.c:18: error: (Each undeclared identifier is reported only once
conftest.c:18: error: for each function it appears in.)
conftest.c:18: error: expected ';' before 'me'
configure:4918: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h. */
| #include "ppl_c.h"
| int
| main ()
| {
|
| #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR != 10
| choke me
| #endif
|
| ;
| return 0;
| }
configure:4939: result: no
configure:5009: checking for correct version of CLooG
configure:5031: gcc -c -g -O2 -I/include -DCLOOG_PPL_BACKEND -I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr conftest.c >&5
conftest.c:12:25: error: cloog/cloog.h: No such file or directory
conftest.c: In function 'main':
conftest.c:18: error: 'choke' undeclared (first use in this function)
conftest.c:18: error: (Each undeclared identifier is reported only once
conftest.c:18: error: for each function it appears in.)
conftest.c:18: error: expected ';' before 'me'
configure:5037: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h. */
| #include "cloog/cloog.h"
| int
| main ()
| {
|
| #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
| choke me
| #endif
|
| ;
| return 0;
| }
configure:5058: result: no
configure:6402: checking for bison
configure:6431: result: no
configure:6402: checking for byacc
configure:6431: result: no
configure:6402: checking for yacc
configure:6431: result: no
configure:6448: checking for bison
configure:6477: result: no
configure:6493: checking for gm4
configure:6522: result: no
configure:6493: checking for gnum4
configure:6522: result: no
configure:6493: checking for m4
configure:6509: found /usr/bin/m4
configure:6519: result: m4
configure:6538: checking for flex
configure:6567: result: no
configure:6538: checking for lex
configure:6567: result: no
configure:6584: checking for flex
configure:6613: result: no
configure:6629: checking for makeinfo
configure:6658: result: no
configure:6688: checking for expect
configure:6717: result: no
configure:6735: checking for runtest
configure:6764: result: no
configure:6874: checking for ar
configure:6890: found /tools/bin/ar
configure:6900: result: ar
configure:7009: checking for as
configure:7025: found /tools/bin/as
configure:7035: result: as
configure:7144: checking for dlltool
configure:7173: result: no
configure:7279: checking for ld
configure:7295: found /tools/bin/ld
configure:7305: result: ld
configure:7414: checking for lipo
configure:7443: result: no
configure:7549: checking for nm
configure:7565: found /tools/bin/nm
configure:7575: result: nm
configure:7684: checking for ranlib
configure:7700: found /tools/bin/ranlib
configure:7710: result: ranlib
configure:7814: checking for strip
configure:7830: found /tools/bin/strip
configure:7840: result: strip
configure:7944: checking for windres
configure:7973: result: no
configure:8079: checking for windmc
configure:8108: result: no
configure:8214: checking for objcopy
configure:8230: found /tools/bin/objcopy
configure:8240: result: objcopy
configure:8349: checking for objdump
configure:8365: found /tools/bin/objdump
configure:8375: result: objdump
configure:8486: checking for i686-lfs-linux-gnu-cc
configure:8515: result: no
configure:8486: checking for i686-lfs-linux-gnu-gcc
configure:8502: found /tools/bin/i686-lfs-linux-gnu-gcc
configure:8512: result: i686-lfs-linux-gnu-gcc
configure:8641: checking for i686-lfs-linux-gnu-c++
configure:8670: result: no
configure:8641: checking for i686-lfs-linux-gnu-g++
configure:8670: result: no
configure:8641: checking for i686-lfs-linux-gnu-cxx
configure:8670: result: no
configure:8641: checking for i686-lfs-linux-gnu-gxx
configure:8670: result: no
configure:8796: checking for i686-lfs-linux-gnu-gcc
configure:8812: found /tools/bin/i686-lfs-linux-gnu-gcc
configure:8822: result: i686-lfs-linux-gnu-gcc
configure:8946: checking for i686-lfs-linux-gnu-gcj
configure:8975: result: no
configure:9101: checking for i686-lfs-linux-gnu-gfortran
configure:9130: result: no
configure:9227: checking for ar
configure:9260: result: no
configure:9335: checking for i686-lfs-linux-gnu-ar
configure:9364: result: no
configure:9450: checking for as
configure:9483: result: no
configure:9558: checking for i686-lfs-linux-gnu-as
configure:9587: result: no
configure:9673: checking for dlltool
configure:9706: result: no
configure:9781: checking for i686-lfs-linux-gnu-dlltool
configure:9810: result: no
configure:9896: checking for ld
configure:9929: result: no
configure:10004: checking for i686-lfs-linux-gnu-ld
configure:10033: result: no
configure:10119: checking for lipo
configure:10152: result: no
configure:10227: checking for i686-lfs-linux-gnu-lipo
configure:10256: result: no
configure:10342: checking for nm
configure:10375: result: no
configure:10450: checking for i686-lfs-linux-gnu-nm
configure:10479: result: no
configure:10565: checking for objdump
configure:10598: result: no
configure:10673: checking for i686-lfs-linux-gnu-objdump
configure:10702: result: no
configure:10788: checking for ranlib
configure:10821: result: no
configure:10896: checking for i686-lfs-linux-gnu-ranlib
configure:10925: result: no
configure:11011: checking for strip
configure:11044: result: no
configure:11119: checking for i686-lfs-linux-gnu-strip
configure:11148: result: no
configure:11234: checking for windres
configure:11267: result: no
configure:11342: checking for i686-lfs-linux-gnu-windres
configure:11371: result: no
configure:11457: checking for windmc
configure:11490: result: no
configure:11565: checking for i686-lfs-linux-gnu-windmc
configure:11594: result: no
configure:11658: checking where to find the target ar
configure:11695: result: pre-installed
configure:11700: checking where to find the target as
configure:11737: result: pre-installed
configure:11742: checking where to find the target cc
configure:11765: result: just compiled
configure:11784: checking where to find the target c++
configure:11824: result: pre-installed
configure:11829: checking where to find the target c++ for libstdc++
configure:11869: result: pre-installed
configure:11874: checking where to find the target dlltool
configure:11911: result: pre-installed
configure:11916: checking where to find the target gcc
configure:11939: result: just compiled
configure:11958: checking where to find the target gcj
configure:11998: result: pre-installed
configure:12003: checking where to find the target gfortran
configure:12043: result: pre-installed
configure:12048: checking where to find the target ld
configure:12085: result: pre-installed
configure:12090: checking where to find the target lipo
configure:12116: result: pre-installed
configure:12121: checking where to find the target nm
configure:12158: result: pre-installed
configure:12163: checking where to find the target objdump
configure:12200: result: pre-installed
configure:12205: checking where to find the target ranlib
configure:12242: result: pre-installed
configure:12247: checking where to find the target strip
configure:12284: result: pre-installed
configure:12289: checking where to find the target windres
configure:12326: result: pre-installed
configure:12331: checking where to find the target windmc
configure:12368: result: pre-installed
configure:12401: checking whether to enable maintainer-specific portions of Makefiles
configure:12410: result: no
configure:12443: checking whether -fkeep-inline-functions is supported
configure:12467: gcc -c -g -O2 -fkeep-inline-functions conftest.c >&5
configure:12473: $? = 0
configure:12477: test -z
|| test ! -s conftest.err
configure:12480: $? = 0
configure:12483: test -s conftest.o
configure:12486: $? = 0
configure:12488: result: yes
configure:12705: creating ./config.status
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,914
Thanked: 268
Welcome to LQ.
Please read 1.5.1 here http://www.linuxfromscratch.org/lfs/...skforhelp.html
The book ( 6.5 ) can be guessed, but all details are important.
The missing information : Please tell which host you are using , etc.
May be the host gcc isn't fit to compile gcc-4.4.2 ? ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.