Skip to content

Conversation

@cmacknz
Copy link
Member

@cmacknz cmacknz commented Nov 5, 2025

When support for windows/arm builds was added in #9751 the Go archive proxy was switched from a fixed amd64 GOARCH to the host GOARCH. This works in CI which doesn't cross-compile for Windows but broke cross-compiling from darwin/arm64 to windows/amd64 for anyone on a Mac. This PR fixes that.

To test:

❯ EXTERNAL=true SNAPSHOT=true PACKAGES=zip PLATFORMS=windows/amd64,windows/arm64 mage package

# ...

❯ file build/distributions/elastic-agent-9.3.0-SNAPSHOT-windows-x86_64/elastic-agent.exe
build/distributions/elastic-agent-9.3.0-SNAPSHOT-windows-x86_64/elastic-agent.exe: PE32+ executable (console) x86-64, for MS Windows

❯ file build/distributions/elastic-agent-9.3.0-SNAPSHOT-windows-arm64/elastic-agent.exe
build/distributions/elastic-agent-9.3.0-SNAPSHOT-windows-arm64/elastic-agent.exe: PE32+ executable (console) Aarch64, for MS Windows

@cmacknz cmacknz self-assigned this Nov 5, 2025
@cmacknz cmacknz requested a review from a team as a code owner November 5, 2025 21:41
@cmacknz cmacknz added the backport-9.2 Automated backport to the 9.2 branch label Nov 5, 2025
@cmacknz cmacknz changed the title Compile the Windows archive proxy for the target GOARCH isntead of the host GOARCH Compile the Windows archive proxy for the target GOARCH instead of the host GOARCH Nov 5, 2025
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Nov 6, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

ycombinator
ycombinator previously approved these changes Nov 7, 2025
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Just a comment update, otherwise LGTM

@cmacknz cmacknz enabled auto-merge (squash) November 7, 2025 01:35
@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

cc @cmacknz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-9.2 Automated backport to the 9.2 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

archive-proxy is compiled for the host architecture and not the target architecture

4 participants