-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: arm64 support #87
Conversation
tested the image on M1 pro (generated Go, openapi) - everything works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you for contribution!
Looking forward to merging this once the issue is resolved.
I went ahead and pushed a little refactor commit for build.sh
script to simplify it a bit, hope you don't mind (12f6f73)
0373f27
to
12f6f73
Compare
I think we should wait until all the issues are fixed before merging this PR, but perhaps we can extract some parts of this into a separate PR, merge and open an issue about Swift (maybe disable Swift on arm64 if it's broken?) ? This way we could close #81 albeit without Swift support for arm64 |
Splitting out languages that are currently failing makes sense to me, the guy on the Swift forum has asked me to open a bug on their compiler repo so it could take some time to fix. I've hand-built a multiarch image based on two natively built errors for now, available at |
I had another good play with this today and cannot make progress on successfully using the image to build. The
I'm unable to find documentation on the exact commands to build this plugin without gradle. The build of the |
So, after 2 more days I finally realised that the problem is not the compiler but the use of UPX that is causing the compiled plugin to crash. I have excluded a couple of plugins that failed for me when executed. UPX has a few issues open regarding compressed ARM binaries crashing, so keep this in mind for the future - this tool might be more trouble than it is worth. I also added code to omit building Swift on ARM architecture - commits to tidy up my horrible bash skills are welcome! Everything now builds perfectly for me, but the |
Actually maybe we should merge this and add cross-compiling in a separate PR. For the moment I am having a lot of success building native x86_64 images locally and native arm64 images on AWS Graviton2 servers, then merging the two native builds together with |
We could also skip UPX on |
- Introduce `deps.list` - Rely on `buildx` - Build multiarch images in CI Co-authored-by: Roman Volosatovs <[email protected]>
Signed-off-by: Roman Volosatovs <[email protected]>
This change should be reverted once issues are fixed Co-authored-by: Roman Volosatovs <[email protected]>
Build only for default platform by default, if a custom platform is required, users should pass `--platform` flag to the script.
e58913e
to
4bf5b19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased the commits, applied a few minor changes, mostly styling
Thanks for contribution!
Summary
Closes #81 - this PR is not yet functional due to a bug in the Swift builder we are working to resolve over at the Swift forum here. I decided to open a draft PR to indicate that this work is mostly complete and to ask if you have any ideas how to debug this last issue building protoc for Swift.
Changes
build.sh
to be architecture-agnostic, allowing builds targettinglinux/amd64
andlinux/arm64
platforms.deps.list
to be agnostic of build system (i.e. CI or build.sh)dart2native
and build arm binariesNotes for Reviewers
Please do not merge yet! The
docker_meta
CI step still references my Docker Hub repo, and CI does not yet complete successfully due to the bug described above.Release Notes
arm64
support