add option to build for linux arm64
Does this PR modify CLI v6, CLI v7, or CLI v8?
No but can be included
Description of the Change
This change simply adds the option to build for linux arm64 in Makefile
Why Is This PR Valuable?
Useful for those who need cf able to run on linux arm64
Applicable Issues
Similar to https://github.com/cloudfoundry/cli/issues/2131 Suitable for those who run cf in Linux docker images under M1
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: gflex / name: Georgi Ivanov (93a26577eaca0ae9c7cedfe0d75a3951a52cc5b3)
This looks good in that the new target works for me on an M1 mac, however I cannot reproduce the issue with the existing amd64 target.
docker run --platform linux/arm64 -v $PWD:/cli -w /cli golang:1.18 make out/cf-cli_linux_x86-64 followed by docker run --platform linux/arm64 -v $PWD:/cli -w /cli golang:1.18 ./out/cf-cli_linux_x86-64 version works for me on an M1 mac.
I'd like to see a change in behavior before approving--can you provide reproduction steps? +@rafikt1992
Could you please provide reproduction steps for the existing mac os target not working on arm? I could not reproduce this in a docker container.
i don't have an example at them moment, but sometimes when i have a script that performs cf commands i get an error similar to this
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
which is what i get when i run any cli that doesn't have an ARM64
the alternative is to run things under rosetta, or if they have a darwin M1 build. but this complicate the workflow as most of the tools we use in our development is dockerized
Hello @a-b,
Do you plan to offer build binaries for linux-arm64 after this is merged?