Couple questions from a newbie

Justin Judd justin at
Mon Jul 24 15:16:52 PDT 2000

On Mon, 24 Jul 2000, Gerard Beekmans wrote:

> > 2. To install static bash, why don't I pass '--prefix=$LFS/usr' to
> > the configure script? Won't this propagate through the Makefiles, so I
> > don't have to pass it to make?
> True, but it's often bad practise doing so. Why? Package can hard-code
> certain directories into the binary. I don't say every package does it,
> but it's safer not to take that risc. If, for some reason, a patch like
> /usr/share/misc/myfile is needed, that path is built into the binary. If
> you pass --prefix=$LFS/usr to configure, the binary will start looking
> for /mnt/lfs/usr/share/misc/myfile and when you are in a chroot
> environment (assuming LFS-BOOK-2.3.6) /mnt/lfs/ doesn't exist so the
> program can't find it's files (this is especially true with Glibc - if
> you pass the wrong prefix to configure, Glibc is going to search for
> it's files and the dynamic load is going to search for it's files in
> /mnt/lfs/lib and /mnt/lfs/usr/lib instead of /lib and /usr/lib after you
> entered chroot or, when you're done installing LFS, rebooted.

Let me see if I understand the build process correctly. When you run
configure, the script checks a bunch of host-specific things (like cpu,
libc version, etc) and uses the information it gains to create
Makefiles. The only thing the configure script does is create Makefiles,

Then you run make, which compiles the source and creates a bunch of
executables, libraries, and possibly other stuff.

Then you run make install, which copies all the files that are required by
the package to the appropriate directories, correct?

Since nothing is compiled until the make stage, it seems that it is
pointless to set the --prefix option in the configure stage if you are
just going to override it in the make stage. Does configure do something
with the option, other than just pass it on to the Makefiles?

> > 4. For binutils, what is the significance of tooldir? I know this creates
> > the directory: $LFS/usr/i686-pc-linux-gnu/ where copies of the executables
> > are put, but why do I need these? Can I delete them?
> If you don't change tooldir, the installation will install files in
> $LFS/usr/<target> (or /usr/<target> when you do a dynamic installation)
> and it will hard link /usr/<target>/bin files into /usr/bin
> By setting tooldir=/usr you don't get that /usr/<target> directory
> anymore. It would only be useful to have a target specific directory if
> you plan on cross compiling (compiling software on say an Intel machine
> and have the compiler, linker, assembler and others, generate files that
> will run on other architectures like Apple PowerPC, Alpha's, etc)

I could have sworn I tried setting tooldir=/usr and I still got that
directory, but I'll try again tonight. If I still end up with it, I'll
just delete it.


Mail archive:
IRC access: server: port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list