mason.nvim icon indicating copy to clipboard operation
mason.nvim copied to clipboard

bad CPU type in executable: selene

Open jackblackevo opened this issue 10 months ago • 5 comments

I've searched open issues for similar requests

  • [X] Yes

I've recently downloaded the latest plugin version of mason.nvim

  • [X] Yes

Problem description

Hi, I am using mason.nvim on macOS 14.4.1 (build 23E224, MacBook Pro 16-inch, 2019, Intel Core i7), and every time I open a Lua file, I receive the following warning message. However, there is no such issue on Ubuntu (WSL 2):

[null-ls] failed to run generator: ...l/share/astronvim/lazy/none-ls.nvim/lua/null-ls/loop.lua:165: failed to spawn command selene: Unknown system error -86: Unknown system error -86

The result of running :checkhealth null-ls is as follows:

null-ls: require("null-ls.health").check()

- OK stylua: the command "stylua" is executable.
- OK selene: the command "selene" is executable.
- OK prettier: the command "prettier" is executable.

I also tried :!selene, and got the following result:

zsh:1: bad CPU type in executable: selene

It seems that mason.nvim has installed a version of Selene that is not compatible with Intel Mac. How can I resolve this? Thank you very much!

Expected behavior

There were no warning messages, and selene is running normally.

Affected packages

selene

Mason output

No response

Installation log

[INFO  四  5/ 2 13:24:36 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=js-debug-adapter) {}
[INFO  四  5/ 2 13:24:36 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=debugpy) {}
[INFO  四  5/ 2 13:24:36 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=stylua) {}
[INFO  四  5/ 2 13:24:36 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=selene) {}
[INFO  四  5/ 2 13:24:39 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=prettierd) {}
[INFO  四  5/ 2 13:24:39 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=js-debug-adapter)
[INFO  四  5/ 2 13:24:39 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=prettier) {}
[INFO  四  5/ 2 13:24:39 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=stylua)
[INFO  四  5/ 2 13:24:39 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=lua-language-server) {}
[INFO  四  5/ 2 13:24:39 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=selene)
[INFO  四  5/ 2 13:24:44 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=json-lsp) {}
[INFO  四  5/ 2 13:24:44 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=lua-language-server)
[INFO  四  5/ 2 13:24:45 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=typescript-language-server) {}
[INFO  四  5/ 2 13:24:45 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=prettier)
[INFO  四  5/ 2 13:24:50 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=eslint-lsp) {}
[INFO  四  5/ 2 13:24:50 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=prettierd)
[INFO  四  5/ 2 13:24:51 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=deno) {}
[INFO  四  5/ 2 13:24:51 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=typescript-language-server)
[INFO  四  5/ 2 13:24:52 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=debugpy)
[INFO  四  5/ 2 13:24:54 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=json-lsp)
[INFO  四  5/ 2 13:24:56 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=deno)
[INFO  四  5/ 2 13:24:57 2024] ...ronvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=eslint-lsp)

Neovim version (>= 0.7)

NVIM v0.9.5 Build type: Release LuaJIT 2.1.1713773202

Operating system/version

Darwin MBP 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64 x86_64

Healthcheck

mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.10.0
- OK PATH: prepend
- OK Providers: 
  mason.providers.registry-api
  mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2024-05-02-hon-garlic` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 1.24.5,於 darwin23.2.0 上編譯。`
- OK curl: `curl 8.4.0 (x86_64-apple-darwin23.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0`
- OK gzip: `Apple gzip 430.100.5`
- OK tar: `bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 `
- OK bash: `GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING cargo: not available
  - ADVICE:
    - spawn: cargo failed with exit code - and signal -. cargo is not executable
- OK Ruby: `ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin23]`
- OK node: `v18.20.1`
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code 1 and signal 0. The operation couldn’t be completed. Unable to locate a Java Runtime.
      Please visit http://www.java.com for information on installing Java.
      
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- WARNING java: not available
  - ADVICE:
    - spawn: java failed with exit code 1 and signal 0. The operation couldn’t be completed. Unable to locate a Java Runtime.
      Please visit http://www.java.com for information on installing Java.
      
- OK python: `Python 3.12.3`
- WARNING luarocks: failed to parse version
  - ADVICE:
    - Error: ...cal/share/astronvim/lazy/mason.nvim/lua/mason/health.lua:214: attempt to compare number with nil
- OK RubyGem: `3.0.3.1`
- OK npm: `10.5.0`
- OK pip: `pip 24.0 from /usr/local/lib/python3.12/site-packages/pip (python 3.12)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 2. Remaining: 58. Limit: 60. Reset: 四  5/ 2 14:26:35 2024.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response

jackblackevo avatar May 02 '24 06:05 jackblackevo

I tried downloading selene-0.27.1-macos.zip and selene-light-0.27.1-macos.zip from the selene releases page. After extracting them, I encountered an error when trying to run them:

zsh: bad CPU type in executable: ./selene

And the source in the mason-registry also directly points to these files: https://github.com/mason-org/mason-registry/blob/6466ec413845bb306137749747dd7930d71bfe67/packages/selene/package.yaml

Driven by curiosity, I checked the script for selene on Homebrew: https://github.com/Homebrew/homebrew-core/blob/046673b5ca6f2afea2e4e0879f69f0ead8a50009/Formula/s/selene.rb

I discovered that Homebrew builds separate executables for Macs with different CPU types.

jackblackevo avatar May 03 '24 08:05 jackblackevo

Same situation here

lfilho avatar May 07 '24 23:05 lfilho

mamachanko avatar May 11 '24 15:05 mamachanko

we can use https://github.com/cargo-bins/cargo-quickinstall/releases/download/selene-0.27.1/selene-0.27.1-x86_64-apple-darwin.tar.gz for x86_64 arch macos

CandySunPlus avatar May 14 '24 08:05 CandySunPlus

Reported upstream https://github.com/Kampfkarren/selene/issues/600

mamachanko avatar May 19 '24 05:05 mamachanko