microfab icon indicating copy to clipboard operation
microfab copied to clipboard

Macbook M1 Support

Open kaiknight opened this issue 2 years ago • 5 comments

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

kaiknight avatar May 15 '23 12:05 kaiknight

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

mbwhite avatar May 19 '23 13:05 mbwhite

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

kaiknight avatar May 22 '23 01:05 kaiknight

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

GowthamParamasivam avatar May 24 '23 10:05 GowthamParamasivam

@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

kaiknight avatar May 24 '23 15:05 kaiknight

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.)

jt-nti avatar May 26 '23 08:05 jt-nti