mirror of
https://github.com/devnullvoid/pvetui.git
synced 2026-04-25 05:15:51 +03:00
[GH-ISSUE #19] Makefile hardcodes GOOS and GOARCH despite not requiring CGO #2
Labels
No labels
bug
bug
documentation
enhancement
pull-request
question
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pvetui#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @unclesp1d3r on GitHub (Aug 3, 2025).
Original GitHub issue: https://github.com/devnullvoid/pvetui/issues/19
Originally assigned to: @devnullvoid on GitHub.
Issue Description
The Makefile currently hardcodes the following build parameters:
These are used in the
buildtarget (line 31) withCGO_ENABLED=0, which means the application doesn't use CGO and should be able to build natively on any supported Go platform.Problem
This makes development and testing more difficult on non-Linux platforms (e.g., macOS, Windows) because:
make buildcommand always tries to cross-compile for Linux/amd64 regardless of the host platformExpected Behavior
Since the application uses
CGO_ENABLED=0and doesn't appear to have any OS-specific dependencies, the Makefile should:GOOSandGOARCHto be detected automatically)Suggested Solution
Replace the hardcoded values with something like:
Or simply remove the explicit
GOOS=$(GOOS) GOARCH=$(GOARCH)from the build command and let Go use its defaults.Environment
make buildtarget primarilyAdditional Context
The
release-buildtarget (lines 264-272) correctly builds for multiple platforms explicitly, so there's already precedent for multi-platform builds in the Makefile. The issue is specifically with the defaultbuildtarget forcing Linux/amd64.