2023-03-04 06:32 AM
hi st expert
When i use pip3 install some package on board, i get some error as follew:
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-armv7l-3.8
creating build/temp.linux-armv7l-3.8/c
arm-ostl-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wno-unused-result -Wsign-compare -DNDEBUG -
g -O3 -Wall -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/python3/3.8.2-r1=/usr/src/debug/python3/3.8.2-r1 -fdebug-prefix-m
ap=/python3/3.8.2-r1=/usr/src/debug/python3/3.8.2-r1 -fdebug-prefix-map== -fdebug-prefix-map== -O2 -pipe -g -feliminate-unused-debug-types -f
macro-prefix-map=/python3/3.8.2-r1=/usr/src/debug/python3/3.8.2-r1 -fdebug-prefix-map=/python3/3.8.2-r1=/usr/src/debug/python3/3.8.2-r1 -fdeb
ug-prefix-map== -fdebug-prefix-map== -fPIC -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.8 -c c/_cffi_back
end.c -o build/temp.linux-armv7l-3.8/c/_cffi_backend.o
unable to execute 'arm-ostl-linux-gnueabi-gcc': No such file or directory
error: command 'arm-ostl-linux-gnueabi-gcc' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
could you give me some advice for this issue? thanks
B&R
Tao
2023-03-05 10:40 PM
Hi @ttao.1
The image installed on STM32MP boards doesn't contain any toolchain nor *-dev or *-src packages hence the error displaying «No such file or directory».
Did you check your python module is not already available through the package repository service?
# apt-cache policy python3-<your_module>
If not, you have to create a recipe for each python module which is not available by default and build them from your host PC. Please refer to the wiki page: ttps://wiki.stmicroelectronics.cn/stm32mpu/wiki/How_to_add_a_customer_application
Best regards,
--JM
2023-03-06 08:34 AM
hi JM
I want to install a third-party python package through pip3, I have ***-py3-none-any.whl file, is there an example that can be referred to in this integration into the bb file, I see that ttps://wiki.stmicroelectronics.cn/stm32mpu/wiki/How_to_add_a_customer_application this link does not seem to have my scenario and requirements? thanks
B&R
Tao
2023-03-06 09:43 AM
Hi @ttao.1
If your python module is available through https://pypi.org/ , the recipe is almost straightforward. I think you can use the recipe meta/recipes-devtools/python/python3-tomli_2.0.1.bb in the openembedded-core layer as an example.
If the name of your module is mymodule and its current version is x.y.z, the recipe name will be python3-mymodule_x.y.z.bb
It may happen your module needs some dependencies at build time or at run time. If so, add the lines:
DEPENDS = "<the dependencies at build time>"
RDEPENDS:${PN} += "<the dependencies at run time">
Best regards,
--JM
Best regards,
--JM
2023-03-06 06:20 PM
2023-03-06 07:24 PM
hi JM
I found the answer on StackOverflow, thank you for your support.
https://stackoverflow.com/questions/51682111/how-to-add-python-modules-in-yocto-build
B&R
Tao