Question about meson and boost libraries

Mojca Miklavec mojca at macports.org
Mon Dec 25 08:11:09 UTC 2017


On 24 December 2017 at 21:02, Ryan Schmidt wrote:
> On Dec 22, 2017, at 18:10, Benjamin Redelings wrote:
>
>> However, even after that fix I have to define BOOST_ROOT=/opt/local to find boost.  For manual builds, if don't do PATH=/opt/local:$PATH then meson uses pkgconfig from homebrew and runs the wrong pkg-config.  But with those options, at last the configure step succeeds.

Well, if you have HomeBrew installed along with MacPorts and if you
have HomeBrew's path in front of the one from MacPorts, you are
begging your build system (whatever it is) to use packages from
HomeBrew, so you should not complain about it. If you do just
BOOST_ROOT=/opt/local, I can assure you that all other dependencies
will come from HB exclusively, in particular if you HB installation is
in /usr/local.

> It's good to code your portfile defensively to cope with such situations. But most portfiles aren't coded that way, and we don't support having both Homebrew and MacPorts installed on the same system, and recommend you pick one and uninstall the other.

This is certainly a good rule of thumb for unexperienced users.

I would say that for skilled users it's generally sufficient if the
following conditions are met:

- One makes sure not to install HomeBrew to /usr/local; anywhere else
is fine, but this location will definitely lead to problems.
- Only one of them is in PATH at any given moment. While this may be
violated sometimes, it's definitely bad to have both present in PATH
when installing new packages from source or when compiling anything
else manually.
- The user knows how to troubleshoot problems and check from which
package manage a certain dependency came from, knows how to fix the
problems and won't submit bug reports for accidental cases where one
dependency accidentally came from a different package manager.

Mojca


More information about the macports-dev mailing list