LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-28-2015, 02:25 AM   #1
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Rep: Reputation: Disabled
LFS 7.6 Chp 5.51, GCC: configure: error: cannot compute suffix of object files...


Hello, on Linux Mint 17.1 cinnamon, I am unable to configure GCC 4.9.1.

Here is the output of version-check.sh:

Code:
bash, version 4.3.11(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.24
bison (GNU Bison) 3.0.2
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.21
diff (GNU diffutils) 3.3
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
(Ubuntu EGLIBC 2.19-0ubuntu6.5) 2.19
grep (GNU grep) 2.16
gzip 1.6
Linux version 3.13.0-37-generic (buildd@kapok) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014
m4 (GNU M4) 1.4.17
GNU Make 3.81
GNU patch 2.7.1
Perl version='5.18.2';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.27.1
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
Installation of Binutils went without error and configuration of GCC was followed as in the book.
The only previous error so far the error message: dircolors: "no SHELL environment variable, and no shell type option given" after running source ~/.bash_profile. It returnd 0 after running echo $?.

The output of make was:
Code:
Checking multilib configuration for libgcc...
Configuring in x86_64-lfs-linux-gnu/libgcc
configure: loading cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-lfs-linux-gnu
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking for x86_64-lfs-linux-gnu-ar... x86_64-lfs-linux-gnu-ar
checking for x86_64-lfs-linux-gnu-lipo... x86_64-lfs-linux-gnu-lipo
checking for x86_64-lfs-linux-gnu-nm... /mnt/lfs/sources/gcc-build/./gcc/nm
checking for x86_64-lfs-linux-gnu-ranlib... x86_64-lfs-linux-gnu-ranlib
checking for x86_64-lfs-linux-gnu-strip... x86_64-lfs-linux-gnu-strip
checking whether ln -s works... yes
checking for x86_64-lfs-linux-gnu-gcc... /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/bin/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/lib/ -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/include -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/sys-include   
checking for suffix of object files... configure: error: in `/mnt/lfs/sources/gcc-build/x86_64-lfs-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/sources/gcc-build'
make: *** [all] Error 2
The output of config.log in /mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc was :
Code:
configure:3389: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/bin/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/lib/ -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/include -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/sys-include    -o conftest -g -O2   conftest.c  >&5
/mnt/lfs/sources/gcc-build/./gcc/as: 106: exec: --64: not found
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/bin/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/lib/ -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/include -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/sys-include    -c -g -O2  conftest.c >&5
/mnt/lfs/sources/gcc-build/./gcc/as: 106: exec: --64: not found
configure:3606: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3620: error: in `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc':
configure:3623: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Does anyone have any solutions?
Thanks.
 
Old 02-28-2015, 04:45 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Wrong is : » /bin/sh -> /bin/dash «

Please delete the symlink /bin/sh, and make a new one pointing to bash.
 
Old 02-28-2015, 02:06 PM   #3
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
Yesterday, I disconnected the symlink and forgot to make a new one and today, the system has failed to boot and I had to force shutdown yesterday due to the system being unable to shutdown. It this the cause or is there something else?
 
Old 02-28-2015, 05:28 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
If /bin/sh doesn't point to a valid shell you are going to have allsorts of weird problems inckuding not being able to boot, bkoot to a 'live' cd and fix asap
 
Old 02-28-2015, 06:09 PM   #5
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thanks for the reply, how do I create a symbolic link to the main system from a live USB?

Last edited by thinkrorbot; 02-28-2015 at 06:10 PM.
 
Old 03-01-2015, 02:02 AM   #6
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
I am able to boot back into the main system now.
 
Old 03-02-2015, 12:01 AM   #7
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

Wrong is : » /bin/sh -> /bin/dash «

Please delete the symlink /bin/sh, and make a new one pointing to bash.
I remade a symlink for bash and now the config.log outputs:
Code:
configure:3602: /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/bin/ -B/tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/lib/ -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/include -isystem /tools--with-sysroot=/mnt/lfs/x86_64-lfs-linux-gnu/sys-include    -c -g -O2  conftest.c >&5
/mnt/lfs/sources/gcc-build/./gcc/as: line 106: exec: --: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
configure:3606: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3620: error: in `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc':
configure:3623: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Version.sh returns:
Code:
bash, version 4.3.11(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.24
bison (GNU Bison) 3.0.2
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.21
diff (GNU diffutils) 3.3
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
(Ubuntu EGLIBC 2.19-0ubuntu6.5) 2.19
grep (GNU grep) 2.16
gzip 1.6
Linux version 3.13.0-37-generic (buildd@kapok) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014
m4 (GNU M4) 1.4.17
GNU Make 3.81
GNU patch 2.7.1
Perl version='5.18.2';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.27.1
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
 
Old 03-02-2015, 06:36 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
When the wrong shell has been used, you will have to start from scratch.
... With `binutils´ pass 1.

→ 5.4. Binutils-2.24 - Pass 1
http://www.linuxfromscratch.org/lfs/...ils-pass1.html
 
Old 03-03-2015, 12:45 AM   #9
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
When the wrong shell has been used, you will have to start from scratch.
... With `binutils´ pass 1.

→ 5.4. Binutils-2.24 - Pass 1
http://www.linuxfromscratch.org/lfs/...ils-pass1.html
Thanks for the reply, I don't know what did it; deleting the binutils-build directory and the source directory,reinstalling binutils (failed with same message when trying to build gcc using previous gcc build folder but I was tinkering with cpufreq-utils so that might have affected it) or making a new build directory but it worked with out errors.

Last edited by thinkrorbot; 03-03-2015 at 01:36 AM.
 
Old 03-03-2015, 01:38 AM   #10
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
When the wrong shell has been used, you will have to start from scratch.
... With `binutils´ pass 1.

→ 5.4. Binutils-2.24 - Pass 1
http://www.linuxfromscratch.org/lfs/...ils-pass1.html
On the sanity check in Chapter 5.7, $LFS_TGT-gcc -v dummy.c outputs:
x86_64-lfs-linux-gnu-gcc: command not found
Is there a fix or should I start again?
x86_64-lfs-linux-gnu-gcc is in /mnt/lfs/tools/bin.
Also will chroot make the installation and compilation less error prone?

Last edited by thinkrorbot; 03-03-2015 at 01:46 AM.
 
Old 03-06-2015, 05:44 AM   #11
bstaletic
Member
 
Registered: Apr 2014
Distribution: Arch
Posts: 39

Rep: Reputation: Disabled
Your tool chain is broken. Whether you fix it or start from the begining it doesn't matter, as it wil take almost the same time. Without much thinking I'd start anew.

Chroot won't magically make the process less error prone. I personally find it convinient.
 
  


Reply



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 with gcc first pass - cannot compute suffix of object files: cannot compile jddantes Linux From Scratch 16 10-05-2013 05:04 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
GCC error cannot compute suffix of object files orcaja Linux - Software 1 08-25-2008 12:55 PM
configure error : cannot compute suffix of object files status1 Linux From Scratch 1 10-14-2006 10:18 AM

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

All times are GMT -5. The time now is 12:25 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
Open Source Consulting | Domain Registration