Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build doesn't work on aarch64 #2837

Closed
mrboogiee opened this issue Oct 24, 2023 · 3 comments
Closed

Docker build doesn't work on aarch64 #2837

mrboogiee opened this issue Oct 24, 2023 · 3 comments

Comments

@mrboogiee
Copy link

Describe the bug
When attempting to build the docker container on Apple silicon it errors out on pip3 install --no-cache-dir -r requirements.txt:

[+] Building 56.0s (14/33)                                                                                                                                                                                                                                         docker:default
 => [internal] load .dockerignore                                                                                                                                                                                                                                            0.0s
 => => transferring context: 333B                                                                                                                                                                                                                                            0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                         0.0s
 => => transferring dockerfile: 3.35kB                                                                                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/ubuntu:23.04                                                                                                                                                                                                              3.3s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                                                                                                                                                0.0s
 => [ 1/28] FROM docker.io/library/ubuntu:23.04@sha256:51e70689b125fcc2e800f5efb7ba465dee85ede9da9c268ff5599053c7e52b77                                                                                                                                                      0.0s
 => [internal] load build context                                                                                                                                                                                                                                            0.1s
 => => transferring context: 96.74kB                                                                                                                                                                                                                                         0.1s
 => CACHED [ 2/28] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime &&     echo UTC > /etc/timezone                                                                                                                                                                        0.0s
 => CACHED [ 3/28] WORKDIR /usr/src/app                                                                                                                                                                                                                                      0.0s
 => [ 4/28] ADD . .                                                                                                                                                                                                                                                          0.6s
 => [ 5/28] RUN if [ -z "$(ls plugins/stockpile)" ]; then echo "stockpile plugin not downloaded - please ensure you recursively cloned the caldera git repository and try again."; exit 1; fi                                                                                0.3s
 => [ 6/28] RUN apt-get update &&     apt-get -y install python3 python3-pip python3-venv git curl golang-go                                                                                                                                                                36.2s
 => [ 7/28] RUN if [ "false" = "true" ] ; then apt-get -y install mingw-w64; fi                                                                                                                                                                                              0.6s
 => [ 8/28] RUN python3 -m venv /opt/venv/caldera                                                                                                                                                                                                                            2.3s
 => ERROR [ 9/28] RUN pip3 install --no-cache-dir -r requirements.txt                                                                                                                                                                                                       12.5s
------
 > [ 9/28] RUN pip3 install --no-cache-dir -r requirements.txt:
