How to best handle ports mislinking against locally installed copies?

Denny Lin dennylin93 at
Sat Mar 26 10:12:05 UTC 2011

On Sat, Mar 26, 2011 at 02:29:14AM -0700, Edward Sanford Sutton, III wrote:
> As an example, net/avahi-app fails to build on my machine because of the 
> error:
> /libexec/ Shared object "" not found, required 
> by ""
> This can be fixed by removing the port before building so that it is unable to 
> link against /usr/local/lib/ and instead correctly links 
> against ./work/avahi-0.6.29/avahi-glib/.libs/ but is it 
> correct to assume uninstall is needed before attempting to build a new 
> version or are there suggested fixes or examples of working through this?
> I can try to dig up other examples I have ran into in detail but was wondering 
> about the general approach and if the freebsd ports tree likes to fix it, 
> note it, or ignore it?

These are usually documented in /usr/ports/UPDATING, so check it before
updating ports.

Usually a rebuild fixes the problem, but sometimes a lot of ports have
to be reinstalled, so it is time consuming. Try out
ports-mgmt/portmaster and use the -w flag to preserve libs. They will
end up in /usr/local/lib/compat/pkg/lib/ until you decide to remove

Denny Lin

More information about the freebsd-ports mailing list