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

aarch64 Linux Wheels #220

Open
polm opened this issue Aug 22, 2022 · 5 comments
Open

aarch64 Linux Wheels #220

polm opened this issue Aug 22, 2022 · 5 comments

Comments

@polm
Copy link

polm commented Aug 22, 2022

I noticed you don't have wheels for aarch64 for Linux. Do you have any plans to release such wheels?

Github Actions supports this architecture, so it looks like you can probably just make a small change to the current wheel building actions.

@eiennohito
Copy link
Collaborator

eiennohito commented Aug 22, 2022

Since the last version, we do universal2 builds for macOS which work both on aarch64 and x64 at the same time, which is better in my opinion. The bad thing is Github Actions does not support managed runners yet, only self-hosted ones and we neither have infrastructure nor manpower to host the runner ourselves. So while there are build, they are not tested on aarch64 at all and may stop working at any time. I run tests on my M1 Macbook from time to time, but until there is a hosted option for Github Actions runner, it will not move futher.

cf:

  1. GitHub Actions: Apple Silicon (M1) powered macOS runners (Public Beta) github/roadmap#528
  2. Support for VMs on Apple M1 actions/runner-images#2187

@polm
Copy link
Author

polm commented Aug 22, 2022

Thanks for the clarification, but I am asking specifically about Linux aarch64, not OSX. I know the managed OSX runners on Github Actions still aren't fully usable with Python, but with Linux they should work - I build aarch64 wheels for mecab-python3 and fugashi. For example here is the action for aarch64 wheels for fugashi.

I don't think Linux aarch64 is that common, but it does include Raspberry Pi users, and potentially people running Linux (or Docker) on M1 machines.

@eiennohito
Copy link
Collaborator

Ah, Linux aarch64. I completely missed Linux in your first post, apologies.

Pull request is welcome! Current linux build does PGO which is good for binary builds, but it probably should work on aarch64 as well with minor modifications.

@Rhtyme
Copy link

Rhtyme commented Feb 27, 2024

In my case, I just installed rust :

curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh
and then did :

source $HOME/.cargo/env
by following this tutorial.

Then I just did:

pip install --upgrade 'sudachipy>=0.6.8'

as it is instructed, and installed successfully!

@tsukumijima
Copy link

@eiennohito @mh-northlander Sudachipy 0.6.9, released this month, has the following error in Linux arm64 environment, and wheel cannot be built itself.

Defaulting to user installation because normal site-packages is not writeable
Collecting sudachipy
  Using cached sudachipy-0.6.9.tar.gz (164 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: sudachipy
  Building wheel for sudachipy (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for sudachipy (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-aarch64-cpython-311/sudachipy
      copying py_src/sudachipy/errors.py -> build/lib.linux-aarch64-cpython-311/sudachipy
      copying py_src/sudachipy/config.py -> build/lib.linux-aarch64-cpython-311/sudachipy
      copying py_src/sudachipy/command_line.py -> build/lib.linux-aarch64-cpython-311/sudachipy
      copying py_src/sudachipy/__init__.py -> build/lib.linux-aarch64-cpython-311/sudachipy
      creating build/lib.linux-aarch64-cpython-311/sudachipy/dictionary
      copying py_src/sudachipy/dictionary/__init__.py -> build/lib.linux-aarch64-cpython-311/sudachipy/dictionary
      creating build/lib.linux-aarch64-cpython-311/sudachipy/tokenizer
      copying py_src/sudachipy/tokenizer/__init__.py -> build/lib.linux-aarch64-cpython-311/sudachipy/tokenizer
      creating build/lib.linux-aarch64-cpython-311/sudachipy/morphemelist
      copying py_src/sudachipy/morphemelist/__init__.py -> build/lib.linux-aarch64-cpython-311/sudachipy/morphemelist
      creating build/lib.linux-aarch64-cpython-311/sudachipy/morpheme
      copying py_src/sudachipy/morpheme/__init__.py -> build/lib.linux-aarch64-cpython-311/sudachipy/morpheme
      copying py_src/sudachipy/sudachipy.pyi -> build/lib.linux-aarch64-cpython-311/sudachipy
      creating build/lib.linux-aarch64-cpython-311/sudachipy/resources
      copying py_src/sudachipy/resources/sudachi.json -> build/lib.linux-aarch64-cpython-311/sudachipy/resources
      copying py_src/sudachipy/resources/rewrite.def -> build/lib.linux-aarch64-cpython-311/sudachipy/resources
      copying py_src/sudachipy/resources/unk.def -> build/lib.linux-aarch64-cpython-311/sudachipy/resources
      copying py_src/sudachipy/resources/char.def -> build/lib.linux-aarch64-cpython-311/sudachipy/resources
      running build_ext
      running build_rust
      error: failed to parse manifest at `/tmp/pip-install-ieiaw84i/sudachipy_0062c8a5705040bc8034590b1e17d27a/Cargo.toml`

      Caused by:
        error inheriting `edition` from workspace root manifest's `workspace.package.edition`

      Caused by:
        failed to find a workspace root
      error: `cargo metadata --manifest-path Cargo.toml --format-version 1` failed with code 101
      -- Output captured from stdout:

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for sudachipy
Failed to build sudachipy
ERROR: Could not build wheels for sudachipy, which is required to install pyproject.toml-based projects

While I strongly urge support for Linux arm64 builds, I consider the current situation where Sudachi installation itself is not possible, at least on M1 Mac (Docker) and Raspberry Pi at present, to be very problematic.

If you explicitly specify Sudachipy 0.6.8 and install it, you should be fine, but there is no Python 3.13 support. And users have no way of knowing that they can downgrade to Sudachipy 0.6.8 to install it, and it is even trickier if it is built into a dependency.

Thank you all for your development.
Please provide a Linux arm64 build as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants