I'm already using Homebrew for a couple of things, Is it problematic to use Homebrew and MacPorts side by side?

Clemens Lang cal at macports.org
Tue Aug 13 12:38:56 UTC 2019


Hi,

----- On 13 Aug, 2019, at 05:01, Ken Cunningham ken.cunningham.webuse at gmail.com wrote:

> Compilers like clang are prebuilt to search first in /usr/local for include
> files and libraries, and then after that in /usr (or -isysroot).
> 
> SO -- if you have things installed in /usr/local then those headers and
> libraries will be found automatically and, helpfully, USED.
> 
> THIS is why people love HomeBrew so much -- things seem to  "just work" because
> they are installed (or symlinked) into /usr/local.
> 
> However, this is also why things break cryptically without being able to figure
> out what the heck is going on. Because headers in /usr/local are being used
> instead of the ones you thought would be used.
> 
> IF you are very very clever, and can keep track of all this, you can use
> multiple different systems together successfully.

To re-iterate on this, if you really really want to keep things in /usr/local, make it
a habit of doing all your port operations with the `-t` flag to enable trace mode (see
https://trac.macports.org/wiki/FAQ#buildfails, point 4).

Trace mode will make a best effort to hide files in /usr/local (and other locations
that shouldn't exist on a "clean" system) from the build. Your builds will be slower,
but they will be less likely to fail.

-- 
Clemens Lang


More information about the macports-users mailing list