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
Contributor

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
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

cc @cmacknz

@cmacknz cmacknz requested a review from ycombinator November 13, 2025 15:30
Copy link
Contributor

@michel-laterman michel-laterman left a comment

Choose a reason for hiding this comment

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

lgtm

@cmacknz cmacknz merged commit 318ad8f into elastic:main Nov 13, 2025
21 checks passed
mergify bot pushed a commit that referenced this pull request Nov 13, 2025
…e host GOARCH (#11054)

* Compile the archive proxy for the target GOARCH isntead of the host
GOARCH.

* Update comment to match function name.

Co-authored-by: Shaunak Kashyap <[email protected]>

---------

Co-authored-by: Shaunak Kashyap <[email protected]>
(cherry picked from commit 318ad8f)
@cmacknz cmacknz deleted the cmacknz/fix-local-windows-packaging branch November 13, 2025 21:54
@cmacknz cmacknz added the backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches label Nov 14, 2025
@github-actions
Copy link
Contributor

@Mergifyio backport 9.1 9.2

@mergify
Copy link
Contributor

mergify bot commented Nov 14, 2025

backport 9.1 9.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 14, 2025
…e host GOARCH (#11054)

* Compile the archive proxy for the target GOARCH isntead of the host
GOARCH.

* Update comment to match function name.

Co-authored-by: Shaunak Kashyap <[email protected]>

---------

Co-authored-by: Shaunak Kashyap <[email protected]>
(cherry picked from commit 318ad8f)

# Conflicts:
#	magefile.go
cmacknz added a commit that referenced this pull request Nov 17, 2025
…e host GOARCH (#11054) (#11174)

* Compile the archive proxy for the target GOARCH isntead of the host
GOARCH.

* Update comment to match function name.



---------


(cherry picked from commit 318ad8f)

Co-authored-by: Craig MacKenzie <[email protected]>
Co-authored-by: Shaunak Kashyap <[email protected]>
Co-authored-by: Eric Beahan <[email protected]>
hayotbisonai pushed a commit to hayotbisonai/elastic-agent that referenced this pull request Nov 23, 2025
…e host GOARCH (elastic#11054)

* Compile the archive proxy for the target GOARCH isntead of the host
GOARCH.

* Update comment to match function name.

Co-authored-by: Shaunak Kashyap <[email protected]>

---------

Co-authored-by: Shaunak Kashyap <[email protected]>
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 backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches 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

5 participants