Nixpkgs: Meson overrides compiler, ignoring stdenv

Created on 2 Apr 2019  路  20Comments  路  Source: NixOS/nixpkgs

When I build a meson package (e.g. gnome-builder) with changed stdenv (e.g to gcc8Stdenv) it still builds with the compiler used by Meson:

https://github.com/NixOS/nixpkgs/blob/7c337cc807f2618e5f162a647e974cffcda86122/pkgs/development/tools/build-managers/meson/default.nix#L60

cc @Ericson2314

Most helpful comment

All 20 comments

Yeah the stuff we do is just problems waiting to happen. I feel like I'm getting pretty close to making MESON use the env vars normally so we can just drop all that. :crossed_fingers::crossed_fingers::crossed_fingers:

Can't we drop it now? CC and CXX should be set by stdenv right? I also have a commit to work on cross meson: https://github.com/matthewbauer/nixpkgs/commit/ea4ec78855e41ceceb7612f8af803eb7d1a6aeda but have not had to time to open a pr for it.

Can't we drop it now?

Let's do it, I also just ran into this again: #80598

Wait in #59041 you decided to not do it?

If this needs an upstream fix we should do it, this totally breaks reasonable behaviour.

I feel like I'm getting pretty close to making MESON use the env vars normally so we can just drop all that.

@Ericson2314: can you provide a link or something? I don't think I understand what you referred to.

Yes please make some noise in https://github.com/mesonbuild/meson/pull/6363, which I finally made to fix the issue @jtojnar linked (thanks for fishing it up!). I think it would be more persuasive if someone other than me explains the issue or it's ramifications, as I've sort of made my case to Jussi and the other main meson devs.

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

https://github.com/mesonbuild/meson/pull/6363 was merged a few months ago, this issue has finally been resolved!

I don't think the issue is gone. I experience the problem even with current unstable channel. I work around it by using an overridden meson:

meson.overrideAttrs (attrs: { depsHostHostPropagated = [ ]; })

but it probably won't work for everybody.

See
https://github.com/NixOS/nixpkgs/blob/bf007a2c0a8c60c4c552c3213b4f095de928ee23/pkgs/development/tools/build-managers/meson/default.nix#L66-L68

I suppose that would get more in the way without strictDeps, but with strictDeps it only effect CC_FOR_BUILD.

https://github.com/mesonbuild/meson/pull/6512 just got merged, so we can remove the hack next release!

@Ericson2314 Is removing the below workaround the only thing that needs to be done now? Or will individual package expressions have to be edited to accommodate this change? If we only need to remove the workaround, maybe someone can create a PR.

https://github.com/NixOS/nixpkgs/blob/703f052de185c3dd1218165e62b105a68e05e15f/pkgs/development/tools/build-managers/meson/default.nix#L66-L68

Just that! Happy to do it, but do we have the new Meson version yet?

@Ericson2314 From what I can tell, we do have the latest version. #98228

Oh, great!

But the above meson PR isn't contained in any release yet, it seems.

Oh, right that's a 55.n+1 not 56

I always click the commit and watch the set of tags (and branches) containing it.

Sorry, I naively assumed that the PR was already in the 0.55.3 release because it was older than the release date shown on GitHub.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

teto picture teto  路  3Comments

yawnt picture yawnt  路  3Comments

ayyess picture ayyess  路  3Comments

copumpkin picture copumpkin  路  3Comments

ghost picture ghost  路  3Comments