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

Add ARM64 support #46

Open
odidev opened this issue Oct 28, 2020 · 2 comments
Open

Add ARM64 support #46

odidev opened this issue Oct 28, 2020 · 2 comments

Comments

@odidev
Copy link

odidev commented Oct 28, 2020

Hi,
I was trying to install pyhash package in arm64 machine using pip and it was failing with :

building 'smhasher' library
    creating build/temp.linux-aarch64-3.8/src/smhasher
    aarch64-linux-gnu-gcc -pthread -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 -c src/smhasher/MurmurHash1.cpp -o build/temp.linux-aarch64-3.8/src/smhasher/MurmurHash1.o -msse4.2 -maes -mavx -mavx2
    aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-msse4.2’
    aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-maes’
    aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mavx’
    aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mavx2’
    error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wfou3zbv/pyhash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wfou3zbv/pyhash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-676l0d07/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pyhash Check the logs for full command output.
<code>
I have tried building it locally with the changes mentioned in the following patches in main package and in subpackages : highwayhash,  smasher and  t1ha 
Now I am getting the following error while testing the code :

I have tried building it locally with the changes mentioned in the following patches in main package and in subpackages : highwayhash, smasher and t1ha
Now I am getting the following error while testing the code :

usr/local/lib/python3.8/dist-packages/pyhash/__init__.py:12: in <module>
    build_with_sse42 = _pyhash.build_with_sse42
E   AttributeError: module '_pyhash' has no attribute 'build_with_sse4

I have gone through https://pypi.org/project/pyhash/#files but I was unable to find the wheels for arm64 architecture.

Is there any plan of releasing the binaries for arm64 platform ?

@odidev
Copy link
Author

odidev commented Oct 30, 2020

Hi,

I am able to compile and import the pyhash package locally after disabling some of the functionalities in init.py for arm64 and the changes mentioned in previous conversation .

As pyhash is unable to detect some features on arm64 platform, I have disabled it.

Can you please check and let me know if it is ok to build the package by disabling above functionality for arm64?
If agreed, I will raise a PR by making above code changes generic for arm64 platform.

@flier flier mentioned this issue Oct 27, 2021
@Regestor
Copy link

This issue is still relevant for version 0.9.3, could you please tell me when a new version with this fix might be released, and is there anything I can do about it right now?

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