OctoPrint / OctoPrint-FirmwareUpdater

OctoPrint plugin for flashing pre-compiled firmware images to a 3D printer.
https://plugins.octoprint.org/plugins/firmwareupdater/
GNU Affero General Public License v3.0
351 stars 76 forks source link

Dependency Heatshrink seems to be deprecated with no Python 3 support #313

Closed charlesrg closed 2 years ago

charlesrg commented 2 years ago

Hardware Setup Armbian 21.05.0-trunk Focal

Describe the problem Cannot build dependency heatshrink for Marlin Binary Format.

Log Building wheel for heatshrink (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/octoprint/OctoPrint/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-insta ll-ja7czkgf/heatshrink_bd36f7454c5346aeb4ba8553b0789055/setup.py'"'"'; file='"'"'/tmp/pip-install-ja7czkgf/heatshrink_bd36f7454c5346a eb4ba8553b0789055/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'f rom setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, ' "'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ypb03snr cwd: /tmp/pip-install-ja7czkgf/heatshrink_bd36f7454c5346aeb4ba8553b0789055/ Complete output (138 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-3.8 creating build/lib.linux-aarch64-3.8/heatshrink copying heatshrink/init.py -> build/lib.linux-aarch64-3.8/heatshrink copying heatshrink/streams.py -> build/lib.linux-aarch64-3.8/heatshrink running build_ext building 'heatshrink.core' extension creating build/temp.linux-aarch64-3.8 creating build/temp.linux-aarch64-3.8/heatshrink creating build/temp.linux-aarch64-3.8/heatshrink/_heatshrink 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 -I . -I./heatshrink/_heatshrink -I/home/octoprint/OctoPrint/venv/include -I/usr/include/python3.8 -c heatshrink/core.c -o build/temp.linux-a arch64-3.8/heatshrink/core.o -std=c99 heatshrink/core.c: In function ‘pyx_pf_10heatshrink_4core_7Encoder_7fill’: heatshrink/core.c:4508:38: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ Py_ssize_t’ {aka ‘long int’} [-Wsign-compare] 4508 | pyx_t_5 = ((__pyx_v_total_sunk < pyx_t_9) != 0); | ^ heatshrink/core.c: In function ‘PyInit_core’: heatshrink/core.c:7279:3: warning: ‘tp_print’ is deprecated [-Wdeprecated-declarations] 7279 | pyx_type_10heatshrink_4core_Writer.tp_print = 0; | ^~~~~~~~
Additional context It might be good to use a different binary encoder as heatshrink has no updates for Python 3 support.

benlye commented 2 years ago

First, you can get around this problem if you follow the instructions to install a Python3 compatible version of Heatshrink.

Second, I'm not responsible for the Binary File Transfer protocol, or the library the plugin uses to interact with it. Changing Heatshrink for something else is outside of my scope.

charlesrg commented 2 years ago

Thank you . That definitely resolves. Appreciate the guidance on the Heatshrink workaround.

github-actions[bot] commented 2 years ago

This issue has been automatically locked because there was no further activity after it was closed. Please open a new issue for any related problems.