Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: bad cpu type for executables exa and jq #574

Closed
1 task done
rrpolanco opened this issue Sep 5, 2023 · 3 comments
Closed
1 task done

[bug]: bad cpu type for executables exa and jq #574

rrpolanco opened this issue Sep 5, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@rrpolanco
Copy link

What happened?

zinit is downloading the wrong binary for exa and jq.

Downloading jqlang/jq… (at label: jq…)


(Requesting `jq-osx-amd64'…)
############################################################################################################################################################################# 100.0%
[ziextract] Successfully extracted and assigned +x chmod to the file: jq-osx-amd64.
jq-osx-amd64 -> jq

Downloading ogham/exa… (at label: exa…)


(Requesting `exa-macos-x86_64-v0.10.1.zip'…)
############################################################################################################################################################################# 100.0%
[ziextract] Unpacking the files from: `exa-macos-x86_64-v0.10.1.zip'
Archive:  exa-macos-x86_64-v0.10.1.zip
  inflating: completions/exa.bash    
  inflating: completions/exa.zsh     
  inflating: completions/exa.fish    
  inflating: man/exa.1               
  inflating: man/exa_colors.5        
  inflating: bin/exa                 
[ziextract] Successfully extracted and assigned +x chmod to the file: bin/exa.
/Users/rafael/.local/share/zinit/polaris/man/man1/exa.1 -> /Users/rafael/.local/share/zinit/plugins/exa/man/exa.1
/Users/rafael/.local/share/zinit/polaris/man/man5/exa_colors.5 -> /Users/rafael/.local/share/zinit/plugins/exa/man/exa_colors.5
/Users/rafael/.local/share/zinit/completions/_exa -> /Users/rafael/.local/share/zinit/plugins/exa/completions/exa.zsh
.zinit-json-get-value:4: bad CPU type in executable: jq

Steps to reproduce

zinit wait lucid light-mode for \
  from'gh-r' \
  as'program' \
  pick'bin/exa' \
  atclone'ln -nsvf "$PWD/man/"*.1 "${ZINIT[MAN_DIR]}/man1"' \
  atclone'ln -nsvf "$PWD/man/"*.5 "${ZINIT[MAN_DIR]}/man5"' \
  atclone'ln -nsvf "$PWD/completions/exa.zsh" "${ZINIT[COMPLETIONS_DIR]}/_exa"' \
  atload'alias ls="exa --icons --time-style=iso --git --classify --color-scale --color=auto"' \
  atload'alias ll="exa --icons --time-style=iso --git --classify --color-scale --color=auto --long -i --extended"' \
  atload'alias tree="exa --icons --time-style=iso --git --classify --color-scale --color=auto --tree"' \
  id-as'auto' \
  @ogham/exa

zinit wait lucid light-mode for \
  from'gh-r' \
  as'program' \
  mv'jq-* -> jq' \
  id-as'auto' \
  @jqlang/jq

Relevant output

No response

Screenshots and recordings

No response

Operating System & Version

OS: darwin22.1.0 | Vendor: apple | Machine: arm | CPU: arm64 | Processor: arm | Hardware: arm64

Zsh version

zsh 5.9 (arm-apple-darwin22.1.0)

Terminal emulator

Terminal | xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rrpolanco rrpolanco added the bug Something isn't working label Sep 5, 2023
@rrpolanco
Copy link
Author

Upon close inspection, it turns out that for jq there is no arm64 binary for jq-1.6 (latest stable release):

Downloading jqlang/jq… (at label: jq…)
[gh-r] Error: bpick ice found no release assets. To fix, modify the bpick glob pattern *macos-arm*
[gh-r] Error: No GitHub release assets found for jq-1.6

Fixed it by bpicking the pre-release version of jq where macos-arm64 binary is published.

For exa I had to resort to using zinit-annex-rust to fix my issue since exa does not publish macos-arm64 binaries to github releases:

zinit ice rustup cargo'exa' as"command" pick"bin/exa"
zinit load zdharma-continuum/null

@vladdoster
Copy link
Member

vladdoster commented Oct 1, 2023

@rrpolanco,

Exa is unmaintained and the maintained fork is exa-community/eza. Unfortunately, it does not yet have macOS binaries (I'm working on a PR to add it as a build target).

You shouldn't have any issue using the x86_64 exa binary.

I use the follwing recipe (GitHub link):

zi aliases from'gh-r' lbin'!' light-mode nocompile for \
    atload"!(){setopt no_aliases;alias l='eza -blF';alias la='eza -abghilmu';alias ll='eza -al';alias ls='eza --git --group-directo
ries-first';}" \
    if'[[ $VENDOR != apple ]]' \
  @eza-community/eza \
    atload"!(){setopt no_aliases;alias l='exa -blF';alias la='exa -abghilmu';alias ll='exa -al';alias ls='exa --git --group-directo
ries-first';}" \
    if'[[ $VENDOR = apple ]]' \
  @ogham/exa

You can simplify your jq recipe by using the binary-symlink annex.

zi load @zdharma-continuum/zinit-annex-binary-symlink
zi from'gh-r' lbin'!' for @jqlang/jq

Note

Ignore the debug logging (set via export ZINIT[DEBUG]='1')

Screenshot 2023-10-01 at 7 39 07 PM

Screenshot 2023-10-01 at 7 54 50 PM

@vladdoster vladdoster reopened this Oct 1, 2023
@vladdoster
Copy link
Member

@rrpolanco,

Issue closed and locked due to lack of activity.
If you encounter this same issue, please open a new issue and refer to this closed one.

@zdharma-continuum zdharma-continuum locked and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants