-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Build failure: grafana on aarch64-darwin #273998
Comments
I'm seeing the same error,
I'm also working in a flake environment rev I attempted to build |
I also confirmed in source that the vendor directories |
Flipping back through commits where Grafana was changed, I can get it to compile at Nixpkgs |
The vendor directory will be created in a different derivation, the contents will be copied at the appropriate place before the Go compiler gets invoked. So AFAIU everything should(tm) be there at the time where the build fails according to your logs. I don't really know about the state of aarch64-darwin support on Grafana upstream. Did you check the issues (and CI builds) there? I may be wrong, but to me this currently seems like an issue in the upstream codebase or one of its dependencies. |
Thanks! That’s helpful to know. I didn’t check upstream, I’m not super familiar with Grafana or Go. Was just doing a quick prototype and was able to get it working with nixpkgs just before your commit but not after. We’re not moving forward with the prototype so I’m probably not going to keep looking on this issue. |
@tel so I got around to taking a first look (sorry that it took me so long!) One question: when you do Please confirm that I'm not off chasing a different issue. But if that's the case, then we probably found a Nix bug that needs to be reported upstream. |
I'm on a flake-based system, so I ran |
FWIW it doesn't matter whether or not you're using flakes (I'm too in fact), you can still use Anyways, as I said, I'm pretty sure that this is a Nix bug. I'll open a bug over there. |
I think this is probably triggered by the fact that some of the go modules grafana depends on use Microsoft and others 'microsoft' for the organization name: https://github.com/grafana/grafana/blob/b5d14d03d7388894bbee47a93f25707539ff1519/go.mod#L437 so probably an interaction of these things. I've submitted a PR to go-winio to rename the module microsoft/go-winio#314 |
The Microsoft GitHub organization uses a lowercase 'm', which other go modules from Microsoft also use. This module using an uppercase M can cause problems in certain build systems when using macOS which uses a case-insensitive build system by default: NixOS/nixpkgs#273998
The Microsoft GitHub organization uses a lowercase 'm', which other go modules from Microsoft also use. This module using an uppercase M can cause problems in certain build systems when using macOS which uses a case-insensitive build system by default: NixOS/nixpkgs#273998 Signed-off-by: Bouke van der Bijl <i@bou.ke>
I am open to upstreaming it to nixpkgs, if that’s desired. |
@shivaraj-bh would you mind checking if #292997 solves the core issue for you (you'll probably need to adjust yarn's supported systems locally, but other than that there shouldn't be much to do). Because if that's the case, that'd be my preferred solution (and another argument in favor of that patch). |
@Ma27 If I just add the darwin cache for yarn, it fails at: Edit: I tried this on #292997
Which is the same issue as reported by OP. To solve this, I had used |
This patch on your fork helps me build grafana on darwin:
|
rant: grafana check takes longer time than the build itself |
This speeds up build, because we no longer have to compile grafana locally and wait for eternity. cf. NixOS/nixpkgs#273998
This speeds up build, because we no longer have to compile grafana locally and wait for eternity. cf. NixOS/nixpkgs#273998
@shivaraj-bh would you mind rebasing your changes onto master and PR them? Grafana is now a little more pleasant to work with given that it builds way faster and I this should probably be fixed (with or without a proper fix in Nix). Also, broken Darwin appears to have unintended side-effects for Hydra: #296193 (comment) |
Will do |
Well, |
Steps To Reproduce
Steps to reproduce the behavior:
nix run nixpkgs#grafana
on aarch64-darwinBuild log
Additional context
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: