piwheels / packages

Issue tracker for piwheels package issues
https://github.com/piwheels/packages/issues
20 stars 5 forks source link

Problem with package: google-crc32c #317

Closed jheaff1 closed 1 year ago

jheaff1 commented 1 year ago

Package name

google-crc32c

Package version

all

PyPI URL

https://pypi.org/project/google-crc32c/

piwheels URL

https://www.piwheels.org/project/google-crc32c/

Python version

I am the maintainer

More information

Hi,

The google_crc32c package should include a C extension library. If the wheel does not include this for whatever reason, the package will fall back to a pure python implementation of the crc32 algorithm, which is significantly slower.

The piwheels build fails to build the C extension. The log contains the following error:

2021-10-05T23:02:34,432   running build_ext
2021-10-05T23:02:34,437   building 'google_crc32c._crc32c' extension
2021-10-05T23:02:34,438   creating build/temp.linux-armv7l-3.7
2021-10-05T23:02:34,439   creating build/temp.linux-armv7l-3.7/src
2021-10-05T23:02:34,439   creating build/temp.linux-armv7l-3.7/src/google_crc32c
2021-10-05T23:02:34,440   arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c src/google_crc32c/_crc32c.c -o build/temp.linux-armv7l-3.7/src/google_crc32c/_crc32c.o
2021-10-05T23:02:34,839   src/google_crc32c/_crc32c.c:3:10: fatal error: crc32c/crc32c.h: No such file or directory
2021-10-05T23:02:34,840    #include <crc32c/crc32c.h>
2021-10-05T23:02:34,840             ^~~~~~~~~~~~~~~~~
2021-10-05T23:02:34,840   compilation terminated.
jheaff1 commented 1 year ago

I managed to successfully build the wheel locally, by first building and installing the google crc32 project. That said, the C extension of the wheel then relies on libcrc32c.so.1 being accessible at run-time.

bennuttall commented 1 year ago

If there's an apt package that provides crc32c.h then we can install it but if the only source is on github then we won't.

jheaff1 commented 1 year ago

Sadly there doesn’t seem to be an apt package that provides the required headers.