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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
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
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.