Closed Sanrro10 closed 4 years ago
What OS are you using? What version of openssl do you have installed? To get open ssl version use openssl version -a
Also have you tried the following:
Installation Issues
awsiotsdk depends on awscrt, which makes use of C extensions. Precompiled wheels are downloaded when installing on major platforms (Mac, Windows, Linux, Raspbian. If wheels are unavailable for your platform, your machine must compile some C libraries. If you encounter issues, install the following and try again:
sudo apt-get update sudo apt-get install cmake sudo apt-get install libssl-dev
I have the exact same problem in Ubuntu 20.04 / aarch64 / Python 3.8 / OpenSSL 1.1.1f .
I have tried this already, and my device is a Jetson nano. I have OpenSSL 1.1.1 installed, and I have tried to install with sudo -H python3 -m pip install awsiotsdk==1.5.0 and it worked, so I suppose its a problem with the latest release
Also have you tried the following:
Installation Issues awsiotsdk depends on awscrt, which makes use of C extensions. Precompiled wheels are downloaded when installing on major platforms (Mac, Windows, Linux, Raspbian. If wheels are unavailable for your platform, your machine must compile some C libraries. If you encounter issues, install the following and try again: sudo apt-get update sudo apt-get install cmake sudo apt-get install libssl-dev
Running through the same steps as @Sanrro10 but with a Raspberry Pi I experience the same problem. Rolling back to v1.5.0 worked. Definitely a problem with v1.5.1.
We are currently working on a fix, but this should only affect ARM platforms. For now, as @Sanrro10 figured out, you can just use the previous version 1.5.0. I will update this issue after the fix is published.
I see the same issue installing an app with awsiotsdk as dependency in a trivial docker container.
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 sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-74gwxf0s/awscrt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-74gwxf0s/awscrt/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 /tmp/pip-wheel-jum46of1
cwd: /tmp/pip-install-74gwxf0s/awscrt/
Complete output (130 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/awscrt
copying awscrt/__init__.py -> build/lib.linux-x86_64-3.8/awscrt
copying awscrt/io.py -> build/lib.linux-x86_64-3.8/awscrt
copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-x86_64-3.8/awscrt
copying awscrt/crypto.py -> build/lib.linux-x86_64-3.8/awscrt
copying awscrt/http.py -> build/lib.linux-x86_64-3.8/awscrt
copying awscrt/auth.py -> build/lib.linux-x86_64-3.8/awscrt
copying awscrt/exceptions.py -> build/lib.linux-x86_64-3.8/awscrt
copying awscrt/mqtt.py -> build/lib.linux-x86_64-3.8/awscrt
running build_ext
cmake version 3.13.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
--- Building dependency: s2n (RelWithDebInfo) ---
cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_INCLUDE_PATH=\"/usr/local/include/python3.8\" -DCMAKE_LIBRARY_PATH=\"/usr/local/lib\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-74gwxf0s/awscrt/crt/s2n
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Attempting to try_compile PQ ASM
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- PQ ASM try_compile succeeded - using optimized x86_64 assembly for PQ crypto
-- Attempting to try_compile PQ ASM with ADX support
-- PQ ASM try_compile with ADX support succeeded - using ASM code with ADX instructions
-- Performing Test S2N_HAVE_EXECINFO
-- Performing Test S2N_HAVE_EXECINFO - Success
-- Found LibCrypto: /tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a
-- LibCrypto Include Dir: /tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/include
-- LibCrypto Shared Lib: /usr/lib/x86_64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib: /tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a
-- Configuring done
CMake Error at CMakeLists.txt:191 (add_library):
Target "s2n" links to target "LibCrypto::Crypto" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:239 (target_include_directories):
Error evaluating generator expression:
$<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>
Target "LibCrypto::Crypto" not found.
CMake Error at CMakeLists.txt:239 (target_include_directories):
Error evaluating generator expression:
$<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>
Target "LibCrypto::Crypto" not found.
CMake Error at CMakeLists.txt:239 (target_include_directories):
Error evaluating generator expression:
$<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>
Target "LibCrypto::Crypto" not found.
CMake Error at CMakeLists.txt:239 (target_include_directories):
Error evaluating generator expression:
$<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>
Target "LibCrypto::Crypto" not found.
CMake Error at CMakeLists.txt:191 (add_library):
Target "s2n" links to target "LibCrypto::Crypto" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INCLUDE_PATH
-- Build files have been written to: /tmp/pip-install-74gwxf0s/awscrt/build/deps/s2n
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-74gwxf0s/awscrt/setup.py", line 245, in <module>
setuptools.setup(
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 161, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-74gwxf0s/awscrt/setup.py", line 179, in run
self._build_dependency(lib)
File "/tmp/pip-install-74gwxf0s/awscrt/setup.py", line 162, in _build_dependency
subprocess.check_call(cmake_args)
File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/local/include/python3.8"', '-DCMAKE_LIBRARY_PATH="/usr/local/lib"', '-DLibCrypto_INCLUDE_DIR=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/include', '-DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a', '/tmp/pip-install-74gwxf0s/awscrt/crt/s2n']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for awscrt
I have the same problem on Arch Linux, python 3.8, Openssl v.1.1.1h.
Same problem here: docker image python:latest running on Raspberry Pi 4. Versions in Container: Debian GNU/Linux 10 (buster), Python 3.9.0, Openssl 1.1.1d Unfortunately also versions 1.5.0 ansd 1.4.0 do not work for me, it throws a differen error. See file attached.. Outside of the container (Raspbian) 1.5.0 works. error_awsiotsdk.txt Are there known errors with docker containers? Edit: i found out that it is incomplatible with Python 3.9.0! using 3.8 it works.
I am also having this issues. I am using a raspberry 3 model B with python 3.7.3.
I am also having this issue and my codebuild build project now fails (py 3.8), I posted the issue already at the awscrt repo https://github.com/awslabs/aws-crt-python/issues/192
Same issue with raspberry 3 model B with python. Will rollback to v1.5
@alozano-77 yeah I rolled back also to 1.5.0 for now, will revisit when it's fixed
We refactored the cmake libcrypto finder recently and I suspect it’s related to that, will reach out to the team to have a look. Sorry for your troubles.
This is fixed in 1.5.2
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
After looking to most of theclosedissues in this page, there are several discussing about this issue, but none solves it for me.
When itry toinstall either with python3 -m pip install awsiotsdk or
git clone https://github.com/aws/aws-iot-device-sdk-python-v2.git python3 -m pip install ./aws-iot-device-sdk-python-v2
i get the following:
Collecting awsiotsdk Using cached awsiotsdk-1.5.1-py3-none-any.whl (18 kB) Collecting awscrt==0.9.3 Using cached awscrt-0.9.3.tar.gz (2.5 MB) Building wheels for collected packages: awscrt Building wheel for awscrt (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"'; file='"'"'/tmp/pip-install-un4mvgep/awscrt/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 /tmp/pip-wheel-s5x44slu cwd: /tmp/pip-install-un4mvgep/awscrt/ Complete output (112 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-3.6 creating build/lib.linux-aarch64-3.6/awscrt copying awscrt/auth.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/crypto.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/http.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/io.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/mqtt.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/init.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/exceptions.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-aarch64-3.6/awscrt running build_ext cmake version 3.10.2
CMake suite maintained and supported by Kitware (kitware.com/cmake). --- Building dependency: s2n (RelWithDebInfo) --- cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4mvgep/awscrt/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_INCLUDE_PATH=\"/usr/include/python3.6m\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-un4mvgep/awscrt/crt/s2n -- The C compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Attempting to try_compile PQ ASM -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/cc -- PQ ASM try_compile failed - using generic C code for PQ crypto -- Performing Test S2N_HAVE_EXECINFO -- Performing Test S2N_HAVE_EXECINFO - Success -- Found LibCrypto: /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a -- LibCrypto Include Dir: /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include -- LibCrypto Shared Lib: /usr/lib/aarch64-linux-gnu/libcrypto.so -- LibCrypto Static Lib: /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a -- Configuring done CMake Error at CMakeLists.txt:191 (add_library): Target "s2n" links to target "LibCrypto::Crypto" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
CMake Error at CMakeLists.txt:239 (target_include_directories): Error evaluating generator expression:
CMake Error at CMakeLists.txt:239 (target_include_directories): Error evaluating generator expression:
CMake Error at CMakeLists.txt:191 (add_library): Target "s2n" links to target "LibCrypto::Crypto" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
-- Generating done CMake Warning: Manually-specified variables were not used by the project:
-- Build files have been written to: /tmp/pip-install-un4mvgep/awscrt/build/deps/s2n Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-install-un4mvgep/awscrt/setup.py", line 263, in
'boto3'
File "/usr/lib/python3/dist-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-un4mvgep/awscrt/setup.py", line 179, in run
self._build_dependency(lib)
File "/tmp/pip-install-un4mvgep/awscrt/setup.py", line 162, in _build_dependency
subprocess.check_call(cmake_args)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4mvgep/awscrt/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/include/python3.6m"', '-DLibCrypto_INCLUDE_DIR=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include', '-DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a', '/tmp/pip-install-un4mvgep/awscrt/crt/s2n']' returned non-zero exit status 1.
ERROR: Failed building wheel for awscrt Running setup.py clean for awscrt Failed to build awscrt Installing collected packages: awscrt, awsiotsdk Running setup.py install for awscrt ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"'; file='"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-mbraawb4/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/grabitinigo/.local/include/python3.6m/awscrt cwd: /tmp/pip-install-un4mvgep/awscrt/ Complete output (88 lines): running install running build running build_py creating build/lib.linux-aarch64-3.6 creating build/lib.linux-aarch64-3.6/awscrt copying awscrt/auth.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/crypto.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/http.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/io.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/mqtt.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/init.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/exceptions.py -> build/lib.linux-aarch64-3.6/awscrt copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-aarch64-3.6/awscrt running build_ext cmake version 3.10.2
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"'; file='"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-mbraawb4/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/grabitinigo/.local/include/python3.6m/awscrt Check the logs for full command output.
I've tried to execute with or without sudo -H. Thanks for the help.