-
Notifications
You must be signed in to change notification settings - Fork 184
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
hack: define proper 'GOARCH' when building ARM64 images #2592
base: main
Are you sure you want to change the base?
hack: define proper 'GOARCH' when building ARM64 images #2592
Conversation
Use local host CPU architecture and pass it as GOARCH to image-build command. Needed when building images on non x86_64 images (e.g., AWS/Graviton ARM64, [RHSTOR-2044]). Signed-off-by: Shachar Sharon <ssharon@redhat.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: synarete The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@synarete: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
As far as I remember we did this intentionally to build the images for multiple archs from a single place.
@malayparida2000 can correct me if I am wrong here.
Yes, this was done intentionally as ther's no assurity that the target arch is always the host arch. Whatever is the target arch can be defined by setting the GOARCH value accordingly. |
Assuming I have ARM64 (AWS/Graviton) vm at hand, how should one build the |
@malayparida2000 How should one build ocs-operator image for arm64 from source? That is, what is the proper command line? (I have both arm64 and x86_64 vms). |
If you want to build for arm64, You can just export GOHOSTOS=arm64 and then call the hackfile/make target |
OK, I now get it. in that case, we may ignore this PR (I will convert it to draft). |
Use local host CPU architecture and pass it as GOARCH to image-build command. Needed when building images on non x86_64 images (e.g., AWS/Graviton ARM64, [RHSTOR-2044]).