domainaware / parsedmarc

A Python package and CLI for parsing aggregate and forensic DMARC reports
https://domainaware.github.io/parsedmarc/
Apache License 2.0
962 stars 210 forks source link

docker build error #435

Closed Pascal76 closed 8 months ago

Pascal76 commented 9 months ago

Hello,

FYI I have an error on the build. I run: docker build --file Dockerfile_8.6.2 --tag parse_dmarc . Dockerfile_8.6.2 contains: FROM python:alpine

RUN apk add build-base libxml2-dev libxslt-dev \ && pip install parsedmarc==8.6.2

COPY entrypoint.sh /entrypoint.sh RUN chmod 755 /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]

Do you know how to fix that please ?

`14.67 Downloading PyJWT-2.8.0-py3-none-any.whl (22 kB) 14.73 Building wheels for collected packages: aiohttp, maxminddb, frozenlist, multidict, yarl 14.73 Building wheel for aiohttp (pyproject.toml): started 14.94 Building wheel for aiohttp (pyproject.toml): finished with status 'error' 14.95 error: subprocess-exited-with-error 14.95 14.95 × Building wheel for aiohttp (pyproject.toml) did not run successfully. 14.95 │ exit code: 1 14.95 ╰─> [160 lines of output] 14.95 14.95 Accelerated build 14.95 14.95 running bdist_wheel 14.95 running build 14.95 running build_py 14.95 creating build 14.95 creating build/lib.linux-x86_64-cpython-312 14.95 creating build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/init.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/abc.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/base_protocol.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/client.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/client_exceptions.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/client_proto.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/client_reqrep.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/client_ws.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/connector.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/cookiejar.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/formdata.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/hdrs.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/helpers.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/http.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/http_exceptions.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/http_parser.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/http_websocket.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/http_writer.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/locks.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/log.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/multipart.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/payload.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/payload_streamer.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/pytest_plugin.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/resolver.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/streams.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/tcp_helpers.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/test_utils.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/tracing.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/typedefs.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_app.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_exceptions.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_fileresponse.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_log.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_middlewares.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_protocol.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_request.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_response.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_routedef.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_runner.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_server.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_urldispatcher.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/web_ws.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/worker.py -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 running egg_info 14.95 writing aiohttp.egg-info/PKG-INFO 14.95 writing dependency_links to aiohttp.egg-info/dependency_links.txt 14.95 writing requirements to aiohttp.egg-info/requires.txt 14.95 writing top-level names to aiohttp.egg-info/top_level.txt 14.95 reading manifest file 'aiohttp.egg-info/SOURCES.txt' 14.95 reading manifest template 'MANIFEST.in' 14.95 warning: no files found matching 'aiohttp' anywhere in distribution 14.95 warning: no previously-included files matching '.pyc' found anywhere in distribution 14.95 warning: no previously-included files matching '.pyd' found anywhere in distribution 14.95 warning: no previously-included files matching '.so' found anywhere in distribution 14.95 warning: no previously-included files matching '.lib' found anywhere in distribution 14.95 warning: no previously-included files matching '.dll' found anywhere in distribution 14.95 warning: no previously-included files matching '.a' found anywhere in distribution 14.95 warning: no previously-included files matching '.obj' found anywhere in distribution 14.95 warning: no previously-included files found matching 'aiohttp/.html' 14.95 no previously-included directories found matching 'docs/_build' 14.95 adding license file 'LICENSE.txt' 14.95 writing manifest file 'aiohttp.egg-info/SOURCES.txt' 14.95 copying aiohttp/_cparser.pxd -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/_find_header.pxd -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/_headers.pxi -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/_helpers.pyi -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/_helpers.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/_http_parser.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/_http_writer.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/_websocket.pyx -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 copying aiohttp/py.typed -> build/lib.linux-x86_64-cpython-312/aiohttp 14.95 creating build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/_cparser.pxd.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/_find_header.pxd.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/_helpers.pyi.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/_helpers.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/_http_parser.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/_http_writer.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/_websocket.pyx.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 copying aiohttp/.hash/hdrs.py.hash -> build/lib.linux-x86_64-cpython-312/aiohttp/.hash 14.95 running build_ext 14.95 building 'aiohttp._websocket' extension 14.95 creating build/temp.linux-x86_64-cpython-312 14.95 creating build/temp.linux-x86_64-cpython-312/aiohttp 14.95 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 14.95 aiohttp/_websocket.c: In function 'pyx_pf_7aiohttp_10_websocketwebsocket_mask_cython': 14.95 aiohttp/_websocket.c:1475:3: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations] 14.95 1475 | if (unlikely(!Py_OptimizeFlag)) { 14.95 | ^~ 14.95 In file included from /usr/local/include/python3.12/Python.h:48, 14.95 from aiohttp/_websocket.c:6: 14.95 /usr/local/include/python3.12/cpython/pydebug.h:13:37: note: declared here 14.95 13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag; 14.95 | ^~~~~~~ 14.95 aiohttp/_websocket.c: In function 'Pyx_get_tp_dict_version': 14.95 aiohttp/_websocket.c:2680:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 14.95 2680 | return likely(dict) ? PYX_GET_DICT_VERSION(dict) : 0; 14.95 | ^~ 14.95 In file included from /usr/local/include/python3.12/dictobject.h:90, 14.95 from /usr/local/include/python3.12/Python.h:61: 14.95 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 14.95 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 14.95 | ^~~~~~ 14.95 aiohttp/_websocket.c: In function 'Pyx_get_object_dict_version': 14.95 aiohttp/_websocket.c:2692:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 14.95 2692 | return (dictptr && *dictptr) ? PYX_GET_DICT_VERSION(dictptr) : 0; 14.95 | ^~ 14.95 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 14.95 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 14.95 | ^~~~~~ 14.95 aiohttp/_websocket.c: In function '__Pyx_object_dict_version_matches': 14.95 aiohttp/_websocket.c:2696:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 14.95 2696 | if (unlikely(!dict) || unlikely(tp_dict_version != PYX_GET_DICT_VERSION(dict))) 14.95 | ^~ 14.95 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 14.95 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 14.95 | ^~~~~~ 14.95 aiohttp/_websocket.c: In function 'Pyx_CLineForTraceback': 14.95 aiohttp/_websocket.c:2741:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 14.95 2741 | PYX_PY_DICT_LOOKUP_IF_MODIFIED( 14.95 | ^~~~~~~~ 14.95 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 14.95 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 14.95 | ^~~~~~ 14.95 aiohttp/_websocket.c:2741:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] 14.95 2741 | PYX_PY_DICT_LOOKUP_IF_MODIFIED( 14.95 | ^~~~~~~~ 14.95 /usr/local/include/python3.12/cpython/dictobject.h:22:34: note: declared here 14.95 22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; 14.95 | ^~~~~~ 14.95 aiohttp/_websocket.c: In function '__Pyx_PyInt_As_long': 14.95 aiohttp/_websocket.c:3042:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 14.95 3042 | const digit digits = ((PyLongObject)x)->ob_digit; 14.95 | ^~ 14.95 aiohttp/_websocket.c:3097:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 14.95 3097 | const digit digits = ((PyLongObject)x)->ob_digit; 14.95 | ^~ 14.95 aiohttp/_websocket.c: In function '__Pyx_PyInt_As_int': 14.95 aiohttp/_websocket.c:3238:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 14.95 3238 | const digit digits = ((PyLongObject)x)->ob_digit; 14.95 | ^~ 14.95 aiohttp/_websocket.c:3293:53: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 14.95 3293 | const digit digits = ((PyLongObject)x)->ob_digit; 14.95 | ^~ 14.95 aiohttp/_websocket.c: In function '__Pyx_PyIndex_AsSsize_t': 14.95 aiohttp/_websocket.c:3744:45: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 14.95 3744 | const digit digits = ((PyLongObject*)b)->ob_digit; 14.95 | ^~ 14.95 error: command '/usr/bin/gcc' failed with exit code 1 14.95 [end of output] 14.95 14.95 note: This error originates from a subprocess, and is likely not a problem with pip. 14.95 ERROR: Failed building wheel for aiohttp 14.95 Building wheel for maxminddb (pyproject.toml): started 15.15 Building wheel for maxminddb (pyproject.toml): finished with status 'done' 15.15 Created wheel for maxminddb: filename=maxminddb-2.4.0-py2.py3-none-any.whl size=16401 sha256=f1f518443e564dee783a1802a1b518b350609fce5de8f3d9029d5205e6d9c31d 15.15 Stored in directory: /root/.cache/pip/wheels/37/5a/39/34619b85ae625025c06a03136df11a0e5b3d7bc63cc50d9023 15.15 Building wheel for frozenlist (pyproject.toml): started 17.49 Building wheel for frozenlist (pyproject.toml): finished with status 'done' 17.49 Created wheel for frozenlist: filename=frozenlist-1.4.0-cp312-cp312-linux_x86_64.whl size=261147 sha256=994a43dffc28c895433371db663d8ffae286a423b258629d6d8cbe8a8cbaf260 17.49 Stored in directory: /root/.cache/pip/wheels/f1/9c/94/9386cb0ea511a93226456388d41d35f1c24ba15a62ffd7b1ef 17.49 Building wheel for multidict (pyproject.toml): started 18.41 Building wheel for multidict (pyproject.toml): finished with status 'done' 18.41 Created wheel for multidict: filename=multidict-6.0.4-cp312-cp312-linux_x86_64.whl size=117284 sha256=ca5cd4e80fe2383ca3cf5977242641ce1107568ef15a020ae885acd9033b860f 18.41 Stored in directory: /root/.cache/pip/wheels/f6/d8/ff/3c14a64b8f2ab1aa94ba2888f5a988be6ab446ec5c8d1a82da 18.41 Building wheel for yarl (pyproject.toml): started 20.51 Building wheel for yarl (pyproject.toml): finished with status 'done' 20.51 Created wheel for yarl: filename=yarl-1.9.2-cp312-cp312-linux_x86_64.whl size=298768 sha256=6adc3540616361f909d65bcbbf8a8b0f5f380844dfd07587293a98b485b8d44a 20.51 Stored in directory: /root/.cache/pip/wheels/84/e3/6a/7d0fa1abee8e4aa39922b5bd54689b4b5e4269b2821f482a32 20.51 Successfully built maxminddb frozenlist multidict yarl 20.51 Failed to build aiohttp 20.51 ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects

Dockerfile_8.6.2:3

2 | 3 | >>> RUN apk add build-base libxml2-dev libxslt-dev \ 4 | >>> && pip install parsedmarc==8.6.2 5 |

ERROR: failed to solve: process "/bin/sh -c apk add build-base libxml2-dev libxslt-dev && pip install parsedmarc==8.6.2" did not complete successfully: exit code: 1 `

Pascal76 commented 8 months ago

https://github.com/aio-libs/aiohttp/issues/7229

elixir-gdsc commented 8 months ago

I was able to use a different image python:3.11.6-alpine3.18 which got past this error

Pascal76 commented 8 months ago

Thank you, it works :)