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

Also build +test universal wheels on macOS ARM M1 chips #162

Open
pombredanne opened this issue Feb 21, 2022 · 4 comments
Open

Also build +test universal wheels on macOS ARM M1 chips #162

pombredanne opened this issue Feb 21, 2022 · 4 comments

Comments

@pombredanne
Copy link
Collaborator

Since ARM is Apple's new default, it would make sense to ensure things work on ARM M1 chips

@rnjudge
Copy link

rnjudge commented Dec 8, 2022

+1... I'm having trouble installing pyahocorasick on my Fusion Ubuntu machine running on Mac M1 ARM sillicon. This is a blocker to installing scancode @pombredanne.

  Running setup.py install for pyahocorasick ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pyahocorasick did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      running install
      /home/rose/testenv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      building 'ahocorasick' extension
      creating build
      creating build/temp.linux-aarch64-3.10
      aarch64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DAHOCORASICK_UNICODE= -I/home/rose/testenv/include -I/usr/include/python3.10 -c pyahocorasick.c -o build/temp.linux-aarch64-3.10/pyahocorasick.o
      error: command 'aarch64-linux-gnu-gcc' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyahocorasick

note: This is an issue with the package mentioned above, not pip.

@pombredanne
Copy link
Collaborator Author

@rnjudge I want to make this work: do you know if there is a free CI where I could run or test a macOS ARM builds?
@heliocastro you are suffering too.

What could we do? Is there something to do to help? a Ci using QEMU? or someone sponsoring the expenses to run a macOS ARM CI?

@pombredanne
Copy link
Collaborator Author

NB: the latest 2.0.0 will have a universal build for macOS..... the wheels may run on your machine. Fingers crossed.

@pombredanne
Copy link
Collaborator Author

https://pypi.org/project/pyahocorasick/2.0.0/ is out ... @rnjudge @heliocastro do you mind testing this with this: note that this WILL NOT run out of the box on ARM Linux, but it should run natively on macOS ARM.
Start with a clean ARM shell (not under rosetta):

mkdir venv 
wget -O venv/virtualenv.pyz https://bootstrap.pypa.io/virtualenv/virtualenv.pyz
python3 venv/virtualenv.pyz --never-download --seeder pip  \
  --pip embed --setuptools embed --wheel embed \
  --no-vcs-ignore --no-periodic-update ./venv
source venv/bin/activate
pip install pyahocorasick==2.0.0 pytest
git clone https://github.com/WojciechMula/pyahocorasick
cd pyahocorasick
pytest -vvs 

Thanks!

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

2 participants