flier / pyfasthash

Python Non-cryptographic Hash Library
Apache License 2.0
281 stars 52 forks source link

HighwayHash doesn't work on Windows #39

Closed scott-8 closed 3 years ago

scott-8 commented 4 years ago

I get errors when trying to compile on Windows from HighwayHash. It looks like it's because uint256_t only defined when you're not using Windows.

Let me know what you want to do with this. It would be nice to fix it, but I'm perfectly fine excluding HighwayHash on Windows.

image

ranjita-naik commented 3 years ago

For me also , the installation was failing with the following errors on windows

C:\pyhash\pyfasthash\src\smhasher/mum.h(363): warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
C:\pyhash\pyfasthash\src\Highway.h(9): error C2065: 'uint256_t': undeclared identifier
C:\pyhash\pyfasthash\src\Highway.h(19): note: see reference to class template instantiation 'hightway_hash_t<T>' being compiled
C:\pyhash\pyfasthash\src\Highway.h(9): error C2923: 'Hasher': 'uint256_t' is not a valid template type argument for parameter 'S'
C:\pyhash\pyfasthash\src\Highway.h(10): error C2955: 'Hasher': use of class template requires template argument list
C:\pyhash\pyfasthash\src\Hash.h(104): note: see declaration of 'Hasher'
C:\pyhash\pyfasthash\src\Highway.h(12): error C2065: 'uint256_t': undeclared identifier
C:\pyhash\pyfasthash\src\Highway.h(12): error C2923: 'Hasher': 'uint256_t' is not a valid template type argument for parameter 'S'
C:\pyhash\pyfasthash\src\Highway.h(13): error C2955: 'Hasher': use of class template requires template argument list
C:\pyhash\pyfasthash\src\Hash.h(104): note: see declaration of 'Hasher'
C:\pyhash\pyfasthash\src\Highway.h(14): error C2955: 'Hasher': use of class template requires template argument list
C:\pyhash\pyfasthash\src\Hash.h(104): note: see declaration of 'Hasher'
src/Hash.cpp(114): error C2039: 'Export': is not a member of 'hightway_hash_t<uint64_t>'
C:\pyhash\pyfasthash\src\Highway.h(21): note: see declaration of 'hightway_hash_t<uint64_t>'
src/Hash.cpp(114): error C3861: 'Export': identifier not found

So, I disabled 'HighwayHash' on windows - https://github.com/ranjita-naik/pyfasthash/commit/3f2047aa51e77a209622fb5b6173116e1b8e4f6e (Do let me know if you'd like me to create a pull request with this change)

>pip install git+https://github.com/ranjita-naik/pyfasthash.git
>python
Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) 
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyhash
>>> quit()