LinuxQuestions.org
Visit Jeremy's Blog.
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 07-25-2011, 10:41 AM   #1
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Rep: Reputation: 20
LFS Chroot Problem: Make


I'm trying to run the command 'make' in the chroot. However, it turned out not to be good.
Code:
bash: /tools/bin/make: No such file or directory
This problem was found when I was about to install the Linux Header in Chroot (chapter 6.7). I also found out that make is just the problem, as I ran 'tar' command and it worked just perfect.

I tried running the 'make' outside the chroot ($LFS/tools/bin/make) and turned out good as usual.
I wonder why, I have done perfectly in chroot-ing.
The sanity test before chroot-ing gives the satisfying result:
Code:
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
So does the $PATH variable when I echo it:
Code:
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
Can someone help me with this? Thanks

Last edited by TKH; 07-25-2011 at 10:42 AM. Reason: Forgot the last part...
 
Old 07-25-2011, 12:52 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

What is the actual command you executed?

- make mrproper (this is correct)
or
- /tools/bin/make mrproper (this is not correct)

Hope this helps.
 
Old 07-25-2011, 12:53 PM   #3
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi I take it you are doing 6.8, sorry to state the obvious did you do section 6.6 ok, And I presume you are doing
http://www.linuxfromscratch.org/lfs/...x-headers.html
 
Old 07-25-2011, 02:37 PM   #4
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by druuna View Post
Hi,

What is the actual command you executed?

- make mrproper (this is correct)
or
- /tools/bin/make mrproper (this is not correct)

Hope this helps.
I'm doing the "make mrproper," of course. The one I mentioned about the '$LFS/tools/bin/make' is just my effort to make sure by typing its directory. I appreciate it, thanks

Last edited by TKH; 07-25-2011 at 02:42 PM.
 
Old 07-25-2011, 02:57 PM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The error message you posted (bash: /tools/bin/make: No such file or directory) shows that bash is specifically looking for /tools/bin/make. Normally if a command cannot be found you get the following message: bash: make: No such file or directory.

I cannot point you to anything specific at this moment, but you need to find out why it is specifically looking for /tools/bin/make.

Hope this helps.
 
Old 07-25-2011, 10:15 PM   #6
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by druuna View Post
The error message you posted (bash: /tools/bin/make: No such file or directory) shows that bash is specifically looking for /tools/bin/make. Normally if a command cannot be found you get the following message: bash: make: No such file or directory.

I cannot point you to anything specific at this moment, but you need to find out why it is specifically looking for /tools/bin/make.
That's a good point, and I do think about it. Anyways, is there a way to check the package we install into the chroot rather than just to run it?
Thanks
 
Old 07-26-2011, 01:10 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
hi,
Quote:
Originally Posted by TKH View Post
Anyways, is there a way to check the package we install into the chroot rather than just to run it?
What exactly are you asking?

The make command you use in chapter 6 (after entering the chrooted environment) is installed during chapter 5 (5.26. Make-3.82), if something went wrong it should have shown up at that point.

If you are not talking about make, but packages in general: Most packages that are build in chapter 6 have a make check (or make test) step.

I don't think make itself is the problem if I look at your first post. Are you sure all the commands in chapter 6 are executed correctly (mainly the chroot command, but also the steps leading up to it).

Also: Check your environment once you enter the chrooted environment (echo $PATH, env, set).

Hope this helps.
 
Old 07-26-2011, 05:37 AM   #8
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by TKH View Post
Anyways, is there a way to check the package we install into the chroot rather than just to run it?
What I mean is that how can we see the list of the temporarilly installed packages (packages in chap. 5.4 - 5.32)?
 
Old 07-26-2011, 07:58 AM   #9
Marlino
LQ Newbie
 
Registered: Jul 2011
Location: Germany
Distribution: W2k, LFS
Posts: 17

Rep: Reputation: 2
Quote:
Originally Posted by TKH View Post
What I mean is that how can we see the list of the temporarilly installed packages (packages in chap. 5.4 - 5.32)?
As there is no "package management"... involved/available,
I suppose, the only way to check this is look what files
are there, like:

$ ls -l /tools/bin

You could use the list of files installed,
in the package descriptions of chapter 6
to compare...
 
Old 07-28-2011, 02:46 AM   #10
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Original Poster
Rep: Reputation: 20
Okay, now I'm done with that problem. It seems that reinstalling the pack is the best solution.
However, I'm now encountering another problem regarding the make.
When I'm trying the make mrproper command and the make headers_check command, it wont work
The output for those are the same, strangely:
Code:
make: /bin/sh: Command not found
make: /bin/sh: Command not found
Makefile:546: /sources/linux-2.6.37/arch//Makefile: No such file or directory
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: /bin/sh: Command not found
make: execvp: /sources/linux-2.6.37/scripts/gcc-goto.sh: Permission denied
make: /bin/sh: Command not found
make: *** No rule to make target `/sources/linux-2.6.37/arch//Makefile'.  Stop.
Anyone got a solution?
 
Old 07-28-2011, 02:52 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Code:
make: /bin/sh: Command not found
That points to a missing link. Did you check to see if /bin/sh is linked to /bin/bash? (you might have forgotten the last step in this chapter: 5.15. Bash-4.2).

I'm ignoring the other errors for now, you first need to solve the one about /bin/sh not being found.

Hope this helps.
 
Old 07-28-2011, 05:07 AM   #12
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Original Poster
Rep: Reputation: 20
yay, it works out well after I link the /bin/sh with bash!
Thank you all!
 
Old 07-28-2011, 06:35 AM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You're welcome
 
  


Reply

Tags
lfs, make


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
cant find the "make" command after chroot to the LFS system fengfeng Linux From Scratch 2 02-10-2008 11:34 PM
LFS chroot problem sagar priyadarshi Linux - Distributions 1 10-28-2007 09:18 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
chroot problem in LFS shahzadiub Linux From Scratch 4 07-21-2004 11:48 AM
chroot in lfs shahzadiub Linux - Newbie 5 06-23-2004 12:08 PM

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

All times are GMT -5. The time now is 05:36 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