[lfs-support] Greetings and first two questions
qrux.qed at gmail.com
Mon Jan 30 17:50:04 PST 2012
On Jan 30, 2012, at 4:31 PM, rafe_b wrote:
> Hello All -- just starting with LFS and learning a lot so far.
Howdy. GL to you!
> 1. many commands have file arguments with relative
> paths, eg. the very first two commands in Sec. 5.5.1:
> tar -jxf ../mpfr-3.1.0.tar.bz2
> mv -v mpfr-3.1.0 mpfr
> There's a Note in Sec. 5.3 that says I should be in the
> 'sources' directory but then the above commands
> wouldn't be right. So where should I be when I execute
> these commands?
Read just a bit further...
Section 5.3 - General Compilation Instructions:
To re-emphasize the build process:
• Place all the sources and patches in a directory that will be accessible from the chroot environment such as /mnt/lfs/sources/. Do not put sources in /mnt/lfs/tools/.
• Change to the sources directory.
• For each package:
• Using the tar program, extract the package to be built. In Chapter 5, ensure you are the lfs user when extracting the package.
• Change to the directory created when the package was extracted.
• Follow the book's instructions for building the package.
The key is this bit: "Change to the directory created when the package was extracted." That should resolve the misunderstanding. You do not REMAIN in the "sources directory". You descend into the directory which is created as a result of "extracting the package."
Much of the open-source software extracts into it's own directory (as opposed to, say, littering your current directory with a metric crapton of files). After you execute your 'tar -xf', you can be reasonably sure that the "tarball" you just extracted will be extracted into a directory, which you'll promptly descend into before following the specific directions per package.
> 2. The issue in the previous item isn't insurmountable
> in most cases, but it gets critical for the first 'patch'
> command of Sec. 5.5.1, to wit:
> patch -Np1 -i ../gcc-4.6.1-cross_compile-1.patch
There's nothing special about patch that would trip you up. The information above should solve all these relative path issues.
More information about the lfs-support