grafana icon indicating copy to clipboard operation
grafana copied to clipboard

Build: Fails with Go 1.23

Open stefanb opened this issue 1 year ago • 3 comments

What happened?

Trying to build with Go 1.23 (currently rc1, final scheduled in August 2024):

  • https://github.com/Homebrew/homebrew-core/pull/175310

The build failed with error:

  Version: 11.0.0, Linux Version: 11.0.0, Package Iteration: 1719017716
  building binaries build
  building grafana ./pkg/cmd/grafana
  rm -r ./bin/darwin-arm64/grafana
  rm -r ./bin/darwin-arm64/grafana.md5
  go build -ldflags -w -X main.version=11.0.0 -X main.commit=unknown-dev -X main.buildstamp=1715585693 -X main.buildBranch=main -o ./bin/darwin-arm64/grafana ./pkg/cmd/grafana
  go: downloading github.com/urfave/cli/v2 v2.25.0
  go: downloading github.com/grafana/pyroscope-go/godeltaprof v0.1.6
  go: downloading github.com/grafana/authlib v0.0.0-20240319083410-9d4a6e3861e5
  # github.com/grafana/pyroscope-go/godeltaprof/internal/pprof
  /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/grafana/pyroscope-go/[email protected]/internal/pprof/delta_mutex.go:30:20: undefined: runtime_cyclesPerSecond
  /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/grafana/pyroscope-go/[email protected]/internal/pprof/proto.go:320:8: undefined: runtime_expandFinalInlineFrame
  exit status 1

This was likely already fixed in

  • https://github.com/grafana/pyroscope-go/issues/103

but that needs to be included in a tagged release and updated in Grafana.

What did you expect to happen?

Build to succeed.

Did this work before?

Yes, with previous versions of Go:

  • https://github.com/Homebrew/homebrew-core/pull/175571
  • https://github.com/Homebrew/homebrew-core/pull/171659
  • https://github.com/Homebrew/homebrew-core/pull/168667 ...

How do we reproduce it?

  1. Try to build it with Go 1.23

Is the bug inside a dashboard panel?

No

Environment (with versions)?

Grafana: 11.0.0 OS: Linux Browser: N/A

Grafana platform?

None

Datasource(s)?

No response

stefanb avatar Jun 26 '24 17:06 stefanb

Thanks for providing the info on this @stefanb - will potentially be helpful when it comes to the official 1.23 release.

wbrowne avatar Jul 31 '24 09:07 wbrowne

@wbrowne go 1.23 got releases yesterday, maybe time to revisit this issue?

chenrui333 avatar Aug 14 '24 13:08 chenrui333

fix via @korniltsev: https://github.com/grafana/pyroscope-go/commit/edd64fd9a09c27d2a839bdb8bdcfe832eecb98d6

leeoniya avatar Aug 15 '24 19:08 leeoniya

fixed in https://github.com/grafana/grafana/pull/92055, i think.

leeoniya avatar Aug 19 '24 20:08 leeoniya