PREFIX is not honored for dependencies

Matthew Seaman m.seaman at
Sat Aug 6 09:18:19 UTC 2011

On 05/08/2011 23:08, Steve Kargl wrote:
> make clean
> make PREFIX=/opt/
> This eventually dies with 
> ===>  Installing for cppunit-1.12.1
> ===>   Generating temporary packing list
> ===>  Checking if devel/cppunit already installed
> ===>   cppunit-1.12.1 is already installed
>       You may wish to ``make deinstall'' and install this port again
>       by ``make reinstall'' to upgrade it properly.
>       If you really wish to overwrite the old port of devel/cppunit
>       without deleting it first, set the variable "FORCE_PKG_REGISTER"
>       in your environment or the "make install" command line.
> Of course, cppunit-1.12.1 is installed!  The initial build
> in libreoffice installed it before qt4-moc crooked.   

You need to understand the effect of two different variables here:

PREFIX    --- where to install /this/ port
LOCALBASE --- where other ports have been installed

PREFIX *only* affects where the current port will be installed.  It
doesn't affect where this port looks for any dependencies.  That's what

If you want to use /opt/ instead of /usr/local, then set both:


Note that this will completely ignore anything already installed in
/usr/local -- if you have got software installed there, this can result
in attempts to install the same port into two different locations, which
will not work due to both of them fighting over access to /var/db/pkg/
Again, all of this can be fixed by setting appropriate environment
variables.  You might find the following of interest: PKG_DBDIR



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
JID: matthew at               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-ports mailing list