LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Error while 'chrooting' into build environment (https://www.linuxquestions.org/questions/linux-from-scratch-13/error-while-chrooting-into-build-environment-891412/)

druuna 07-22-2011 03:24 AM

Hi,
Quote:

Originally Posted by sudeepkulkarni (Post 4421978)
Here is what I do while installing any package:

1. Unpack the package archive in the host OS itself.
2. Change its permissions
3. cp -rv /path/to/<pkg-name> $LFS/tools
4. mkdir -v $LFS/tools/<pkg-build>
5. cd <pkg-build>
6. $LFS/tools/<pkg-name>/configure...........
7. make
8. make install

IS there something wrong with this scheme? Do I have to create the sources directory?

That is not correct and definitely not what is in the book (3.1 and 5.3 are there for a reason).

You need to follow the book to the letter, especially when you are new at this! Not doing so will get you into trouble and will also make it harder, if not impossible, for us to help you.

chog 04-25-2012 05:35 AM

Just posting this in case someone with the same issue finds this thread.
I'll skip the why's and just go to the facts.
I started an lfs with two partitions sdb1 100M, sdb2 10G. I mounted sdb1 as /mnt/lfs and sdb2 as /mnt/lfs/usr.
Because sdb1 was only 100M, I put tools in /mnt/lfs/usr/tools and adjusted the original symlink from
ln -sv $LFS/tools / to

ln -sv $LFS/usr/tools /

so the building of the tools worked fine. The problem is, and I only realised this after restarting, when I used the chroot line in LFS 6.4

chroot "$LFS" /tools/bin/env -i.

this then looks for /tools/bin/env at the new root, ie /mnt/lfs/tools/bin/env, which didn't exist because it was at /mnt/lfs/usr/tools/bin/env. I could have just added a new symlink, eg ln -sv $LFS/usr/tools $LFS/ but too late now.

Anyway, hope this helps because although RTFM should be every LFS attemptees mantra, it doesn't always help.

chog

stoat 04-25-2012 07:44 AM

Quote:

Originally Posted by chog

Anyway, hope this helps because although RTFM should be every LFS attemptees mantra, it doesn't always help.

Hello chog,

I guess your comments may help someone. But you probably will agree that the book doesn't say to put the tools directory where you did. RTFM usually never helps much when we choose to deviate from the manual.


All times are GMT -5. The time now is 04:11 AM.