Question about meson and boost libraries

Mojca Miklavec mojca at
Fri Dec 22 19:51:47 UTC 2017

On 22 December 2017 at 19:14, Benjamin Redelings wrote:
> Hi,
>     I'm new to macports.  I'm the author or the bali-phy software, and I'm
> working on updating the ancient Portfile for it.  The software has changed a
> lot since someone wrote the original Portfile years ago, and I was
> completely unfamiliar with the Portfile format yesterday, so I have a bit of
> learning to do.

Welcome to MacPorts :)

>     One issue I'm running into is that meson isn't finding boost at the
> configure stage.  It might be because its not looking for libraries with the
> -mt suffix.  However, while I'm continuing to look into this, I thought I'd
> ask what the general state of using meson with macports is.  Is there a
> place I can go to see discussion of this?

Probably the only discussion we ever had is the one that Ken pointed you to.
The general state is that:
- We just integrated the PortGroup, support is super rudimentary
- Meson's treatment of dylibs is pretty much broken (latest version of
meson recently changed something in that respect, but I don't fully
understand how that rpath-stuff works, so something needs to be fixed
in either case).
- The best place of discussion is this list or irc channel or
(probably more helpful) the meson mailing list or IRC channel.

If meson cannot find boost, someone (either you or another macporter)
should try to start fighting with meson or you should ask the
developers for help. It would help to run it in verbose mode to get
some hints why meson is failing to find the library (I'm afraid that
the code is pure python where you cannot really turn debug on with a
command line switch).

Last time I tried debugging a few things I usually had to inject a lot
of debug statements into python code. A totally stupid example is that
if you don't have git installed, it won't find any libraries at all (I
was trying to use gtest) because it tries to consult git first and the
failure to run "git info" is interpreted as "module cannot be found".
I submitted a number of bug reports, but the resolution rate & speed
is usually quite low if you don't actively participate in debugging
and fixing (and even if they fix something, the bug reports often stay

Then again, MacPorts doesn't excell in ticket resolution speed either :(

>     I'm pretty happy with meson in general - I'm finally willing to switch
> away from autotools.  I've been able to generate cross-builds from linux to
> mingw-w64 and darwin, and I've done native builds on linux and osx.

With the exception of buggy wine support I was super happy with
cross-compiling with MinGW from MacPorts as well.

> But integration with packaging tools seems to be another layer...

It would help to get some debug info first. If boost needs to be found
via pkg-config, it should be sufficient if meson finds the correct
pkg-config. If there's a different magic involved, then I'm not sure
about the proper way of pointing meson to the prefix of MacPorts.


More information about the macports-dev mailing list