cancel
Showing results for 
Search instead for 
Did you mean: 

Cross compiling pyzmq

venkatKrishna
Associate II

I've been trying to cross compile pyzmq for my stm32mp135f-dk and I'm facing issues with it. 
I've ran the script to setup my environment for the SDK. And made the required changes in the setup file. Here's my stackoverflow post with the logs as well. 

https://stackoverflow.com/questions/77420874/cross-compiling-pyzmq-fails-because-the-setup-picks-up-the-x86-compiler-automati?noredirect=1#comment136505142_77420874

Any help is much appreciated. 
The goal is to have a IPC mechanism between a C and Python application that is quick to implement.

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan SZYMANSKI
ST Employee

Hello @venkatKrishna ,
I just have checked in OpenSTLinux distribution, and a package is present in Yocto. I think you can try to add it to your build. In fact, as it has been mentioned in your other post, some packages can have a lot of dependencies and it is not always easy to handle it manually. Hopefully, Yocto know how to deal with it. 

1) Follow https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package to setup the distribution environment.

2) Add this line to your <build>/conf/local.conf

 

IMAGE_INSTALL:append = " python3-pyzmq "

 

3) Then compile the distribution :

 

bitbake st-image-weston

 

4) Finally, you can create your own SDK : 

 

bitbake st-image-weston -c populate_sdk

 


I hope it will help you to forward.
Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

7 REPLIES 7
Erwan SZYMANSKI
ST Employee

Hello @venkatKrishna ,
I just have checked in OpenSTLinux distribution, and a package is present in Yocto. I think you can try to add it to your build. In fact, as it has been mentioned in your other post, some packages can have a lot of dependencies and it is not always easy to handle it manually. Hopefully, Yocto know how to deal with it. 

1) Follow https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package to setup the distribution environment.

2) Add this line to your <build>/conf/local.conf

 

IMAGE_INSTALL:append = " python3-pyzmq "

 

3) Then compile the distribution :

 

bitbake st-image-weston

 

4) Finally, you can create your own SDK : 

 

bitbake st-image-weston -c populate_sdk

 


I hope it will help you to forward.
Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
venkatKrishna
Associate II

Thank you @Erwan SZYMANSKI 
I'll try your suggestion and update here how it goes. You have written that you checked the OpenSTLinux distribution, and that a package is present in Yocto. What exactly do you mean by this? Where can I check the packages that are available on Yocto? 

venkatKrishna
Associate II

Hi @Erwan SZYMANSKI ,

Thank you so much! Yocto was able to build the pyzmq package. I flashed the built image in my board and I can see the libraries inside my /usr/lib. I truly appreciate your help!

Now, when I'm trying to build the SDK, I get an error saying 

WARNING: nativesdk-cmsis-svd-0.4+gitAUTOINC+f487b5ca7c-r0 do_fetch: Failed to fetch URL git://github.com/posborne/cmsis-svd.git;protocol=https;branch=master, attempting MIRRORS if available
ERROR: nativesdk-cmsis-svd-0.4+gitAUTOINC+f487b5ca7c-r0 do_fetch: Fetcher failure: Unable to find revision f487b5ca7c132b8f09d11514c509372f83a6cb75 in branch master even from upstream
ERROR: nativesdk-cmsis-svd-0.4+gitAUTOINC+f487b5ca7c-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/posborne/cmsis-svd.git;protocol=https;branch=master')
ERROR: Logfile of failure stored in: /home/fuji/stm_dist/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/temp/log.do_fetch.589754
ERROR: Task (virtual:nativesdk:/home/fuji/stm_dist/layers/meta-st/meta-st-stm32mp/recipes-devtools/cmsis-svd/cmsis-svd_git.bb:do_fetch) failed with exit code '1'

 

If you have any suggestions for this, that would be helpful! Thanks.

This above error was because of some URL mismatch in the recipe, I've fixed it manually and it worked. Looks like there's an open PR already to add these changes in the meta-st-stm32mp repo.

Hello @venkatKrishna ,
Thank you for you try and your feedback, really appreciated.

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
venkatKrishna
Associate II

@Erwan SZYMANSKI  Where can I see what other packages are present in the yocto? How were you able to find that pyzmq was present? 
Thanks again for your time and help!

@venkatKrishna ,
Just by making a research in the recipes provided by Yocto in our distribution. 2 solutions :

- a recursive "find" command to check if there is a corresponding Yocto recipe <name>.bb available.
bitbake -s command that should display all the recipes visible from Yocto compiling paths. 

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.