LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS Chroot Problem: Make (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-chroot-problem-make-893654/)

TKH 07-25-2011 10:41 AM

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

druuna 07-25-2011 12:52 PM

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.

spiky0011 07-25-2011 12:53 PM

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

TKH 07-25-2011 02:37 PM

Quote:

Originally Posted by druuna (Post 4424775)
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 :D

druuna 07-25-2011 02:57 PM

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.

TKH 07-25-2011 10:15 PM

Quote:

Originally Posted by druuna (Post 4424860)
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

druuna 07-26-2011 01:10 AM

hi,
Quote:

Originally Posted by TKH (Post 4425113)
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.

TKH 07-26-2011 05:37 AM

Quote:

Originally Posted by TKH (Post 4425113)
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)?

Marlino 07-26-2011 07:58 AM

Quote:

Originally Posted by TKH (Post 4425396)
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...

TKH 07-28-2011 02:46 AM

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?

druuna 07-28-2011 02:52 AM

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.

TKH 07-28-2011 05:07 AM

yay, it works out well after I link the /bin/sh with bash!
Thank you all! :D

druuna 07-28-2011 06:35 AM

You're welcome :)


All times are GMT -5. The time now is 09:14 PM.