Closed robtaylor closed 11 months ago
I don't think that meson-python
is doing anything that could affect the boost dependency lookup. Are the meson version used in the two cases exactly the same? If you build with the default pip
or build
settings, the build happens in an isolated environment where the most recent version of meson (unless pinned by other components) is installed. This may be a different version that the one installed on the system.
To further debug this we would need to look at the meson detailed log for the working and not working case. Meson prints the location of the log file after the error message. To access the log file when using meson-python
and building with pip
or build
you need to explicitly specify a build directory adding -Cbuilddir=something
to the command line.
Also, is this a public project that I can use to try to replicate the issue?
yep, same version of meson. However it seems homebrew tweaks boost.py for meson:
Not sure what a good fix for this is :/
You can disable isolated builds, passing the --no-build-isolation
command line option to pip
. In this way the system meson is used, but you need to install all other build dependencies for the system python. There may be other tricks you can play with environment variables to have meson look for boost in the right place. The only proper fix is to have Homebrew submit their patches upstream.
Looking at this a bit more in detail, it seems that the issue should manifest only with an non-standard HOMEBREW_PREFIX
, ie with boost installed somewhere else than in /usr/local/
. Can you confirm?
On m1/2 brew installs in /opt/homebrew
I’m prepping a patch for meson to also search here if HOMEBREW_PREFIX is set
On Tue, 29 Aug 2023 at 16:04, Daniele Nicolodi @.***> wrote:
Looking at this a bit more in detail, it seems that the issue should manifest only with an non-standard HOMEBREW_PREFIX, ie with boost installed somewhere else than in /usr/local/. Can you confirm?
— Reply to this email directly, view it on GitHub https://github.com/mesonbuild/meson-python/issues/462#issuecomment-1697623783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4O4F7SIFYQZDB2V5QQX3XXYAGRANCNFSM6AAAAAA4CZ6YTQ . You are receiving this because you authored the thread.Message ID: @.***>
On m1/2 brew installs in /opt/homebrew
Interesting. Did the default change for the arm macs or on more recent macOS releases? On the intel macs the default location is /usr/local
.
I’m prepping a patch for meson to also search here if HOMEBREW_PREFIX is set
This is most likely the best solution.
It came in for M1s, not sure if its now default for all archs.
(on a Mac M2) When building outside of meson-python, meson build happily finds homebrew boost:
However, inside meson-python, it is not found:
Any ideas what could be causing this?