linux4sam / meta-atmel

OpenEmbedded/Yocto Project layer for for Microchip SoC (aka AT91)
https://www.linux4sam.org/bin/view/Linux4SAM/YoctoProject
MIT License
90 stars 117 forks source link

Import error cryptoauthlib. #174

Closed hsnhrn closed 4 years ago

hsnhrn commented 4 years ago

i am trying to run these examples https://github.com/MicrochipTech/cryptoauthtools/tree/master/python/examples but i am not able to import cryptoauthlib and got this error below : File "/usr/lib/python3.8/site-packages/cryptoauthlib/init.py". line 16. in load_cryptoauthlib() File "/usr/lib/python3.8/site-packages/cryptoauthlib/library.py". line 83. in load_cryptoauthlib() _CRYPTO_LIB =ctypes.cdll.LoadLibrary(os.path.join(curr_path. "libcryptoauth.so")) File "/usr/lib/python3.8/ctypes/init.py". line 451. in LoadLibrary return self._dlltype(name) File "/usr/lib/python3.8/ctypes/init.py". line 373. in init self._handle = _dlopen(self._name mode) OSError : /usr/lib/python3.8/site-packages/cryptoauthlib/libcryptoauth.so: undefined symbol: hid_open

How can i fix this? thanks a lot!

codrin989 commented 4 years ago

Please try https://github.com/MicrochipTech/cryptoauthlib/issues/136 .

hsnhrn commented 4 years ago

i have a yocto os and i added the recipe in the project and then bitbake myimage. how can i install without cache in yocto?

codrin989 commented 4 years ago

This issue seems to be related mainly to cryptoauthlib itself, which is handled by a different team. I see there are many similar issues reported: https://github.com/MicrochipTech/cryptoauthtools/issues/16 https://github.com/MicrochipTech/cryptoauthlib/issues/144 and the one I linked above Please look them up.

hsnhrn commented 4 years ago

Seems like a version problem. Can i somehow change the version in the recipe?

codrin989 commented 4 years ago

You have rename python3-cryptoauthlib20200208.bb recipe to python3-cryptoauthlib.bb .

hsnhrn commented 4 years ago

I changed the version number but got this error while bitbake

ERROR: python3-cryptoauthlib-20190517-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1198"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/sysroots-uninative/x86_64-linux/usr/bin:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/bin/python3-native:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/openembedded-core/scripts:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot/usr/bin/crossscripts:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/sbin:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/bin:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/sbin:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/bin:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/openembedded-core/bitbake/bin:/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/hosttools"; export HOME="/home/user"; /usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate -P /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/downloads 'https://files.pythonhosted.org/packages/1b/ed/da1709095abd203e37892f7183b68433382ce6a0f6129dfa0ac47e2ba85c/cryptoauthlib-20190517.tar.gz' --progress=dot -v failed with exit code 8, output: --2020-07-17 10:25:28-- https://files.pythonhosted.org/packages/1b/ed/da1709095abd203e37892f7183b68433382ce6a0f6129dfa0ac47e2ba85c/cryptoauthlib-20190517.tar.gz Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.113.63, 2a04:4e42:3::319 Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.113.63|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2020-07-17 10:25:28 ERROR 404: Not Found.

ERROR: python3-cryptoauthlib-20190517-r0 do_fetch: Fetcher failure for URL: 'https://files.pythonhosted.org/packages/1b/ed/da1709095abd203e37892f7183b68433382ce6a0f6129dfa0ac47e2ba85c/cryptoauthlib-20190517.tar.gz'. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/temp/log.do_fetch.3125 ERROR: Task (/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/meta-atmel/dynamic-layers/aws-layer/recipes-support/python-cryptoauthlib/python3-cryptoauthlib_20190517.bb:do_fetch) failed with exit code '1'

I am trying this version https://pypi.org/project/cryptoauthlib/20190517/

codrin989 commented 4 years ago

Right, you also have to update SRC_URI and replace https://github.com/linux4sam/meta-atmel/blob/dunfell/recipes-support/python-cryptoauthlib/python3-cryptoauthlib_20200208.bb#L7 with SRC_URI = "https://files.pythonhosted.org/packages/e3/b0/c7377a71078ca77cc8615d5bb90e717ef541bda8becff251cd557eabe641/cryptoauthlib-${PV}.tar.gz ${PYPI_SRC_URI}"

hsnhrn commented 4 years ago

checksum mismatch error now. from where can i find the checksum of that version?

SRC_URI[md5sum] = "3a464cb6ea78286353870e544f85e208" SRC_URI[sha256sum] = "7b04a4097c6f8d4b539c7425261eac3353016405b863fec2d827152ce3a652bf"

codrin989 commented 4 years ago

The easiest way is to look at the error message reported by yocto and replace the checksums in the recipe with the ones yocto expects to find.

hsnhrn commented 4 years ago

