Open plix1014 opened 10 months ago
Build error with FROM python:3-alpine
FROM python:3-alpine
However, successful build with FROM python:3.9-alpine
FROM python:3.9-alpine
see build error:
57.02 Building wheels for collected packages: IPy, aiohttp, maxminddb, frozenlist, multidict, yarl 57.02 Building wheel for IPy (setup.py): started 57.49 Building wheel for IPy (setup.py): finished with status 'done' 57.49 Created wheel for IPy: filename=IPy-1.1-py3-none-any.whl size=19438 sha256=7fe37c23432bb7502cd1b012f2c612e535dc791a3f6780234616b70030b2fbad 57.49 Stored in directory: /tmp/pip-ephem-wheel-cache-aoavfkhg/wheels/d3/66/dc/bf9e1a4b521b61e56e42c0e782bd09356edc50a605857f6e84 57.50 Building wheel for aiohttp (pyproject.toml): started 58.19 Building wheel for aiohttp (pyproject.toml): finished with status 'error' 58.21 error: subprocess-exited-with-error 58.21 58.21 × Building wheel for aiohttp (pyproject.toml) did not run successfully. 58.21 │ exit code: 1 58.21 ╰─> [160 lines of output] 58.21 ********************* 58.21 * Accelerated build * 58.21 ********************* 58.21 running bdist_wheel 58.21 running build 58.21 running build_py 58.21 creating build 58.21 creating build/lib.linux-x86_64-cpython-312 58.21 creating build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_response.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/resolver.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_ws.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/client_proto.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/typedefs.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_app.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/streams.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/log.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/http_websocket.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/connector.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/payload.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_log.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_exceptions.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/pytest_plugin.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/tracing.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/helpers.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/http_exceptions.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_server.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_urldispatcher.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/client.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/abc.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/formdata.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/client_exceptions.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/tcp_helpers.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/client_ws.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_middlewares.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/client_reqrep.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_routedef.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/multipart.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_runner.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/base_protocol.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/http.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/http_parser.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/cookiejar.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_request.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/__init__.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/hdrs.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/test_utils.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/worker.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_fileresponse.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/payload_streamer.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/http_writer.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/locks.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/web_protocol.py -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 running egg_info 58.21 writing aiohttp.egg-info/PKG-INFO 58.21 writing dependency_links to aiohttp.egg-info/dependency_links.txt 58.21 writing requirements to aiohttp.egg-info/requires.txt 58.21 writing top-level names to aiohttp.egg-info/top_level.txt 58.21 reading manifest file 'aiohttp.egg-info/SOURCES.txt' 58.21 reading manifest template 'MANIFEST.in' 58.21 warning: no files found matching 'aiohttp' anywhere in distribution 58.21 warning: no previously-included files matching '*.pyc' found anywhere in distribution 58.21 warning: no previously-included files matching '*.pyd' found anywhere in distribution 58.21 warning: no previously-included files matching '*.so' found anywhere in distribution 58.21 warning: no previously-included files matching '*.lib' found anywhere in distribution 58.21 warning: no previously-included files matching '*.dll' found anywhere in distribution 58.21 warning: no previously-included files matching '*.a' found anywhere in distribution 58.21 warning: no previously-included files matching '*.obj' found anywhere in distribution 58.21 warning: no previously-included files found matching 'aiohttp/*.html' 58.21 no previously-included directories found matching 'docs/_build' 58.21 adding license file 'LICENSE.txt' 58.21 writing manifest file 'aiohttp.egg-info/SOURCES.txt' 58.21 copying aiohttp/_cparser.pxd -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/_find_header.pxd -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/_headers.pxi -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/_helpers.pyi -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/_helpers.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/_http_parser.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/_http_writer.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/_websocket.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 copying aiohttp/py.typed -> build/lib.linux-x86_64-cpython-312/aiohttp 58.21 creating build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/_cparser.pxd.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/_find_header.pxd.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/_helpers.pyi.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/_helpers.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/_http_parser.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/_http_writer.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/_websocket.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 copying aiohttp/.hash/hdrs.py.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 58.21 running build_ext 58.21 building 'aiohttp._websocket' extension 58.21 creating build/temp.linux-x86_64-cpython-312 58.21 creating build/temp.linux-x86_64-cpython-312/aiohttp 58.21 gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/usr/local/include/python3.12 -c aiohttp/_websocket.c -o build/temp.linux-x86_64-cpython-312/aiohttp/_websocket.o 58.21 aiohttp/_websocket.c: In function '__pyx_pf_7aiohttp_10_websocket__websocket_mask_cython': 58.21 aiohttp/_websocket.c:1475:3: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations] 58.21 1475 | if (unlikely(!Py_OptimizeFlag)) { 58.21 | ^~ 58.21 In file included from /usr/local/include/python3.12/Python.h:48, 58.21 from aiohttp/_websocket.c:6: 58.21 /usr/local/include/python3.12/cpython/pydebug.h:13:37: note: declared here 58.21 13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag; 58.21 | ^~~~~~~~~~~~~~~ 58.21 aiohttp/_websocket.c: In function '__Pyx_get_tp_dict_version': 58.21 aiohttp/_websocket.c:2680:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 58.21 2680 | return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; 58.21 | ^~~~~~ 58.21 In file included from /usr/local/include/python3.12/dictobject.h:90, 58.21 from /usr/local/include/python3.12/Python.h:61: 58.21 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 58.21 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 58.21 | ^~~~~~~~~~~~~~ 58.21 aiohttp/_websocket.c: In function '__Pyx_get_object_dict_version': 58.21 aiohttp/_websocket.c:2692:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 58.21 2692 | return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; 58.21 | ^~~~~~ 58.21 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 58.21 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 58.21 | ^~~~~~~~~~~~~~ 58.21 aiohttp/_websocket.c: In function '__Pyx_object_dict_version_matches': 58.21 aiohttp/_websocket.c:2696:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 58.21 2696 | if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) 58.21 | ^~ 58.21 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 58.21 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 58.21 | ^~~~~~~~~~~~~~ 58.21 aiohttp/_websocket.c: In function '__Pyx_CLineForTraceback': 58.21 aiohttp/_websocket.c:2741:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 58.21 2741 | __PYX_PY_DICT_LOOKUP_IF_MODIFIED( 58.21 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 58.21 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 58.21 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 58.21 | ^~~~~~~~~~~~~~ 58.21 aiohttp/_websocket.c:2741:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 58.21 2741 | __PYX_PY_DICT_LOOKUP_IF_MODIFIED( 58.21 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 58.21 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 58.21 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 58.21 | ^~~~~~~~~~~~~~ 58.21 aiohttp/_websocket.c: In function '__Pyx_PyInt_As_long': 58.21 aiohttp/_websocket.c:3042:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 58.21 3042 | const digit* digits = ((PyLongObject*)x)->ob_digit; 58.21 | ^~ 58.21 aiohttp/_websocket.c:3097:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 58.21 3097 | const digit* digits = ((PyLongObject*)x)->ob_digit; 58.21 | ^~ 58.21 aiohttp/_websocket.c: In function '__Pyx_PyInt_As_int': 58.21 aiohttp/_websocket.c:3238:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 58.21 3238 | const digit* digits = ((PyLongObject*)x)->ob_digit; 58.21 | ^~ 58.21 aiohttp/_websocket.c:3293:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 58.21 3293 | const digit* digits = ((PyLongObject*)x)->ob_digit; 58.21 | ^~ 58.21 aiohttp/_websocket.c: In function '__Pyx_PyIndex_AsSsize_t': 58.21 aiohttp/_websocket.c:3744:45: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 58.21 3744 | const digit* digits = ((PyLongObject*)b)->ob_digit; 58.21 | ^~ 58.21 error: command '/usr/bin/gcc' failed with exit code 1 58.21 [end of output] 58.21 58.21 note: This error originates from a subprocess, and is likely not a problem with pip. 58.21 ERROR: Failed building wheel for aiohttp 58.21 Building wheel for maxminddb (pyproject.toml): started 58.79 Building wheel for maxminddb (pyproject.toml): finished with status 'done' 58.79 Created wheel for maxminddb: filename=maxminddb-2.4.0-py2.py3-none-any.whl size=16401 sha256=7dfb6488a473f0ae1ef0d60f2730801ce29f19d1f8e252442cd2c0dfe71fd810 58.79 Stored in directory: /tmp/pip-ephem-wheel-cache-aoavfkhg/wheels/37/5a/39/34619b85ae625025c06a03136df11a0e5b3d7bc63cc50d9023 58.80 Building wheel for frozenlist (pyproject.toml): started 65.66 Building wheel for frozenlist (pyproject.toml): finished with status 'done' 65.66 Created wheel for frozenlist: filename=frozenlist-1.4.0-cp312-cp312-linux_x86_64.whl size=260932 sha256=7c6c5005e70b2c5815bd113e0c1a8d72aa70271b01f8913245e5ee2b221819fb 65.66 Stored in directory: /tmp/pip-ephem-wheel-cache-aoavfkhg/wheels/f1/9c/94/9386cb0ea511a93226456388d41d35f1c24ba15a62ffd7b1ef 65.67 Building wheel for multidict (pyproject.toml): started 68.23 Building wheel for multidict (pyproject.toml): finished with status 'done' 68.24 Created wheel for multidict: filename=multidict-6.0.4-cp312-cp312-linux_x86_64.whl size=115558 sha256=d07de968430ed2ec14f854f68b69f26410f5e02191fbe4e99a0ae7ccf5805270 68.24 Stored in directory: /tmp/pip-ephem-wheel-cache-aoavfkhg/wheels/f6/d8/ff/3c14a64b8f2ab1aa94ba2888f5a988be6ab446ec5c8d1a82da 68.24 Building wheel for yarl (pyproject.toml): started 75.92 Building wheel for yarl (pyproject.toml): finished with status 'done' 75.92 Created wheel for yarl: filename=yarl-1.9.2-cp312-cp312-linux_x86_64.whl size=285603 sha256=0062ee0f595ab08d92adc3ec12e0731c68f789422a4618a1bf707f6f896ec1d4 75.92 Stored in directory: /tmp/pip-ephem-wheel-cache-aoavfkhg/wheels/84/e3/6a/7d0fa1abee8e4aa39922b5bd54689b4b5e4269b2821f482a32 75.94 Successfully built IPy maxminddb frozenlist multidict yarl 75.94 Failed to build aiohttp 75.94 ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects 76.47 76.47 [notice] A new release of pip is available: 23.2.1 -> 23.3.1 76.47 [notice] To update, run: pip install --upgrade pip ------ Dockerfile:6 -------------------- 5 | COPY requirements.txt ./ 6 | >>> RUN apk add --no-cache gcc musl-dev && \ 7 | >>> pip install --no-cache-dir -r requirements.txt 8 | -------------------- ERROR: failed to solve: process "/bin/sh -c apk add --no-cache gcc musl-dev && pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
I've managed to make it work adding the line aiohttp==3.9.0b0 to requirements.txt
Build error with
FROM python:3-alpine
However, successful build with
FROM python:3.9-alpine
see build error: