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.
Hi. Thanks for your answer. I don't think there is any problem with gcc itself, since I managed to build all packages in chapter 5 using gcc. It seems like there is broken link or something like that. gcc is there, in /tools/bin/ but it cannot be run.
Code:
root:/sources/linux-3.2.6# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
root:/sources/linux-3.2.6# cd /tools/bin/
root:/tools/bin# ls -al gcc
-rwxr-xr-x 3 root root 1027014 Jun 3 20:53 gcc
root:/tools/bin# gcc
bash: /tools/bin/gcc: No such file or directory
root:/tools/bin#
You should be building gcc-4.7.0
Did you reboot or leave chroot? Did you re enter correctly
Quote:
Note
It is important that all the commands throughout the remainder of this chapter and the following chapters are run from within the chroot environment. If you leave this environment for any reason (rebooting for example), ensure that the virtual kernel filesystems are mounted as explained in Section 6.2.2, “Mounting and Populating /dev” and Section 6.2.3, “Mounting Virtual Kernel File Systems” and enter chroot again before continuing with the installation.
did you use optimization to build?
Quote:
Even if the package does compile when using optimization, there is the risk it may have been compiled incorrectly because of the complex interactions between the code and build tools. Also note that the -march and -mtune options using values not specified in the book have not been tested. This may cause problems with the toolchain packages (Binutils, GCC and Glibc).
Yes, I could do that, but does that mean that the stable version of the book doesn't work?
Quote:
Did you reboot or leave chroot? Did you re enter correctly
Yes, I have tried exiting the chroot environment and then I ran
Code:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
Quote:
did you use optimization to build?
Nope, no optimizations.
Something must have gone wrong after I started chapter 6. As I said the whole chapter 5 went smoothly and I have no reasons to believe that there is anything wrong with the toolchain. Last night I quit after building Xz-utils (chapter 5.33.1) and I had no problems at all. Today continued by changing ownership of /tools by
Code:
chown -R root:root $LFS/tools
and everything went well until I attempted to build linux-3.2.6 package.
Something must of gone wrong somewhere tho, Have you physically check it,s not there.
Sorry for my ignorance, but how do I physically check that it is not there? That is a good question, because I know it must be somewhere. I did all building in chapter 5 using that gcc. So I still believe that it has to do with some pathing or the linking done earlier in chapter 6.
I did 6.2.2-6.2.3 and then chroot. I don't need to remount, since there is an entry for LFS in /etc/fstab. I would not be able to do the command above if the partition was not mounted.
bash version-check.sh
bash, version 4.2.29(2)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils) 2.22.0.20120323
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.17
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (GCC) 4.7.0 20120505 (prerelease)
(GNU libc) 2.15
grep (GNU grep) 2.12
gzip 1.4
Linux version 3.3.7-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.0 20120505 (prerelease) (GCC) ) #1 SMP PREEMPT Tue May 22 00:26:26 CEST 2012
m4 (GNU M4) 1.4.16
GNU Make 3.82
patch 2.6.1
Perl version='5.16.0';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.3
gcc compilation OK
That was the result of the test.
Np, thanks for your help. I am totally confused as well. Can't understand why I get the message "gcc not found". I assume that a fault in gcc would give an error when attempting to run gcc, but what it tells me is that gcc is not there! Even tho ls gcc is showing that the file is there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.