lablup / backend.ai

Backend.AI is a streamlined, container-based computing cluster platform that hosts popular computing/ML frameworks and diverse programming languages, with pluggable heterogeneous accelerator support including CUDA GPU, ROCm GPU, TPU, IPU and other NPUs.
https://www.backend.ai
GNU Lesser General Public License v3.0
505 stars 150 forks source link

hiredis-py wheel build error with gcc 4.8.5 on CentOS 7 due to missing Python 3.10 wheels #609

Closed studioego closed 2 years ago

studioego commented 2 years ago

Describe the bug During Backend.AI installation, a c99 error occurred in Hiredis while proceeding with the wheel build of the pantsbuild.

on Cent OS7, gcc version is 4.8.5.

[dhsung@localhost backend.ai]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c vendor/hiredis/read.c -o build/temp.linux-x86_64-3.10/vendor/hiredis/read.o
  vendor/hiredis/read.c: In function ‘redisReaderFree’:
  vendor/hiredis/read.c:646:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
           for (int i = 0; i < r->tasks; i++) {
           ^
  vendor/hiredis/read.c:646:9: note: use option -std=c99 or -std=gnu99 to compile your code
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for hiredis
ERROR: Failed to build one or more wheels

To Reproduce

  1. Installing Backend.AI on CentOS 7
  2. See error

Expected behavior Successfully installed Backend.AI

Screenshots powershell_JvPf39pMHs

Below is full log for build error on CentOS 7.

00:08:46.07 [INFO] Completed: Building 7 requirements for requirements.pex from the python-kernel.lock resolve: async_timeout~=3.0, attrs~=21.2, janus~=0.6.1, jupyter-client~=6.1, msgpack~=1.0, pyzmq~=22.2, uvloop~=0.16
00:09:07.59 [INFO] Completed: Get interpreter version
00:09:07.81 [INFO] configured target platform (src/ai/backend/runner:platform-binaries) = linux_x86_64
00:10:31.67 [INFO] Completed: Building 79 requirements for requirements.pex from the python.lock resolve: Jinja2~=3.1.2, PyJWT~=2.0, PyYAML~=6.0, SQLAlchemy[postgresql_asyncpg]~=1.4.39, aiodataloader-ng~=0.2.1, aiodns>=3.0, aiodoc... (1337 characters truncated)
00:10:31.68 [ERROR] 1 Exception encountered:

  ProcessExecutionFailure: Process 'Building 79 requirements for requirements.pex from the python.lock resolve: Jinja2~=3.1.2, PyJWT~=2.0, PyYAML~=6.0, SQLAlchemy[postgresql_asyncpg]~=1.4.39, aiodataloader-ng~=0.2.1, aiodns>=3.0, aiodocker~=0.21.0, aiofiles~=0.8.0, aiohttp_cors~=0.7, aiohttp_session[aioredis]~=2.11, aiohttp_sse>=2.0, aiohttp~=3.8.1, aiomonitor~=0.4.5, aioredis[hiredis]~=2.0.1, aiosqlite~=0.17.0, aiotools~=1.5.9, aiotusclient~=0.1.4, alembic~=1.8.1, appdirs~=1.4.4, async_timeout~=4.0, asyncudp>=0.4, attrs>=20.3, backend.ai-krunner-alpine~=3.3, backend.ai-krunner-static-gnu~=2.0, cachetools~=5.2.0, callosum~=0.9.10, click>=7.1.2, colorama>=0.4.4, coloredlogs~=15.0, cryptography>=2.8, etcetra~=0.1.8, faker~=13.12.0, graphene~=2.1.9, humanize>=3.1.0, inquirer~=2.9.2, janus>=0.6.1, kubernetes-asyncio~=9.1.0, kubernetes~=10.0.0, lark-parser~=0.11.3, more-itertools~=8.13.0, msgpack>=1.0.0, netifaces~=0.11.0, packaging>=21.3, passlib[bcrypt]>=1.7.4, pexpect~=4.8, psutil~=5.9.1, psycopg2-binary>=2.8.4, pycryptodome>=3.14.1, pytest-dependency>=0.5.1, pytest~=7.1, python-dateutil>=2.8, python-json-logger>=2.0.1, python-snappy~=0.6.0, pyzmq~=23.2.0, redis[hiredis]~=4.3.4, rich~=12.2, setproctitle~=1.2.2, tabulate~=0.8.9, tblib~=1.7, tenacity>=8.0, tomli~=2.0.1, tomlkit~=0.11.1, tqdm>=4.61, trafaret~=2.1, typeguard~=2.10, types-Jinja2, types-PyYAML, types-aiofiles, types-cachetools, types-click, types-python-dateutil, types-redis, types-setuptools, types-six, types-tabulate, typing_extensions~=4.3, uvloop>=0.16, yarl>=1.7, zipstream-new~=1.1.8' failed with exit code 1.
stdout:

stderr:
Traceback (most recent call last):
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 541, in execute_parallel
    yield spawn_result.spawned_job.await_result()
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 220, in await_result
    job.wait()
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 79, in wait
    self._check_returncode(stderr)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 148, in _check_returncode
    raise self.create_error(msg, stderr=stderr)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 129, in create_error
    raise self.Error(
pex.jobs.Job.Error: Executing /home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/bin/python -sE /home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -q --cache-dir /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache wheel --no-deps --wheel-dir /home/dhsung/.cache/pants/named_caches/pex_root/built_wheels/sdists/hiredis-2.0.0.tar.gz/81d6d8e39695f2c37954d1011c0480ef7cf444d4e3ae24bc5e89ee5de360139a/cp310-cp310.46b29443f11e415cb8721e9deb9f21a6 /home/dhsung/.cache/pants/named_caches/pex_root/downloads/81d6d8e39695f2c37954d1011c0480ef7cf444d4e3ae24bc5e89ee5de360139a/hiredis-2.0.0.tar.gz --index-url https://pypi.org/simple/ --extra-index-url https://dist.backend.ai/pypi/simple/ --retries 5 --timeout 15 failed with 1
STDERR:
  ERROR: Command errored out with exit status 1:
   command: /home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/setup.py'"'"'; __file__='"'"'/home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-wheel-8l10vdvz
       cwd: /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/
  Complete output (28 lines):
  /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    import sys, imp, os, glob, io
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.10
  creating build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/__init__.py -> build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/version.py -> build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/hiredis.pyi -> build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/py.typed -> build/lib.linux-x86_64-3.10/hiredis
  running build_ext
  building 'hiredis.hiredis' extension
  creating build/temp.linux-x86_64-3.10
  creating build/temp.linux-x86_64-3.10/src
  creating build/temp.linux-x86_64-3.10/vendor
  creating build/temp.linux-x86_64-3.10/vendor/hiredis
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c src/hiredis.c -o build/temp.linux-x86_64-3.10/src/hiredis.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c src/reader.c -o build/temp.linux-x86_64-3.10/src/reader.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c vendor/hiredis/alloc.c -o build/temp.linux-x86_64-3.10/vendor/hiredis/alloc.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c vendor/hiredis/read.c -o build/temp.linux-x86_64-3.10/vendor/hiredis/read.o
  vendor/hiredis/read.c: In function ‘redisReaderFree’:
  vendor/hiredis/read.c:646:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
           for (int i = 0; i < r->tasks; i++) {
           ^
  vendor/hiredis/read.c:646:9: note: use option -std=c99 or -std=gnu99 to compile your code
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for hiredis
ERROR: Failed to build one or more wheels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dhsung/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/dhsung/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/__main__.py", line 103, in <module>
    bootstrap_pex(__entry_point__, execute=__execute__, venv_dir=__venv_dir__)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/.bootstrap/pex/pex_bootstrapper.py", line 601, in bootstrap_pex
    pex.PEX(entry_point).execute()
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/.bootstrap/pex/pex.py", line 528, in execute
    sys.exit(self._wrap_coverage(self._wrap_profiling, self._execute))
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/.bootstrap/pex/pex.py", line 435, in _wrap_coverage
    return runner(*args)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/.bootstrap/pex/pex.py", line 466, in _wrap_profiling
    return runner(*args)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/.bootstrap/pex/pex.py", line 555, in _execute
    return self.execute_entry(
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/.bootstrap/pex/pex.py", line 737, in execute_entry
    return self.execute_entry_point(entry_point)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/unzipped_pexes/dfe5a70dd34dac2e7fbc472cbc8a8b4ecc5a9c1a/.bootstrap/pex/pex.py", line 755, in execute_entry_point
    return runner()
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/bin/pex.py", line 775, in main
    catch(
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/result.py", line 103, in catch
    return func(*args, **kwargs)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/bin/pex.py", line 798, in do_main
    pex_builder = build_pex(
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/bin/pex.py", line 641, in build_pex
    resolve_from_lock(
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 405, in resolve_from_lock
    installed_distributions = build_and_install_request.install_distributions(
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/resolver.py", line 634, in install_distributions
    build_results = self._wheel_builder.build_wheels(
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/resolver.py", line 535, in build_wheels
    for build_result in execute_parallel(
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 522, in execute_parallel
    raise error
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 544, in execute_parallel
    je_result = handler.handle_job_error(spawn_result.item, e)
  File "/home/dhsung/.cache/pants/named_caches/pex_root/installed_wheels/0a7db6e5ee325f3fa984fc8c15300400fa1c62554af22dd1d811f14f9ed52798/pex-2.1.99-py2.py3-none-any.whl/pex/jobs.py", line 423, in handle_job_error
    raise self._raise_type(self.job_error_message(item, job_error))
pex.resolve.resolvers.Untranslatable: pid 8987 -> /home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/bin/python -sE /home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -q --cache-dir /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache wheel --no-deps --wheel-dir /home/dhsung/.cache/pants/named_caches/pex_root/built_wheels/sdists/hiredis-2.0.0.tar.gz/81d6d8e39695f2c37954d1011c0480ef7cf444d4e3ae24bc5e89ee5de360139a/cp310-cp310.46b29443f11e415cb8721e9deb9f21a6 /home/dhsung/.cache/pants/named_caches/pex_root/downloads/81d6d8e39695f2c37954d1011c0480ef7cf444d4e3ae24bc5e89ee5de360139a/hiredis-2.0.0.tar.gz --index-url https://pypi.org/simple/ --extra-index-url https://dist.backend.ai/pypi/simple/ --retries 5 --timeout 15 exited with 1 and STDERR:
  ERROR: Command errored out with exit status 1:
   command: /home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/setup.py'"'"'; __file__='"'"'/home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-wheel-8l10vdvz
       cwd: /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/
  Complete output (28 lines):
  /home/dhsung/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-req-build-4lozva7v/setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    import sys, imp, os, glob, io
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.10
  creating build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/__init__.py -> build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/version.py -> build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/hiredis.pyi -> build/lib.linux-x86_64-3.10/hiredis
  copying hiredis/py.typed -> build/lib.linux-x86_64-3.10/hiredis
  running build_ext
  building 'hiredis.hiredis' extension
  creating build/temp.linux-x86_64-3.10
  creating build/temp.linux-x86_64-3.10/src
  creating build/temp.linux-x86_64-3.10/vendor
  creating build/temp.linux-x86_64-3.10/vendor/hiredis
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c src/hiredis.c -o build/temp.linux-x86_64-3.10/src/hiredis.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c src/reader.c -o build/temp.linux-x86_64-3.10/src/reader.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c vendor/hiredis/alloc.c -o build/temp.linux-x86_64-3.10/vendor/hiredis/alloc.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/openssl11 -I/usr/include/openssl11 -fPIC -Ivendor -I/home/dhsung/.cache/pants/named_caches/pex_root/venvs/8319bbb11ce5c15b9ed667feb4c6427d31617cf3/5bf7713a1151cad07d23c23a677807ba4604ef8a/include -I/home/dhsung/.pyenv/versions/3.10.5/include/python3.10 -c vendor/hiredis/read.c -o build/temp.linux-x86_64-3.10/vendor/hiredis/read.o
  vendor/hiredis/read.c: In function ‘redisReaderFree’:
  vendor/hiredis/read.c:646:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
           for (int i = 0; i < r->tasks; i++) {
           ^
  vendor/hiredis/read.c:646:9: note: use option -std=c99 or -std=gnu99 to compile your code
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for hiredis
ERROR: Failed to build one or more wheels

Use `--no-process-cleanup` to preserve process chroots for inspection.

[dhsung@localhost backend.ai]$

Server:

Additional context CentOS 7.9 uses gcc version 4.8.5

achimnol commented 2 years ago

This is unrelated to Pants. hiredis-py is just missing Python 3.10 wheels and triggering incompatible source builds on CentOS 7.

The proper fix is either:

achimnol commented 2 years ago

Note that CentOS 7 is not our primary target platform as it uses too old kernel that does not support NSPid mapping, which is crucial for our enterprise CUDA plugin. Though, the open source edition may still run without that particular feature, and it is still good to have a prebuilt wheel for Python 3.10.

studioego commented 2 years ago

I found the issue, "New release for cp3.10 is not on pypi " on hiredis-py repo's open issue. https://github.com/redis/hiredis-py/issues/121

I think if We're going to solve it temporarily quickly, try to build our own Python 3.10 wheel with manylinux1 target and upload it to https://dist.backend.ai/pypi/simple

studioego commented 2 years ago

I made the hiredis-2.0.0-cp310-cp310-linux_x86_64.whl file for hiredis-py . How to make Python 3.10 whell with manylinux1 target

kyujin-cho commented 2 years ago

FYI @studioego : I've just added Contributing Document under lablup/backend.ai-oven.

studioego commented 2 years ago

@kyujin-cho , @achimnol I sent the hiredis-2.0-cp310 PR under lablup/backend.ai-oven https://github.com/lablup/backend.ai-oven/pull/5

studioego commented 2 years ago

Installed Backend.AI on CentOS 7 image

studioego commented 2 years ago

Resolved the issue on CentOS7. As a result, I close the issue. WindowsTerminal_EAmvgeIXOG