To add to this, my understanding of why you need the symlink at all has to do with overcoming some hard assumptions in the build systems of certain packages. A lot of system programs wind up hardcoding paths into their executables and scripts so that they are using their expected versions and can't be circumvented by trivial things like PATH variables. It is kind of important that the initial build can actually use the path the runtime will end up seeing, especially since LFS starts using the tools as they are incorperated during the toolchain build itself.
The location of /tools is arbitrary in the context of how it works. It's just nice to type and is appropriately named. Jonathan On Tue, May 19, 2020 at 4:03 PM Bruce Dubbs via lfs-dev < [email protected]> wrote: > On 5/19/20 2:25 PM, Akira Urushibata via lfs-dev wrote: > > Is there any problem with making a new directory at the filesystem > > base level? > > > > In theory there could be a distribution which already has a /tool > > directory. But I have never heard of that. > > > > What alternatives are there to /tool ? If /tool is so abhored, why > > not try /usr/local instead ? What happens when you do that? > > The /usr/local directory must be empty for this to work and you > > shouldn't do anything other than build LFS on this system. But if > > you dislike /tool , it should be worth a try. > > We use /tools -> /mnt/lfs/tools as a location for creating the temporary > tools used to build the system in Chapter 6. In that way files like > /tools/bin/make can be found via the identical path from the host and > from within chroot. When rebooting the completed system, the host's > /mnt/lfs/tools becomes a directory, /tools, not a symlink, but is not used. > > The FHS says that "*distributions* should not create new directories in > the root hierarchy without extremely careful consideration of the > consequences including for application portability." > > LFS is not designed to be a distribution although many treat it that > way. Your distro, your rules. > > Additionally, there is nothing preventing an LFS user from deleting or > moving /tools from the host any time after Chapter 6. /tools and > /mnt/lfs/tools are really only temporary constructs. > > I'll note that I have several non-FHS anointed entries in /: /build, > /jhalfs, lost+found, and /sources. Actually lost+found is almost always > found for all distributions but is not mentioned in the FHS. > > -- Bruce > -- > http://lists.linuxfromscratch.org/listinfo/lfs-dev > FAQ: http://www.linuxfromscratch.org/faq/ > Unsubscribe: See the above information page
-- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
