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

fix(Makefile): use native GOOS/GOARCH by default #488

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

ardnew
Copy link
Contributor

@ardnew ardnew commented Sep 29, 2024

The Makefile attempts to determine the target OS/arch so that it can specify GOOS/GOARCH explicitly when calling go.

This doesn't really achieve anything as it ends up competing with the same default behavior of go as well as the user's own configured environment.

Furthermore, it causes the build to fail on newer Apple silicon Macs, where uname -m reports arm64 (not aarch64 expected by the Makefile).

This change removes the behavior that always-overrides GOARCH. The user can either specify GOOS and GOARCH in the Makefile where commented, or they can simply export the variables through their environment and the Makefile will respect them.

Otherwise, do not override GOARCH or GOOS within the Makefile. Let the go toolchain figure it out as intended.

@aluedeke
Copy link
Collaborator

aluedeke commented Oct 9, 2024

@danielpaulus that one would be nice to merge

@danielpaulus
Copy link
Owner

Sorry folks for the long time to merge, I was out for health reasons for quite a bit. Back now.

Copy link
Owner

@danielpaulus danielpaulus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix, thanks!

@aluedeke aluedeke merged commit 0ea513c into danielpaulus:main Nov 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants