PREFIX is not honored for dependencies

b. f. bf1783 at
Sat Aug 6 09:37:30 UTC 2011

> There is nothing to fix, this is the way ports are expected to work.
> Are you sure? IMHO if PREFIX is defined before installing any port
> and never gets changed than all ports should respect PREFIX.
> > Playing with PREFIX != LOCALBASE has to be done with care because it
> > can lead to some breakage as this one.
> Steve, did you define a new PREFIX before installing *any* port at the
> system in question? There should be the fore-mentioned problem if one
> *change* PREFIX after installing some ports.

They may be respecting PREFIX, but may also be honoring LOCALBASE?=
/usr/local, != PREFIX, during dependency checks:

     98 BUILD_DEPENDS=  zip:${PORTSDIR}/archivers/zip \
${LOCALBASE}/lib/${PORTSDIR}/devel/cppunit \

, so problems may arise.  If you're going to define a non-default
PREFIX, you must set LOCALBASE to match.  And even if you do, if you
have an alternative, non-empty LOCALBASE that is in your path, or that
contains shared libraries visible to the loader, then you may still
encounter problems.  I think that PC-BSD uses something corresponding
to multiple PREFIXes in their approach to fat packages, and they had
to make a number of changes to the base system as well as to ports in
order to do so.

By the way, I guess some of the shared libraries in this port's
BUILD_DEPENDS have to use a fully-qualified path (and were placed
there instead of in LIB_DEPENDS to avoid registering a run-time
dependency?), but I don't know why that was thought to be necessary
for the binary executables gperf and vigra-config.


> BTW, QAT was used to do experimental runs with non-default PREFIX.
> Those reports were very useful.
> --
> WBR, bsam

More information about the freebsd-ports mailing list