-
Notifications
You must be signed in to change notification settings - Fork 52
Build fails on alpine docker #272
Copy link
Copy link
Closed
Description
Basic Dockerfile:
ROM python:3-alpine AS installer
RUN apk add --no-cache \
acl \
binutils \
cmake \
curl \
fcgi \
file \
g++ \
gcc \
gettext \
git \
libc-dev \
libffi-dev \
linux-headers \
musl-dev \
openssl-dev \
pwgen \
py3-pip \
python3-dev \
unzip \
zlib-dev
RUN pip install --upgrade pip \
&& pip install pycrypto awscrt
Error:
Building wheels for collected packages: pycrypto, awscrt
Building wheel for pycrypto (setup.py): started
Building wheel for pycrypto (setup.py): finished with status 'done'
Created wheel for pycrypto: filename=pycrypto-2.6.1-cp39-cp39-linux_x86_64.whl size=478424 sha256=982948385d411cc4d459a00b28b90f5a81ecd55ce324e99bdd179e06b7907f0c
Stored in directory: /root/.cache/pip/wheels/9d/29/32/8b8f22481bec8b0fbe7087927336ec167faff2ed9db849448f
Building wheel for awscrt (setup.py): started
Building wheel for awscrt (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-9cti6p1g
cwd: /tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/
Complete output (56 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/awscrt
copying awscrt/common.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/s3.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/__init__.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/http.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/mqtt.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/_test.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/auth.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/io.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/exceptions.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/crypto.py -> build/lib.linux-x86_64-3.9/awscrt
creating build/lib.linux-x86_64-3.9/awscrt/eventstream
copying awscrt/eventstream/__init__.py -> build/lib.linux-x86_64-3.9/awscrt/eventstream
copying awscrt/eventstream/rpc.py -> build/lib.linux-x86_64-3.9/awscrt/eventstream
running build_ext
--- Building dependency: aws-lc (RelWithDebInfo) ---
/usr/bin/cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_LIBSSL=OFF /tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/crt/aws-lc
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/aws-lc/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py", line 263, in <module>
setuptools.setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py", line 197, in run
self._build_dependency(lib)
File "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py", line 175, in _build_dependency
subprocess.check_call(cmake_args)
File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DBUILD_LIBSSL=OFF', '/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/crt/aws-lc']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for awscrt
Running setup.py clean for awscrt
Successfully built pycrypto
Failed to build awscrt
Installing collected packages: pycrypto, awscrt
Running setup.py install for awscrt: started
Running setup.py install for awscrt: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8x5wm5ee/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/awscrt
cwd: /tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/
Complete output (57 lines):
running install
running build
running build_py
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/awscrt
copying awscrt/common.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/s3.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/__init__.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/http.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/mqtt.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/_test.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/auth.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/io.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/exceptions.py -> build/lib.linux-x86_64-3.9/awscrt
copying awscrt/crypto.py -> build/lib.linux-x86_64-3.9/awscrt
creating build/lib.linux-x86_64-3.9/awscrt/eventstream
copying awscrt/eventstream/__init__.py -> build/lib.linux-x86_64-3.9/awscrt/eventstream
copying awscrt/eventstream/rpc.py -> build/lib.linux-x86_64-3.9/awscrt/eventstream
running build_ext
--- Building dependency: aws-lc (RelWithDebInfo) ---
/usr/bin/cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_LIBSSL=OFF /tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/crt/aws-lc
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/aws-lc/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py", line 263, in <module>
setuptools.setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py", line 197, in run
self._build_dependency(lib)
File "/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py", line 175, in _build_dependency
subprocess.check_call(cmake_args)
File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DBUILD_LIBSSL=OFF', '/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/crt/aws-lc']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3d09k23e/awscrt_36304769a53a4906aabc5a858364f4ae/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8x5wm5ee/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/awscrt Check the logs for full command output.
The command '/bin/sh -c pip install --upgrade pip && pip install pycrypto awscrt' returned a non-zero code: 1
Why am I doing this ?
This is following this github issue aws/aws-cli#4685 on aws-cli.
The installation of aws-cli that way on alpine was working fine, until aws-cli 2.2.0 that is now using awscrt.
Is there any chance someone here can help ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels