WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
253 stars 202 forks source link

Pre-commit hook fails at vale on Apple Silicon #4944

Open d3jawu opened 1 month ago

d3jawu commented 1 month ago

Description

The pre-commit hook (ov j lint) fails on Apple Silicon with the error:

vale.....................................................................Failed
- hook id: vale
- exit code: 255

WARNING: Project requires a python version of ==3.12.*, The virtualenv is being 
created for you as it cannot be matched to the right version.
INFO: python.use_venv is on, creating a virtualenv for this project...
Virtualenv is created successfully at /opt/pdm/venvs/.vale-mwrrb3Cm-3.12
Synchronizing working set with resolved packages: 1 to add, 0 to update, 0 to 
remove

  ✔ Install vale 3.7.1.0 successful

  0:00:03 🎉 All complete! 1/1
* vale not found. Downloading it...
* https://github.com/errata-ai/vale/releases/download/v3.7.1/vale_3.7.1_Linux_64-bit.tar.gz downloaded to /tmp/tmp37db7isa/vale.zip
* Copying /tmp/tmp37db7isa/vale_unzipped/vale to /opt/pdm/venvs/.vale-mwrrb3Cm-3.12/lib/python3.12/site-packages/vale/vale_bin
* vale extracted and copied to module path.
[qemu]: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
error: Recipe `run` failed on line 40 with exit code 255

Reproduction

Run ./ov j lint on Apple Silicon.

Screenshots

image

Environment

obulat commented 1 month ago

Thank you for reporting, @d3jawu ! I'm also getting an error with Vale with the same environment, but the error message is different:

vale.....................................................................Failed
- hook id: vale
- exit code: 255

All packages are synced to date, nothing to do.

  0:00:00 🎉 All complete! 0/0
INFO: PDM 2.18.1 is installed, while 2.18.2 is available.
Please run `pipx upgrade pdm` to upgrade.
Run `pdm config check_update false` to disable the check.
OrbStack ERROR: Dynamic loader not found: /lib64/ld-linux-x86-64.so.2

This usually means that you're running an x86 program on an arm64 OS without multi-arch libraries.
To fix this, you can:
  1. Use an Intel (amd64) container to run this program; or
  2. Install multi-arch libraries in this container.

This can also be caused by running a glibc executable in a musl distro (e.g. Alpine), or vice versa.

For more details and instructions, see https://go.orbstack.dev/multiarch
error: Recipe `run` failed on line 40 with exit code 255

renovate-config-validator................................................Passed

@dhruvkb , I think you've touched the ov setup for mac recently. Do you know what could be the problem here?