Core2-for-AWS-IoT-Kit icon indicating copy to clipboard operation
Core2-for-AWS-IoT-Kit copied to clipboard

Blinky Hello World does not work for Apple Silicon devices

Open goose341 opened this issue 3 years ago • 1 comments

You cannot register the EduKit device with IoT Core on Apple Silicon devices due to an issue with Python dependancy cryptoauthlib. Per this issue - the published ARM release is actually for x86.

Attempting to run pio run -e core2foraws-device_reg -t register_thing Apple Silicon users receive the following error:

File "/Users/usr/.platformio/penv/lib/python3.10/site-packages/cryptoauthlib/library.py", line 105: raise LibraryLoadError('Unable to find cryptoauthlib. You may need to reinstall')

Manually running pip3 install cryptoauthlib and importing it in Python breaks down the issue to incompatibility with libcryptoauth.dylib

OSError: dlopen(/opt/homebrew/lib/python3.10/site-packages/cryptoauthlib/libcryptoauth.dylib, 0x0006): tried: '/opt/homebrew/lib/python3.10/site-packages/cryptoauthlib/libcryptoauth.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))

goose341 avatar Sep 14 '22 05:09 goose341

I can confirm this. It fails on M1 Macs, but it works on x86 devices. I've also tried to use an older version of the package, but that did not work as well.

darko-mesaros avatar Sep 15 '22 03:09 darko-mesaros

This should have been originally resolved in cryptoauthlib==20221018

bryan-hunt avatar Nov 05 '22 19:11 bryan-hunt

Tested and validated this is now working with cryptoauthlib==20221104

goose341 avatar Nov 07 '22 01:11 goose341