Now have this error. ERROR: python3-cryptoauthlib-20190517-r0 do_compile: 'python3 setup.py build ' execution failed. ERROR: python3-cryptoauthlib-20190517-r0 do_compile: Execution of '/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/temp/run.do_compile.4098' failed with exit code 1: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py:42: SyntaxWarning: "is" with a literal. Did you mean "=="? if sys.platform is 'win32': WARNING: The pip package is not available, falling back to EasyInstall for handling setup_requires/test_requires; this is deprecated and will be removed in a future version. ERROR: Do not try to fetch `wheel' for building. Please add its native recipe to DEPENDS. Traceback (most recent call last): File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py", line 186, in setup( File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/init.py", line 143, in setup _install_setup_requires(attrs) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/init.py", line 138, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/dist.py", line 718, in fetch_build_eggs resolved_dists = pkg_resources.working_set.resolve( File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/pkg_resources/init.py", line 787, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'wheel' distribution was not found and is required by the application WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/temp/log.do_compile.4098

hsnhrn commented 4 years ago

https://github.com/MicrochipTech/cryptoauthlib/issues/176 I got this response from above..

"This would be a configuration issue. Are you going to be using a kit such as the CryptoAuth Trust Platform Development Kit? If you are then you'll have to include USB support (e.g. libudev) to your build. If you are not using a USB kit then you'll need to set the environment variable CRYPTOAUTHLIB_NOUSB for the python build."

can i set it somehow in your recipe? maybe the latest version will work this way and i dont need to downgrade the version?

codrin989 commented 4 years ago

try adding python3-wheel and udev in DEPENDS here https://github.com/linux4sam/meta-atmel/blob/dunfell/recipes-support/python-cryptoauthlib/python3-cryptoauthlib_20200208.bb#L17

hsnhrn commented 4 years ago

i added it DEPENDS += "cmake-native python3-wheel udev" but still got the error

ERROR: python3-cryptoauthlib-20190517-r0 do_compile: 'python3 setup.py build ' execution failed. ERROR: python3-cryptoauthlib-20190517-r0 do_compile: Execution of '/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/temp/run.do_compile.11635' failed with exit code 1: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py:42: SyntaxWarning: "is" with a literal. Did you mean "=="? if sys.platform is 'win32': WARNING: The pip package is not available, falling back to EasyInstall for handling setup_requires/test_requires; this is deprecated and will be removed in a future version. ERROR: Do not try to fetch `wheel' for building. Please add its native recipe to DEPENDS. Traceback (most recent call last): File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py", line 186, in setup( File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/init.py", line 143, in setup _install_setup_requires(attrs) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/init.py", line 138, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/dist.py", line 718, in fetch_build_eggs resolved_dists = pkg_resources.working_set.resolve( File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/pkg_resources/init.py", line 787, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'wheel' distribution was not found and is required by the application WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/temp/log.do_compile.11635

codrin989 commented 4 years ago

Make it python3-wheel-native instead of python3-wheel. My mistake.

hsnhrn commented 4 years ago

ERROR: python3-cryptoauthlib-20190517-r0 do_compile: 'python3 setup.py build ' execution failed. ERROR: python3-cryptoauthlib-20190517-r0 do_compile: Execution of '/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/temp/run.do_compile.17729' failed with exit code 1: running build running build_py creating /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8 creating /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/tng.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/iface.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/atcacert.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/atjwt.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/device.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/library.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/init.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/atcaenum.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/status.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/exceptions.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib copying cryptoauthlib/atcab.py -> /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib running egg_info writing cryptoauthlib.egg-info/PKG-INFO writing dependency_links to cryptoauthlib.egg-info/dependency_links.txt writing requirements to cryptoauthlib.egg-info/requires.txt writing top-level names to cryptoauthlib.egg-info/top_level.txt reading manifest file 'cryptoauthlib.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'cryptoauthlib.egg-info/SOURCES.txt' running build_ext /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py:42: SyntaxWarning: "is" with a literal. Did you mean "=="? if sys.platform is 'win32': Traceback (most recent call last): File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py", line 148, in build_extension subprocess.check_output(['cmake', cmakelist_path] + cmake_args, cwd=os.path.abspath(self.build_temp), stderr=subprocess.STDOUT) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['cmake', '/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/lib', '-DATCA_HAL_CUSTOM=ON', '-DATCA_HAL_KIT_HID=ON', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/lib.linux-x86_64-3.8/cryptoauthlib', '-DATCA_HAL_I2C=ON', '-DATCACERT_DEF_SRC=/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/atca_utils_sizes.c']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py", line 186, in setup( File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/init.py", line 144, in setup return distutils.core.setup(**attrs) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run _build_ext.run(self) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/setup.py", line 159, in build_extension raise Exception(msg) Exception: -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-gcc -- Check for working C compiler: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-g++ -- Check for working CXX compiler: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done FATAL_ERROR,Missing Build Dependencies for ATCA_HAL_KIT_HID - install libusb-1.0-0-dev or libudev-dev CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: LIBUSB_INCLUDE_DIR used as include directory in directory /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/lib used as include directory in directory /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/lib used as include directory in directory /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/cryptoauthlib-20190517/lib

-- Configuring incomplete, errors occurred! See also "/home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".

USB libraries or headers were not located. If USB support is not required it can be disabled by setting the environment variable CRYPTOAUTHLIB_NOUSB to true before trying to install this package:

   $ export CRYPTOAUTHLIB_NOUSB=True

Run setup.py clean before trying install again or use the pip option --no-cache-dir

WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /home/user/STM32MP15-Ecosystem-v2.0.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/python3-cryptoauthlib/20190517-r0/temp/log.do_compile.17729

hsnhrn commented 4 years ago

"$ export CRYPTOAUTHLIB_NOUSB=True" this is also mentioned by developer on this repo MicrochipTech/cryptoauthlib#176

codrin989 commented 4 years ago

try to add export CRYPTOAUTHLIB_NOUSB = "True" somewhere in the recipe

hsnhrn commented 4 years ago

That worked. I am able to import this version now. thanks a lot

codrin989 commented 4 years ago

Great! Could you please retry without changing the version of the packet? And add only CRYPTOAUTHLIB_NOUSB = "True" and udev in DEPENDS . If it works, could you please send a pull-request with these changes only? Thanks!

hsnhrn commented 4 years ago

yeah, newer version worked too. i sent you a pull-request with that changes. Thanks a lot!