Skip to content
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

*: Add promu build for darwin/arm64 #6824

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

saswatamcode
Copy link
Member

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Helps with running binaries on apple silicon.
Should kick in from next release, but promu already supports it from v0.8.

Verification

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
@saswatamcode
Copy link
Member Author

Hmm seems like it is broken, will take a look...

@yeya24
Copy link
Contributor

yeya24 commented Oct 21, 2023

Hmm seems like it is broken, will take a look...

Is it broken? I see build works.

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
@saswatamcode
Copy link
Member Author

The check doesn't fail, but it just doesn't build,

> running the base builder docker image
github.com/prometheus/promu/cmd.runCrossbuild
	/home/runner/go/pkg/mod/github.com/prometheus/promu@v0.5.0/cmd/crossbuild.go:148
github.com/prometheus/promu/cmd.Execute
	/home/runner/go/pkg/mod/github.com/prometheus/promu@v0.5.0/cmd/promu.go:[13](https://github.com/thanos-io/thanos/actions/runs/6571719603/job/17851434842?pr=6824#step:5:14)0
main.main
	/home/runner/go/pkg/mod/github.com/prometheus/promu@v0.5.0/main.go:20
runtime.main
	/opt/hostedtoolcache/go/1.21.3/x64/src/runtime/proc.go:267
runtime.goexit
	/opt/hostedtoolcache/go/1.21.3/x64/src/runtime/asm_amd64.s:[16](https://github.com/thanos-io/thanos/actions/runs/6571719603/job/17851434842?pr=6824#step:5:17)50\n +  docker create -t --name promu-crossbuild-base1697703[17](https://github.com/thanos-io/thanos/actions/runs/6571719603/job/17851434842?pr=6824#step:5:18)5 quay.io/prometheus/golang-builder:1.[21](https://github.com/thanos-io/thanos/actions/runs/6571719603/job/17851434842?pr=6824#step:5:22)-base -i github.com/thanos-io/thanos -p linux/amd64 darwin/amd64 windows/amd64 freebsd/amd64 linux/arm64 linux/ppc64le

But figured out what needs to fix! 🙂

@saswatamcode
Copy link
Member Author

saswatamcode commented Oct 21, 2023

And now promu breaks in different way. Looks like prometheus/promu#228
Will tackle this

@simonpasquier
Copy link
Contributor

Discussed this offline: the build command breaks because it reinstalls the promu binary using go build ... while the GOOS and GOARCH environment variables are set to the target platform (e.g. darwin/amd64). Instead the promu installation command could set GOOS and GOARCH to GOHOSTOS and GOHOSTARCH variables respectively (doc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants