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

Cross-compile binary for ARMv7 and ARM 64 #907

Closed
1 task
yankeexe opened this issue Oct 21, 2020 · 9 comments · Fixed by #1401
Closed
1 task

Cross-compile binary for ARMv7 and ARM 64 #907

yankeexe opened this issue Oct 21, 2020 · 9 comments · Fixed by #1401
Labels
type/enhancement Issue that requests a new feature or improvement.

Comments

@yankeexe
Copy link

Description

Current binary distribution for pack only supports amd64 . Adding binaries for ARM will enable pack to be used on Raspberry Pi and similar hardware.

Proposed solution

Cross-compile binaries for ARM v7 and ARM 64

Describe alternatives you've considered

Additional context

  • This feature should be documented somewhere
@yankeexe yankeexe added status/triage Issue or PR that requires contributor attention. type/enhancement Issue that requests a new feature or improvement. labels Oct 21, 2020
@jromero jromero added this to the 0.17.0 milestone Oct 23, 2020
@alexellis
Copy link

Thank you @jromero 👍 👍

@dfreilich
Copy link
Member

dfreilich commented Jan 22, 2021

@yankeexe @alexellis I was just looking into doing this (and sorry this took so long)! I'm pretty unfamiliar with the arm64/armv7 ecosystem, so two questions:

  1. Can we assume that testing with the normal linux github action runner (ubuntu-18.04) will give sufficient coverage for linux systems, or should we test it on those architectures as well? (I'm assuming we should test it, and I've opened Add/host terraform templates for creating ARM 64, ARM v7 and M1 runners ci#23 as a result, but if that's not the case, great!)
  2. Is the ask to just publish in our release, or to publish to a package manager?

Again, I don't know the ecosystem at all, so I'm sorry if these are super basic questions!

@dfreilich
Copy link
Member

I'm assuming that this is blocked at the moment on buildpacks/lifecycle#435. When we tried running an arm64 compiled pack with an extant builder, we saw:

pack build -B gcr.io/buildpacks/builder:v1 ${IMAGE}
v1: Pulling from buildpacks/builder
Digest: sha256:889d1cc172467dfb5560c69e5a24d8215804e0fb9ae36e2774f33bc2033ffb8c
Status: Image is up to date for gcr.io/buildpacks/builder:v1
v1: Pulling from buildpacks/gcp/run
Digest: sha256:35c7b9995b7b0ad398e504bc178e38b28626e1ce9052cfeabc8750fc313b4d36
Status: Image is up to date for gcr.io/buildpacks/gcp/run:v1
standard_init_linux.go:190: exec user process caused "exec format error"
ERROR: failed to build: executing lifecycle: failed with status code: 1

@dfreilich dfreilich added status/blocked Issue or PR that is blocked. See comments. and removed status/triage Issue or PR that requires contributor attention. labels Jan 25, 2021
@dfreilich dfreilich removed this from the 0.17.0 milestone Jan 25, 2021
@briandealwis
Copy link
Contributor

briandealwis commented Jun 8, 2021

@dfreilich that specific error is related but different from buildpacks/lifecycle#435: gcr.io/buildpacks/builder:v1 is linux/amd64-only. Your build should work if you have binfmt_exec extensions configured, though it will produce a linux/amd64 image, though note that there is an issue involving untrusted builders (#1197).

@jromero
Copy link
Member

jromero commented Aug 10, 2021

If I'm not mistaken this issue is now completely resolved provided all referenced issues are resolved. If that is wrong, please feel free to re-open with more detail on what's missing.

@jromero jromero closed this as completed Aug 10, 2021
@jromero jromero removed the status/blocked Issue or PR that is blocked. See comments. label Aug 10, 2021
@josegonzalez
Copy link

Should arm releases for pack be added to each release? I'm not seeing them on the latest release, but maybe this was only implemented for MacOS?

@jromero
Copy link
Member

jromero commented Oct 26, 2021

@josegonzalez you are right. I misread the issue as being related to Apple Silicon/M1. Re-opened.

@jromero jromero reopened this Oct 26, 2021
@josegonzalez
Copy link

Is this "just"

Or is there something I'm missing?

@willianpaixao
Copy link
Contributor

@josegonzalez I took the freedom and went ahead to test your assumption. #1401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants