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

error when trying to build project using "make build_bin" on a Linux system #153

Closed
mitesh4000 opened this issue Jan 20, 2025 · 2 comments
Closed
Labels
bug Something isn't working urgent Issues and PRs that need a look at ASAP

Comments

@mitesh4000
Copy link
Contributor

mitesh4000 commented Jan 20, 2025

I am encountering an error when trying to build the project using make build_bin on a Linux system. The error message indicates that the GOOS/GOARCH pair darwin/x86_64 is unsupported. This is likely due to a mismatch in the architecture names used in the Makefile.

$ make build_bin
GOARCH=x86_64 GOOS=darwin CGO_ENABLED=0 go build -o bin/go-fast-cdn-darwin
go: unsupported GOOS/GOARCH pair darwin/x86_64
make: *** [Makefile:16: build_bin] Error 2

The Bash commands in the Makefile for retrieving the OS name and build architecture return the following:

$ uname -s | tr A-Z a-z
linux

$ uname -m | tr A-Z a-z | sed 's/^aarch/arm/'
x86_64

my personal Machine (Ubuntu 24.04.1) Specific Solution:
Hard-coding the GOARCH value in the Makefile works fine (the value x86_64 is not working but amd64 is good to go ):

CC="x86_64-linux-musl-gcc" GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -o bin/${BINARY_NAME}-linux

@mitesh4000 mitesh4000 changed the title error when trying to build your project using "make build_bin" on a Linux system error when trying to build project using "make build_bin" on a Linux system Jan 20, 2025
@kevinanielsen kevinanielsen added bug Something isn't working urgent Issues and PRs that need a look at ASAP labels Jan 26, 2025
@kevinanielsen
Copy link
Owner

kevinanielsen commented Jan 26, 2025

was this fixed by #154?

edit: Otherwise, is this an issue you would like to work on?

@mitesh4000
Copy link
Contributor Author

Yes, this issue had been fixed by #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent Issues and PRs that need a look at ASAP
Projects
None yet
Development

No branches or pull requests

2 participants