0.825 Collecting aiohttp-jinja2==1.5.1
0.928   Downloading aiohttp_jinja2-1.5.1-py3-none-any.whl (11 kB)
1.136 Collecting aiohttp==3.8.5
1.151   Downloading aiohttp-3.8.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB)
1.246      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 11.8 MB/s eta 0:00:00
1.356 Collecting aiohttp_session==2.12.0
1.368   Downloading aiohttp_session-2.12.0-py3-none-any.whl (12 kB)
1.479 Collecting aiohttp-security==0.4.0
1.492   Downloading aiohttp_security-0.4.0-py3-none-any.whl (6.9 kB)
1.514 Collecting aiohttp-apispec==2.2.3
1.706   Downloading aiohttp-apispec-2.2.3.tar.gz (2.7 MB)
1.830      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 21.8 MB/s eta 0:00:00
1.906   Installing build dependencies: started
2.943   Installing build dependencies: finished with status 'done'
2.945   Getting requirements to build wheel: started
3.025   Getting requirements to build wheel: finished with status 'done'
3.026   Preparing metadata (pyproject.toml): started
3.118   Preparing metadata (pyproject.toml): finished with status 'done'
3.214 Collecting jinja2==3.1.2
3.226   Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
3.236      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 20.4 MB/s eta 0:00:00
3.278 Collecting pyyaml==6.0.1
3.307   Downloading PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (732 kB)
3.330      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 732.2/732.2 kB 33.5 MB/s eta 0:00:00
3.464 Collecting cryptography==41.0.4
3.478   Downloading cryptography-41.0.4-cp37-abi3-manylinux_2_28_aarch64.whl (4.2 MB)
3.677      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 21.3 MB/s eta 0:00:00
3.749 Collecting websockets==11.0.3
3.760   Downloading websockets-11.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (131 kB)
3.769      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 131.2/131.2 kB 24.4 MB/s eta 0:00:00
3.822 Collecting Sphinx==7.1.2
3.875   Downloading sphinx-7.1.2-py3-none-any.whl (3.2 MB)
4.000      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 25.8 MB/s eta 0:00:00
4.037 Collecting sphinx_rtd_theme==1.3.0
4.132   Downloading sphinx_rtd_theme-1.3.0-py2.py3-none-any.whl (2.8 MB)
4.314      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 15.8 MB/s eta 0:00:00
4.346 Collecting myst-parser==2.0.0
4.361   Downloading myst_parser-2.0.0-py3-none-any.whl (77 kB)
4.371      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.2/77.2 kB 8.6 MB/s eta 0:00:00
4.439 Collecting marshmallow==3.20.1
4.453   Downloading marshmallow-3.20.1-py3-none-any.whl (49 kB)
4.455      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.4/49.4 kB 436.1 MB/s eta 0:00:00
4.561 Collecting dirhash==0.2.1
4.578   Downloading dirhash-0.2.1-py3-none-any.whl (12 kB)
4.596 Collecting donut-shellcode==1.0.2
4.611   Downloading donut-shellcode-1.0.2.tar.gz (293 kB)
4.671      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 293.0/293.0 kB 5.2 MB/s eta 0:00:00
4.693   Installing build dependencies: started
5.405   Installing build dependencies: finished with status 'done'
5.406   Getting requirements to build wheel: started
5.486   Getting requirements to build wheel: finished with status 'done'
5.488   Preparing metadata (pyproject.toml): started
5.601   Preparing metadata (pyproject.toml): finished with status 'done'
5.622 Collecting marshmallow-enum==1.5.1
5.634   Downloading marshmallow_enum-1.5.1-py2.py3-none-any.whl (4.2 kB)
5.656 Collecting ldap3==2.9.1
5.678   Downloading ldap3-2.9.1-py2.py3-none-any.whl (432 kB)
5.784      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 432.2/432.2 kB 4.2 MB/s eta 0:00:00
5.921 Collecting lxml~=4.9.1
5.945   Downloading lxml-4.9.3-cp311-cp311-manylinux_2_28_aarch64.whl (7.6 MB)
6.250      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 25.3 MB/s eta 0:00:00
6.380 Collecting reportlab==4.0.4
6.396   Downloading reportlab-4.0.4-py3-none-any.whl (1.9 MB)
6.484      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 25.3 MB/s eta 0:00:00
6.506 Collecting svglib==1.5.1
6.520   Downloading svglib-1.5.1.tar.gz (913 kB)
6.578      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 913.9/913.9 kB 16.4 MB/s eta 0:00:00
6.605   Preparing metadata (setup.py): started
6.721   Preparing metadata (setup.py): finished with status 'done'
6.742 Collecting Markdown==3.4.4
6.753   Downloading Markdown-3.4.4-py3-none-any.whl (94 kB)
6.760      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.2/94.2 kB 17.8 MB/s eta 0:00:00
6.777 Collecting dnspython==2.4.2
6.787   Downloading dnspython-2.4.2-py3-none-any.whl (300 kB)
6.802      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 300.4/300.4 kB 21.6 MB/s eta 0:00:00
6.829 Collecting asyncssh==2.13.2
6.844   Downloading asyncssh-2.13.2-py3-none-any.whl (349 kB)
6.861      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 349.3/349.3 kB 22.3 MB/s eta 0:00:00
6.889 Collecting aioftp~=0.20.0
6.902   Downloading aioftp-0.20.1-py3-none-any.whl (36 kB)
6.944 Collecting attrs>=17.3.0
6.957   Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
6.962      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 207.2 MB/s eta 0:00:00
7.032 Collecting charset-normalizer<4.0,>=2.0
7.059   Downloading charset_normalizer-3.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (134 kB)
7.094      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 134.2/134.2 kB 3.8 MB/s eta 0:00:00
7.276 Collecting multidict<7.0,>=4.5
7.291   Downloading multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (120 kB)
7.298      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.1/120.1 kB 21.7 MB/s eta 0:00:00
7.317 Collecting async-timeout<5.0,>=4.0.0a3
7.338   Downloading async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
7.445 Collecting yarl<2.0,>=1.0
7.510   Downloading yarl-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (278 kB)
7.534      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 278.2/278.2 kB 12.1 MB/s eta 0:00:00
7.586 Collecting frozenlist>=1.1.1
7.600   Downloading frozenlist-1.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (252 kB)
7.661      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 252.6/252.6 kB 4.1 MB/s eta 0:00:00
7.679 Collecting aiosignal>=1.1.2
7.690   Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
7.759 Collecting apispec<4.0,>=3.0.0
7.773   Downloading apispec-3.3.2-py2.py3-none-any.whl (27 kB)
7.809 Collecting webargs<6.0
7.828   Downloading webargs-5.5.3-py3-none-any.whl (29 kB)
7.878 Collecting MarkupSafe>=2.0
7.894   Downloading MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (28 kB)
8.028 Collecting cffi>=1.12
8.072   Downloading cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (466 kB)
8.080      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 466.6/466.6 kB 83.5 MB/s eta 0:00:00
8.131 Collecting sphinxcontrib-applehelp
8.144   Downloading sphinxcontrib_applehelp-1.0.7-py3-none-any.whl (120 kB)
8.156      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.0/120.0 kB 11.7 MB/s eta 0:00:00
8.178 Collecting sphinxcontrib-devhelp
8.189   Downloading sphinxcontrib_devhelp-1.0.5-py3-none-any.whl (83 kB)
8.236      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.5/83.5 kB 1.6 MB/s eta 0:00:00
8.262 Collecting sphinxcontrib-jsmath
8.276   Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
8.293 Collecting sphinxcontrib-htmlhelp>=2.0.0
8.309   Downloading sphinxcontrib_htmlhelp-2.0.4-py3-none-any.whl (99 kB)
8.317      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.2/99.2 kB 190.5 MB/s eta 0:00:00
8.343 Collecting sphinxcontrib-serializinghtml>=1.1.5
8.358   Downloading sphinxcontrib_serializinghtml-1.1.9-py3-none-any.whl (92 kB)
8.366      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.7/92.7 kB 16.3 MB/s eta 0:00:00
8.384 Collecting sphinxcontrib-qthelp
8.393   Downloading sphinxcontrib_qthelp-1.0.6-py3-none-any.whl (89 kB)
8.410      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.4/89.4 kB 53.0 MB/s eta 0:00:00
8.431 Collecting Pygments>=2.13
8.443   Downloading Pygments-2.16.1-py3-none-any.whl (1.2 MB)
8.492      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 25.8 MB/s eta 0:00:00
8.521 Collecting docutils<0.21,>=0.18.1
8.558   Downloading docutils-0.20.1-py3-none-any.whl (572 kB)
8.589      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 572.7/572.7 kB 24.0 MB/s eta 0:00:00
8.658 Collecting snowballstemmer>=2.0
8.675   Downloading snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)
8.679      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.0/93.0 kB 35.2 MB/s eta 0:00:00
8.703 Collecting babel>=2.9
8.722   Downloading Babel-2.13.0-py3-none-any.whl (10.1 MB)
9.151      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 23.6 MB/s eta 0:00:00
9.184 Collecting alabaster<0.8,>=0.7
9.202   Downloading alabaster-0.7.13-py3-none-any.whl (13 kB)
9.219 Collecting imagesize>=1.3
9.232   Downloading imagesize-1.4.1-py2.py3-none-any.whl (8.8 kB)
9.260 Collecting requests>=2.25.0
9.272   Downloading requests-2.31.0-py3-none-any.whl (62 kB)
9.278      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 11.7 MB/s eta 0:00:00
9.307 Collecting packaging>=21.0
9.322   Downloading packaging-23.2-py3-none-any.whl (53 kB)
9.331      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 10.0 MB/s eta 0:00:00
9.343 Collecting docutils<0.21,>=0.18.1
9.357   Downloading docutils-0.18.1-py2.py3-none-any.whl (570 kB)
9.382      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 570.0/570.0 kB 24.7 MB/s eta 0:00:00
9.403 Collecting sphinxcontrib-jquery<5,>=4
9.420   Downloading sphinxcontrib_jquery-4.1-py2.py3-none-any.whl (121 kB)
9.422      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 kB 235.9 MB/s eta 0:00:00
9.461 Collecting markdown-it-py~=3.0
9.474   Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
9.479      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 36.3 MB/s eta 0:00:00
9.497 Collecting mdit-py-plugins~=0.4
9.512   Downloading mdit_py_plugins-0.4.0-py3-none-any.whl (54 kB)
9.513      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.1/54.1 kB 517.8 MB/s eta 0:00:00
9.748 Collecting scantree>=0.0.1
9.761   Downloading scantree-0.0.1.tar.gz (13 kB)
9.766   Preparing metadata (setup.py): started
9.892   Preparing metadata (setup.py): finished with status 'done'
9.921 Collecting pyasn1>=0.4.6
9.976   Downloading pyasn1-0.5.0-py2.py3-none-any.whl (83 kB)
9.979      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.9/83.9 kB 143.0 MB/s eta 0:00:00
10.20 Collecting pillow>=9.0.0
10.22   Downloading Pillow-10.1.0-cp311-cp311-manylinux_2_28_aarch64.whl (3.5 MB)
10.37      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 24.6 MB/s eta 0:00:00
10.41 Collecting cssselect2>=0.2.0
10.42   Downloading cssselect2-0.7.0-py3-none-any.whl (15 kB)
10.45 Collecting tinycss2>=0.6.0
10.46   Downloading tinycss2-1.2.1-py3-none-any.whl (21 kB)
10.50 Collecting typing-extensions>=3.6
10.52   Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)
10.60 Collecting pycparser
10.61   Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
10.62      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 18.5 MB/s eta 0:00:00
10.64 Collecting webencodings
10.65   Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
10.68 Collecting mdurl~=0.1
10.70   Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
10.77 Collecting idna<4,>=2.5
10.79   Downloading idna-3.4-py3-none-any.whl (61 kB)
10.79      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 37.7 MB/s eta 0:00:00
10.83 Collecting urllib3<3,>=1.21.1
10.84   Downloading urllib3-2.0.7-py3-none-any.whl (124 kB)
10.85      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 kB 18.3 MB/s eta 0:00:00
10.88 Collecting certifi>=2017.4.17
10.89   Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
10.90      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 22.2 MB/s eta 0:00:00
10.92 Collecting pathspec>=0.5.9
10.93   Downloading pathspec-0.11.2-py3-none-any.whl (29 kB)
10.95 Collecting six>=1.12.0
10.97   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
11.10 Building wheels for collected packages: aiohttp-apispec, donut-shellcode
11.10   Building wheel for aiohttp-apispec (pyproject.toml): started
11.58   Building wheel for aiohttp-apispec (pyproject.toml): finished with status 'done'
11.58   Created wheel for aiohttp-apispec: filename=aiohttp_apispec-2.2.3-py3-none-any.whl size=2672621 sha256=9eec9c446a54bb767f20e628cbbaf724ae716dde138356a0b9ab1e05598e34dc
11.58   Stored in directory: /tmp/pip-ephem-wheel-cache-5qv398ch/wheels/0c/6f/96/fb5a6f3849333cc9bafd0049b57c2efe59c0ba016de7b370ca
11.58   Building wheel for donut-shellcode (pyproject.toml): started
12.18   Building wheel for donut-shellcode (pyproject.toml): finished with status 'error'
12.18   error: subprocess-exited-with-error
12.18
12.18   × Building wheel for donut-shellcode (pyproject.toml) did not run successfully.
12.18   │ exit code: 1
12.18   ╰─> [73 lines of output]
12.18       running bdist_wheel
12.18       running build
12.18       running build_ext
12.18       building 'donut' extension
12.18       creating build
12.18       creating build/temp.linux-aarch64-cpython-311
12.18       creating build/temp.linux-aarch64-cpython-311/loader
12.18       aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Iinclude -I/opt/venv/caldera/include -I/usr/include/python3.11 -c donut.c -o build/temp.linux-aarch64-cpython-311/donut.o
12.18       donut.c: In function ‘read_file_info’:
12.18       donut.c:574:19: warning: comparison of integer expressions of different signedness: ‘ULONG64’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
12.18         574 |           if (ofs != -1) {
12.18             |                   ^~
12.18       donut.c:579:22: warning: comparison of integer expressions of different signedness: ‘ULONG64’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
12.18         579 |               if(ofs != -1) {
12.18             |                      ^~
12.18       donut.c: In function ‘gen_random_string’:
12.18       donut.c:667:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint64_t’ {aka ‘long unsigned int’} [-Wsign-compare]
12.18         667 |     for(i=0; i<len; i++) {
12.18             |               ^
12.18       donut.c: In function ‘is_dll_export’:
12.18       donut.c:1481:16: warning: comparison of integer expressions of different signedness: ‘ULONG64’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
12.18        1481 |         if(ofs != -1) {
12.18             |                ^~
12.18       donut.c: In function ‘DonutCreate’:
12.18       donut.c:768:7: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
12.18         768 |       strncpy(mod->method, c->method, DONUT_MAX_NAME-1);
12.18             |       ^
12.18       donut.c:746:9: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 255 [-Wstringop-truncation]
12.18         746 |         strncpy(mod->domain, c->domain, DONUT_DOMAIN_LEN);
12.18             |         ^
12.18       donut.c:753:9: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
12.18         753 |         strncpy(mod->cls, c->cls, DONUT_MAX_NAME-1);
12.18             |         ^
12.18       donut.c:756:9: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
12.18         756 |         strncpy(mod->method, c->method, DONUT_MAX_NAME-1);
12.18             |         ^
12.18       donut.c:763:7: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
12.18         763 |       strncpy(mod->runtime, c->runtime, DONUT_MAX_NAME-1);
12.18             |       ^
12.18       donut.c:792:7: warning: ‘__builtin___strncat_chk’ output may be truncated copying 250 bytes from a string of length 255 [-Wstringop-truncation]
12.18         792 |       strncat(mod->args, c->args, DONUT_MAX_NAME-6);
12.18             |       ^
12.18       aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Iinclude -I/opt/venv/caldera/include -I/usr/include/python3.11 -c donutmodule.c -o build/temp.linux-aarch64-cpython-311/donutmodule.o
12.18       donutmodule.c:199:9: warning: initialization of ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} from incompatible pointer type ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} [-Wincompatible-pointer-types]
12.18         199 |         Donut_Create, // C wrapper function
12.18             |         ^~~~~~~~~~~~
12.18       donutmodule.c:199:9: note: (near initialization for ‘Donut_FunctionsTable[0].ml_meth’)
12.18       aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Iinclude -I/opt/venv/caldera/include -I/usr/include/python3.11 -c encrypt.c -o build/temp.linux-aarch64-cpython-311/encrypt.o
12.18       aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Iinclude -I/opt/venv/caldera/include -I/usr/include/python3.11 -c format.c -o build/temp.linux-aarch64-cpython-311/format.o
12.18       In function ‘b64_encode’,
12.18           inlined from ‘base64_template’ at format.c:114:10:
12.18       format.c:94:12: warning: ‘i’ may be used uninitialized [-Wmaybe-uninitialized]
12.18          94 |     while(i!=0) { *out++ = '='; i--; }
12.18             |           ~^~~
12.18       format.c: In function ‘base64_template’:
12.18       format.c:58:14: note: ‘i’ was declared here
12.18          58 |     uint32_t i, len, x;
12.18             |              ^
12.18       format.c: In function ‘uuid_template’:
12.18       format.c:242:18: warning: pointer ‘pic’ used after ‘realloc’ [-Wuse-after-free]
12.18         242 |         memcpy(p + len, uuid_null, rem);
12.18             |                ~~^~~~~
12.18       format.c:241:15: note: call to ‘realloc’ here
12.18         241 |         pic = realloc(pic, len+rem);
12.18             |               ^~~~~~~~~~~~~~~~~~~~~
12.18       aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Iinclude -I/opt/venv/caldera/include -I/usr/include/python3.11 -c hash.c -o build/temp.linux-aarch64-cpython-311/hash.o
12.18       aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Iinclude -I/opt/venv/caldera/include -I/usr/include/python3.11 -c loader/clib.c -o build/temp.linux-aarch64-cpython-311/loader/clib.o
12.18       creating build/lib.linux-aarch64-cpython-311
12.18       aarch64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-aarch64-cpython-311/donut.o build/temp.linux-aarch64-cpython-311/donutmodule.o build/temp.linux-aarch64-cpython-311/encrypt.o build/temp.linux-aarch64-cpython-311/format.o build/temp.linux-aarch64-cpython-311/hash.o build/temp.linux-aarch64-cpython-311/loader/clib.o lib/aplib64.a -Llib -L/usr/lib/aarch64-linux-gnu -o build/lib.linux-aarch64-cpython-311/donut.cpython-311-aarch64-linux-gnu.so
12.18       /usr/bin/ld: lib/aplib64.a(elfstubs.o): Relocations in generic ELF (EM: 62)
12.18       /usr/bin/ld: lib/aplib64.a: error adding symbols: file in wrong format
12.18       collect2: error: ld returned 1 exit status
12.18       error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
12.18       [end of output]
12.18
12.18   note: This error originates from a subprocess, and is likely not a problem with pip.
12.18   ERROR: Failed building wheel for donut-shellcode
12.18 ERROR: Could not build wheels for donut-shellcode, which is required to install pyproject.toml-based projects
12.18 Successfully built aiohttp-apispec
12.18 Failed to build donut-shellcode
------
Dockerfile:28
--------------------
  26 |
  27 |     # Install pip requirements
  28 | >>> RUN pip3 install --no-cache-dir -r requirements.txt
  29 |
  30 |     # Set up config file and disable atomic by default
--------------------
ERROR: failed to solve: process "/bin/bash -c pip3 install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

To Reproduce
bash$ docker build . --build-arg WIN_BUILD=false -t caldera:latest

Expected behavior
a successful docker build run, it works when building an linux/amd64 image so it is aarch64 related.

Screenshots
n/a

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.0
  • Silicon: Apple M1 Pro
  • Container management platform: Rancher Desktop 1.9.1

Additional context
n/a

@github-actions
Copy link

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

@clenk
Copy link
Contributor

clenk commented Oct 24, 2023

Hi @mrboogiee. It looks like this is an issue with the donut-shellcode library rather than Caldera. Until it gets fixed there, you could get around this by removing donut-shellcode from requirements.txt but you would also need to remove the other references to donut from the stockpile plugin: https://github.com/search?q=repo%3Amitre%2Fstockpile+donut&type=code. Hopefully this gets fixed in donut soon.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants