Skip site navigation (1)Skip section navigation (2)
Date:      12 Oct 2000 14:46:21 -0700
From:      asami@freebsd.org (Satoshi - Ports Wraith - Asami)
To:        Warner Losh <imp@village.org>
Cc:        ports@freebsd.org
Subject:   Re: LOCALBASE vs PREFIX
Message-ID:  <vqcog0p68cy.fsf@silvia.hip.berkeley.edu>
In-Reply-To: Warner Losh's message of "Thu, 12 Oct 2000 15:28:25 -0600"
References:  <200010122128.PAA72178@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
 * From: Warner Losh <imp@village.org>

 * OK.  I have a question.  I did the following and it failed:
 * 
 * 	setenv PREFIX /fs/gerbils
 * 	sudo mkdir $PREFIX
 * 	cd /usr/ports/x11-toolkits/gtk12
 * 	make all install
 * 
 * <fails to find glib>
 * 
 * It appears that the gtk12 makefile is using LOCALBASE rather than
 * PREFIX to find things.
 * 
 * If I set LOCALBASE and PREFIX in the above sequence, it works.
 * 
 * So, is there a bug here?  Or am I misunderstanding what PREFIX is for?
 * Reading bsd.port.mk, LOCALBASE is in a section that says it should
 * rarely, if ever, be set.  Is this one of those rare times?

PREFIX is in that section too. :)  That section is telling porters
that these variables are not set in most ports' Makefiles.  For
debugging purposes, it's a different story.

As for your original question, PREFIX is "where *this* port installs
things" is it says in bsd.port.mk.  The rest of the world still go to
LOCALBASE, X11BASE etc.  It is known that some stuff will need
everything to be in the same tree, and just setting PREFIX will not
work.

In some cases, you just need to set LOCALBASE or X11BASE as well, and
the compilation will work.  Yet some others require you recompile the
dependencies with LOCALBASE or X11BASE defined to the new value.

I know, this world is not really PREFIX-clean even after all the
tests.  It's a well-known secret that the -p flag of pkg_add is
somewhere between "useless" and "downright dangerous for novices".

But to really fix the problem, we need to force all ports into
separate PREFIXes and require that they work even if they are
installed elsewhere.  This means something like GNU stowage (real
files in separate hierarchy per port, symlink tree from PREFIX) and
much more rigorous testing.

Of course, this layout will have other benefits such as ease of
switching between multiple versions.  Are people willing to go for it?
If so, I can produce some prototype code in a few weeks.

Satoshi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vqcog0p68cy.fsf>