Hi all,
yocto zeus branch toolchains compile optee_example code ,ModuleNotFoundError: No module named 'Crypto'
(maaxbaord sumo branch worked well).
I use yocto toolchains to cross compile optee_example code,
error happened:
from Crypto.Signature import PKCS1_v1_5
ModuleNotFoundError: No module named 'Crypto'
but I find in toolchain folder, the Crypto folder is there:
./sysroots/aarch64-poky-linux/usr/lib/python3.7/site-packages/Crypto
It seems the compiler can not find it ?
I have added :
IMAGE_INSTALL_append +=" python3-pycryptodome " in local.conf
any help?
About 2 year ago,I posted a similar question #3441 but that was in yocto bitbake process in early, could not generate the yocto image.
Today I play another board, I can build the image and the toolchain, the new issue is the toolchain compiler can not find the 'Crypto'
Thank you.
error:
aarch64-poky-linux-gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux -o optee_example_aes main.o -lteec -L/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr//lib
make[1]: Leaving directory '/opt/oe/iw/iw-5.4.24/optee_examples/aes/host'
make -C ta CROSS_COMPILE="aarch64-poky-linux-" LDFLAGS=""
make[1]: Entering directory '/opt/oe/iw/iw-5.4.24/optee_examples/aes/ta'
CC aes_ta.o
CC user_ta_header.o
CPP ta.lds
LD 5dbac793-f574-4871-8ad3-04331ec17f24.elf
OBJDUMP 5dbac793-f574-4871-8ad3-04331ec17f24.dmp
OBJCOPY 5dbac793-f574-4871-8ad3-04331ec17f24.stripped.elf
SIGN 5dbac793-f574-4871-8ad3-04331ec17f24.ta
Traceback (most recent call last):
File "/usr/local/optee/sysroots/aarch64-poky-linux/usr/include/optee/export-user_ta_arm64//scripts/sign.py", line 78, in
main()
File "/usr/local/optee/sysroots/aarch64-poky-linux/usr/include/optee/export-user_ta_arm64//scripts/sign.py", line 31, in main
from Crypto.Signature import PKCS1_v1_5
ModuleNotFoundError: No module named 'Crypto'
/usr/local/optee/sysroots/aarch64-poky-linux/usr/include/optee/export-user_ta_arm64/mk/link.mk:60: recipe for target '5dbac793-f574-4871-8ad3-04331ec17f24.ta' failed
make[1]: *** [5dbac793-f574-4871-8ad3-04331ec17f24.ta] Error 1
make[1]: Leaving directory '/opt/oe/iw/iw-5.4.24/optee_examples/aes/ta'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2