anchor icon indicating copy to clipboard operation
anchor copied to clipboard

@project-serum/anchor-cli 0.25.0 now only comes with arm64 anchor binary

Open rado0x54 opened this issue 2 years ago • 3 comments

Hey,

my CI is failing with "@project-serum/anchor-cli": "^0.25.0", with the following error:

Failed to get version of local binary: /home/runner/work/sol-did/sol-did/program_v2/node_modules/@project-serum/anchor-cli/anchor: 1: Syntax error: "(" unexpected

it seems like the latest version only comes with an arm64 binary:

root@8fd55d5c2037:/tmp/test# ./node_modules/\@project-serum/anchor-cli/anchor
bash: ./node_modules/@project-serum/anchor-cli/anchor: cannot execute binary file: Exec format error
root@8fd55d5c2037:/tmp/test# file ./node_modules/\@project-serum/anchor-cli/anchor
./node_modules/@project-serum/anchor-cli/anchor: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE|HAS_TLV_DESCRIPTORS>

Since we do not want to compile anchor manually on CLI, @project-serum/anchor-cli was an easy way to pull that in. Therefore I'd still prefer an only-x64 binary over an only-arm64 one. Ideal would be one that supports both architectures.

Thanks.

rado0x54 avatar Jul 19 '22 18:07 rado0x54

I also ran into this and as a workaround I used the one built by my github job in the kklas/anchor-nightly repo

"@project-serum/anchor-cli": "https://github.com/kklas/anchor-nightly/releases/download/anchor-cli-latest/anchor-cli-0.25.0-7eb8ca8.tgz",

Armani said on discord that he accidentally built it on his macbook instead of his linux machine and will fix it soon though.

kklas avatar Jul 19 '22 20:07 kklas

Wow, thanks for the workaround. Will use until Armani updates the release.

rado0x54 avatar Jul 19 '22 20:07 rado0x54

@armaniferrante any chance of a 0.25.1 with an x64 binary?

eoin-betdex avatar Sep 13 '22 15:09 eoin-betdex

Also running into this issue. Fixed with

yarn global add https://github.com/kklas/anchor-nightly/releases/download/anchor-cli-latest/anchor-cli-0.25.0-7eb8ca8.tgz 

esemeniuc avatar Oct 07 '22 00:10 esemeniuc

me too

kyanokashi avatar Oct 07 '22 09:10 kyanokashi

I'm guessing this won't be resolved till the next version?

sohrab- avatar Dec 08 '22 12:12 sohrab-

I dunno if this helps anyone but I built the x86_64 binary from 0.25.0 crate and made it available here: https://github.com/labeleven-dev/anchor-binaries/releases/tag/1.0.0

More info in README.md

sohrab- avatar Dec 14 '22 13:12 sohrab-

Any update on this?

esemeniuc avatar Dec 28 '22 19:12 esemeniuc

0.26.0 has been released with the correct binaries now.

sohrab- avatar Dec 28 '22 21:12 sohrab-