New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meson no longer able to pick up Boost #86131
Comments
Possibly a meson bump changed boost detection? |
Yeah, looks like it touched boost: mesonbuild/meson@0.53...0.54.0 |
Makes sense. Bisecting the build to see exactly what nixpkgs commit broke things; would try with a bumped meson afterwards but I guess that would need a stdenv rebootstrap? |
I think creating a directory containing project(
'pulseeffects',
'c',
'cpp',
default_options : ['cpp_std=c++17','buildtype=debugoptimized'],
version: '4.7.2',
meson_version: '>= 0.40.0'
)
dependency('boost', version: '>=1.65', modules:['system','filesystem']) and changing the pulseeffects Or you can clone |
Unfortunately, same error even with: diff --git a/pkgs/applications/audio/pulseeffects/default.nix b/pkgs/applications/audio/pulseeffects/default.nix
index 2972849a2d4..a93fb6c48fe 100644
--- a/pkgs/applications/audio/pulseeffects/default.nix
+++ b/pkgs/applications/audio/pulseeffects/default.nix
@@ -32,6 +32,7 @@
, rubberband
, mda_lv2
, lsp-plugins
+, python3Packages
}:
let
@@ -56,7 +57,15 @@ in stdenv.mkDerivation rec {
};
nativeBuildInputs = [
- meson
+ (meson.overrideAttrs (_: rec {
+ pname = "meson";
+ version = "0.54.1";
+ name = "${pname}-${version}";
+ src = python3Packages.fetchPypi {
+ inherit pname version;
+ hash = "sha256-L3b7RXJ2K+E+5HkpJhAJG0UJr1eIvM6zkf4iK80Cltw=";
+ };
+ }))
ninja
pkgconfig
libxml2 Not entirely sure this is enough to get the right version of meson used, though. |
Yeah, that should be enough. Hmm. That is unfortunate. Reverting back to 0.53.2 seems to fix the issue: --- a/pkgs/applications/audio/pulseeffects/default.nix
+++ b/pkgs/applications/audio/pulseeffects/default.nix
@@ -1,5 +1,6 @@
{ stdenv
, fetchFromGitHub
+, pkgs
, meson
, ninja
, pkgconfig
@@ -56,7 +57,14 @@ in stdenv.mkDerivation rec {
};
nativeBuildInputs = [
- meson
+ (let
+ nixpkgs = pkgs.fetchzip {
+ name = "nixpkgs-with-meson-0.53.2";
+ url = "https://github.com/NixOS/nixpkgs/archive/9073a0cb8b2f419785a60969e11e96733f29b200%5E.tar.gz";
+ hash = "sha256-oC94cOmB7dxpWzSXlLNt2OyhEt20qX9murBWUh52HLo=";
+ };
+ in
+ pkgs.callPackage "${nixpkgs}/pkgs/development/tools/build-managers/meson/default.nix" {})
ninja
pkgconfig
libxml2 We will need to analyze the commits that touched boost and fix them. |
I'm guessing mesonbuild/meson@08224da is the place to start looking. |
Looking at https://github.com/mesonbuild/meson/pull/6602/files#diff-69d98b8292053a53f88d3015eab2d5daL87, they no longer seem to use We pass |
Setting the following environment variables fixes the Meson’s Boost detection: # Meson is no longer able to pick up Boost automatically.
# https://github.com/NixOS/nixpkgs/issues/86131
BOOST_INCLUDEDIR = "${stdenv.lib.getDev boost}/include";
BOOST_LIBRARYDIR = "${stdenv.lib.getLib boost}/lib"; Not sure if we should do that in Boost setup hook or make Meson support |
The setup hook seems like a good solution to me. Weirdly, setting |
Weirdly, it seems to work without the variables when the project does not check for specific modules: |
Meson 0.54 is no longer able to find Boost: See #86131
For now, I have added the variables to |
Thanks! Maybe we should ask meson upstream what the preferred way to handle this would be? |
Yeah, I am chatting with the PR author on IRC right now. |
They do not want to extract the paths from compiler/linker so it was suggested to me to add a generic method for letting meson know where headers/libraries are stored in lieu of FHS. I will track that in #86159. In the short term, we should add a setup hook to |
Setting the two environment variables still seems to be not enough:
despite having
Any idea how to fix this? |
Boost currently defaults to Python 2, you would also need to override |
@jtojnar Thanks, that workaround worked for our Meson project as well. |
We probably want to patch these bits out: |
PR #100850 |
Avoids impure builds on unsandboxed non-NixOS builds, see: NixOS#86131 (comment)
0.56 will support setting the boost directories in cross file, in addition to env vars: https://github.com/mesonbuild/meson/pull/7210/files |
Avoids impure builds on unsandboxed non-NixOS builds, see: #86131 (comment)
Not fixed in master nixpkgs yet, tracked on NixOS/nixpkgs#86131
I marked this as stale due to inactivity. → More info |
@jtojnar is the cross file used now? |
No. We would have to update the setup hook to generate the cross file. |
Sorry to bump this, but I am unsure now, is the workaround (setting |
I also bumped into this and it still seems to be necessary... it would be nice to not need that. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/boost-no-found-building-a-meson-project-with-boost-dependency/29256/2 |
(originally about
pulseeffects
build)Broken on Hydra for a few days now; going by the log it seems to be a boost issue:
but removing the boost version override introduced in 470b916 didn't fix it (and wwmm/easyeffects#645 suggests it's required anyway). Unfortunately I'm not very familiar with boost or meson so I'm not sure what to poke at next, but I'll update this issue if I figure anything out.
cc @jtojnar @matthiasbeyer
The text was updated successfully, but these errors were encountered: