hclq icon indicating copy to clipboard operation
hclq copied to clipboard

ENH: Support arm64 on Darwin (Apple M1)

Open davidjeddy opened this issue 2 years ago • 5 comments

~ % sh install.sh                       
sh: install.sh: No such file or directory
~ % # Download the script
curl -sSLo install.sh https://install.hclq.sh

# Inspect the script before executing, as is good practice
# for code from the internet, regardless of trust!
less install.sh
...
# Run it!
sh install.sh
Unsupported or undetected platform: 'arm64'
 ~ % 

Edited platform_check() in install.sh

platform_check() {
  # OS and ARCH variables also used to download binary in main function
  OS="$(uname | awk '{print tolower($0)}')"
  ARCH="$(uname -m)"
  case "$ARCH" in
    amd64) ARCH=amd64;;
    x86_64) ARCH=amd64;;
    i386) ARCH=386;;
    i686) ARCH=386;;
    arm) ARCH=arm;;
    arm64) ARCH=arm;;
    *) fail "Unsupported or undetected platform: '$ARCH'";;
  esac
}

Tried install process again:

sh install.sh
Installing /usr/local/bin/hclq
hclq is not available for OS 'darwin' on architecture 'arm'

davidjeddy avatar Apr 06 '22 12:04 davidjeddy

mac arm support would be great

kamilgregorczyk avatar Apr 20 '22 15:04 kamilgregorczyk

need MAC support too

jelel-fliss avatar Apr 20 '23 00:04 jelel-fliss

M1 support please

RTae avatar Apr 21 '23 08:04 RTae

You can still use the darwin amd64 binary since it will execute under Rosetta compatibility layer

mcolussi-bigw avatar Jul 07 '23 05:07 mcolussi-bigw

in theory, pls test and add new make build target for MacOS M1 (can update install.sh downloaded on your own)

dist/hclq-macos-arm64:
  export GOOS=darwin GOARCH=arm64; $(BUILD_CMD) -o "$@"
  cd "$(@D)" && shasum -a 256 "$@" >> hclq-shasums

msarmadi avatar Sep 12 '23 12:09 msarmadi