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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
06-04-2012, 04:14 PM
|
#1
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Rep: 
|
make: gcc: Command not found
Hello,
My first question.
I have been installing LFS 7.1 on my system during the last 3 days. I am reading the book to the letter. Everything has gone very fine until today.
At 6.7 this happened:
Code:
root:/sources# cd linux-3.2.6
root:/sources/linux-3.2.6# make mrproper
make: gcc: Command not found
root:/sources/linux-3.2.6#
I have chrooted to as root following the instructions in the book. What have I done wrong?
Thanks in advance!
|
|
|
|
06-04-2012, 04:33 PM
|
#2
|
|
Senior Member
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,557
|
Hi
You do have a problem with gcc as you have posted http://www.linuxquestions.org/questi...5/#post4695491
Do you think this might be causing problems?
|
|
|
|
06-04-2012, 04:46 PM
|
#3
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Original Poster
Rep: 
|
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#
I am totally stuck.
|
|
|
|
06-04-2012, 04:55 PM
|
#4
|
|
Senior Member
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,557
|
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).
|
|
|
|
|
06-04-2012, 05:12 PM
|
#5
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Original Poster
Rep: 
|
Quote:
|
You should be building gcc-4.7.0
|
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.
Last edited by anakletor; 06-04-2012 at 05:24 PM.
|
|
|
|
06-05-2012, 01:37 AM
|
#6
|
|
Senior Member
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,557
|
Hi
The host system requirements for 7.1
Quote:
Gcc-4.1.2 (Versions greater than 4.6.2 are not recommended as they have not been tested)
Glibc-2.5.1 (Versions greater than 2.14.1 are not recommended as they have not been tested)
|
Here
Quote:
Gcc-4.1.2 (Versions greater than 4.7.0 are not recommended as they have not been tested)
Glibc-2.5.1 (Versions greater than 2.15 are not recommended as they have not been tested)
|
Now I dont know how to get round this.
|
|
|
|
06-06-2012, 11:10 AM
|
#7
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Original Poster
Rep: 
|
All commands in /tools/bin are available, except for gcc.
Code:
root:/tools/bin# ./gcc
bash: ./gcc: No such file or directory
I could start all over again from the beginning, but I know there is nothing I can do different. I followed the book to the letter.
|
|
|
|
06-06-2012, 12:07 PM
|
#8
|
|
Senior Member
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,557
|
Hi
Something must of gone wrong somewhere tho, Have you physically check it,s not there.
|
|
|
|
06-06-2012, 03:23 PM
|
#9
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Original Poster
Rep: 
|
Hi,
Quote:
|
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.
|
|
|
|
06-06-2012, 03:38 PM
|
#10
|
|
Senior Member
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,557
|
if you cd into /tools/bin just to check if it,s there if it,s not then gcc went wrong
|
|
|
|
06-06-2012, 03:45 PM
|
#11
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Original Poster
Rep: 
|
Code:
root /tools/bin # ls -al gcc
-rwxr-xr-x 3 root root 1027014 Jun 3 22:53 gcc
|
|
|
|
06-06-2012, 03:55 PM
|
#12
|
|
Senior Member
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,557
|
When you rebooted/restarted did you mount the partition in chapter 2.4 Then do 6.2.2 -6.2.3 before chroot
|
|
|
|
06-06-2012, 04:00 PM
|
#13
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Original Poster
Rep: 
|
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.
|
|
|
|
06-06-2012, 04:04 PM
|
#14
|
|
Senior Member
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,557
|
Did your host pass the requriements test I know it failed on gcc can you just post the output . Others wise I,m at a loss
|
|
|
|
06-06-2012, 04:09 PM
|
#15
|
|
LQ Newbie
Registered: Jun 2012
Posts: 10
Original Poster
Rep: 
|
Code:
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:26 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|