[pypy-issue] Issue #2688: PyPy3 is missing 'Py_hexdigits' for C extensions (Py3.3), breaking pyblake2 (pypy/pypy)

Michał Górny issues-reply at bitbucket.org
Thu Oct 26 10:51:40 EDT 2017


New issue 2688: PyPy3 is missing 'Py_hexdigits' for C extensions (Py3.3), breaking pyblake2
https://bitbucket.org/pypy/pypy/issues/2688/pypy3-is-missing-py_hexdigits-for-c

Michał Górny:

```
$ pypy3 --version
Python 3.5.3 (d72f9800a42b46a8056951b1da2426d2c2d8d502, Oct 08 2017, 10:51:34)
[PyPy 5.9.0-beta0 with GCC 5.4.0]
```

pyblake2 is using `Py_hexdigits` in the C extension when the Python version >= 3.3. However, PyPy3 seems to be missing this and so the build fails:

```
$ git clone https://github.com/dchest/pyblake2
$ cd pyblake2
$ pypy3 setup.py build
running build
running build_ext
building 'pyblake2' extension
cc -pthread -fPIC -DBLAKE2_COMPRESS_SSE2=1 -I/usr/lib64/pypy3/include -c pyblake2module.c -o build/temp.linux-x86_64-3.5/pyblake2module.o
pyblake2module.c: In function 'tohex':
pyblake2module.c:124:20: error: 'Py_hexdigits' undeclared (first use in this function)
 # define hexdigits Py_hexdigits
                    ^
pyblake2module.c:131:24: note: in expansion of macro 'hexdigits'
         dst[i*2 + 0] = hexdigits[(src[i] >> 4) & 0x0f];
                        ^
pyblake2module.c:124:20: note: each undeclared identifier is reported only once for each function it appears in
 # define hexdigits Py_hexdigits
                    ^
pyblake2module.c:131:24: note: in expansion of macro 'hexdigits'
         dst[i*2 + 0] = hexdigits[(src[i] >> 4) & 0x0f];
                        ^
error: command 'cc' failed with exit status 1

```




More information about the pypy-issue mailing list