hyperledger-labs / microfab

Microfab is a containerized Hyperledger Fabric runtime for use in development environments
Apache License 2.0
73 stars 22 forks source link

Macbook M1 Support #153

Open kaiknight opened 1 year ago

kaiknight commented 1 year ago

Can you help clarify if microfab supports Macbook M1.

I downloaded microfab-arm64 and microfab-amd64, both show errors as follows.

Execution error

nickxie@Nings-MacBook-Pro microfab % ./microfab-amd64
zsh: exec format error: ./microfab-amd64

nickxie@Nings-MacBook-Pro microfab % ./microfab
zsh: exec format error: ./microfab

Download

nickxie@Nings-MacBook-Pro microfab % curl -sSL https://github.com/hyperledger-labs/microfab/releases/download/v0.0.19/microfab-amd64 -o microfab-amd64

nickxie@Nings-MacBook-Pro microfab % curl -sSL https://github.com/hyperledger-labs/microfab/releases/download/v0.0.19/microfab-arm64 -o microfab

Directory items

nickxie@Nings-MacBook-Pro microfab % ll
total 51360
-rw-r--r--@  1 nickxie  staff     33250 May 15 20:28 asset-transfer-basic-typescript.tgz
drwxr-xr-x@ 12 nickxie  staff       384 May 15 20:20 bin
drwxr-xr-x@  3 nickxie  staff        96 Apr  2 00:47 builders
drwxr-xr-x@  5 nickxie  staff       160 Apr  2 00:48 config
-rwxr--r--@  1 nickxie  staff  12206714 May 15 20:36 microfab
-rwxr--r--@  1 nickxie  staff  12744608 May 15 20:40 microfab-amd64
mbwhite commented 1 year ago

Hello @kaiknight I understood that it did work on an M1 mac;

I don't though have access to a M1 system so I'm unable to do much diagnosis

kaiknight commented 1 year ago

@mbw Thank you for your response. Not sure the cause of the "exec format error".

GowthamParamasivam commented 1 year ago

Same issue here. @kaiknight did you find any workaround for this issue?

kaiknight commented 1 year ago

@GowthamParamasivam I started microfab by running "Docker Command Equivalents" at the bottom of this page. https://github.com/hyperledger-labs/microfab/blob/main/docs/Tutorial.md

jt-nti commented 1 year ago

Using the docker image is definitely the right thing to do.

I think the issue with microfab-arm64 on an m1 mac is that the binary is for linux, not osx. See https://github.com/hyperledger-labs/microfab/blob/main/.github/workflows/publish.yml for an example of building mac binaries. (It would also be good to tidy up the release assets a bit and include the cli and daemon binaries in a tarball for each architecture.)