apache / cloudstack-cloudmonkey

Apache Cloudstack Cloudmonkey
Apache License 2.0
91 stars 60 forks source link

Build compatible for Apple M1 CPU #113

Closed wongster80 closed 2 years ago

wongster80 commented 2 years ago

Hi, Is CMK built for Apple M1 CPU, because I've been getting this error running cmk.

% sysctl -n machdep.cpu.brand_string Apple M1 % ./cmk.darwin.arm64 zsh: killed ./cmk.darwin.arm64 % ./cmk.darwin.x86-64 zsh: killed ./cmk.darwin.x86-64

rohityadavcloud commented 2 years ago

Yes @wongster80 pl use the darwin arm64 build from https://github.com/apache/cloudstack-cloudmonkey/releases/download/6.2.0/cmk.darwin.arm64

After downloading, don't forget to run chmod +x <binary>.

I tested this locally on a M1 macbook air on osx 12.2.1:

./cmk.darwin.arm64 -v
Apache CloudStack 🐵 CloudMonkey 6.2.0 (build: 2176ff6, 2021-10-27T17:14:21+0530)
vseshan commented 2 years ago

I also have the same issue with MacOS Monterey version 12.2.1 Macbook Pro Apple M1

bash-3.2$ file cmk.darwin.arm64 cmk.darwin.arm64: Mach-O 64-bit executable arm64 bash-3.2$ ./cmk.darwin.arm64 -v Killed: 9 bash-3.2$

rohityadavcloud commented 2 years ago

@vseshan @wongster80 can you check and share the md5 checksum of the binary? See how I tested below:

bash-3.2$ wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/6.2.0/cmk.darwin.arm64

...
Length: 7739714 (7.4M) [application/octet-stream]
Saving to: ‘cmk.darwin.arm64’

cmk.darwin.arm64                100%[======================================================>]   7.38M  6.64MB/s    in 1.1s

2022-03-24 14:31:14 (6.64 MB/s) - ‘cmk.darwin.arm64’ saved [7739714/7739714]

bash-3.2$ md5 cmk.darwin.arm64
MD5 (cmk.darwin.arm64) = 479f6c9132c216bfbf0e5e650021f625

bash-3.2$ chmod +x cmk.darwin.arm64
bash-3.2$ ./cmk.darwin.arm64 -v
Apache CloudStack 🐵 CloudMonkey 6.2.0 (build: 2176ff6, 2021-10-27T17:14:21+0530)

I'm not able to reproduce your error, though I've Macbook Air M1.

vseshan commented 2 years ago

It works now, earlier we downloaded the binary directly from the browser now after downloading from wget it works. Thanks for your help. On Thursday, March 24, 2022, 02:03:09 AM PDT, Rohit Yadav @.***> wrote:

@vseshan @wongster80 can you check and share the md5 checksum of the binary? See how I tested below: bash-3.2$ wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/6.2.0/cmk.darwin.arm64

... Length: 7739714 (7.4M) [application/octet-stream] Saving to: ‘cmk.darwin.arm64’

cmk.darwin.arm64 100%[======================================================>] 7.38M 6.64MB/s in 1.1s

2022-03-24 14:31:14 (6.64 MB/s) - ‘cmk.darwin.arm64’ saved [7739714/7739714]

bash-3.2$ md5 cmk.darwin.arm64 MD5 (cmk.darwin.arm64) = 479f6c9132c216bfbf0e5e650021f625

bash-3.2$ chmod +x cmk.darwin.arm64 bash-3.2$ ./cmk.darwin.arm64 -v Apache CloudStack 🐵 CloudMonkey 6.2.0 (build: 2176ff6, 2021-10-27T17:14:21+0530)

I'm not able to reproduce your error, though I've Macbook Air M1.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

rohityadavcloud commented 2 years ago

@vseshan I think it should still work, even if the link/cli is downloaded from browser (check the md5sum for example to confirm if the download via browser went well). It's possible Github was experiencing some issues which is resolved now.

@wongster80 is it the same issue for you, can you confirm if it works for you too?

rohityadavcloud commented 2 years ago

Closing this, pl reopen with more information if this is still an issue for you @wongster80