On 09/01/2015 05:48 PM, Bruce Dubbs wrote:
Simon Kitching wrote:
Hi,

A “–prefix=/usr” parameter is passed to most makefiles, but the book
never explains why.

AIUI, the reason is: to override the default prefix of |/usr/local|.
Many packages default to installing in “/usr/local” which is sensible as
they are assuming you are running a typical “packaged” distribution (eg
redhat/debian) and so should not mix locally-compiled binaries with
package-managed binaries. This is not the case for LFS, so overriding
prefix is usually required.

If I am right, then maybe it is worth adding this brief explanation into
the LFS book somewhere?

Users should know this before starting LFS.

Well, all that I can say is that _I_ did not know that :-)

I've been using linux for many years, but always with distros like ubuntu, debian or fedora so I don't build a lot of packages from source (except the kernel). At first I thought that "--prefix" must default to "/", hence the need to specify "/usr" - but that didn't make sense as many packages don't belong in "/bin" or "/lib". So I compiled without specifying "--prefix" and watched what happened. Then it took me a while to realise *why* it was defaulting to "/usr/local" - a directory that I didn't really have much familiarity with, as I don't usually build from source.

Anyway, just wanted to mention it...

Regards, Simon
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to