cancel
Showing results for 
Search instead for 
Did you mean: 

Issue building image for Azure IOT on STM32MP157C-DK2

EBelt.1
Associate II

I'm build an image for Azure IOT on STM32MP157C-DK2, following this tutorial: https://wiki.st.com/stm32mpu/wiki/How_to_integrate_Azure_IoT_Edge_on_OpenSTLinux

but I have follow error:

| error: attributes are not yet allowed on `if` expressions

|  --> /usr/src/debug/iotedge-daemon/1.1.6-r0/iotedge-1.1.6/vendor/sysinfo/src/utils.rs:27:5

|  |

| 27 |   #[allow(clippy::identity_conversion)]

|  |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

| error: aborting due to previous error

| error: could not compile `sysinfo`.

There is a possible solution?

Looking a similar issues, it seem a problem of version of Rust: https://github.com/Frederick888/git-credential-keepassxc/issues/12

There is a way to udate the Rust version used for build?

This discussion is locked. Please start a new topic to ask your question.
11 REPLIES 11
darla14
Senior

Hello,

have you installed all the dependencies needed for the Distribution package building?

Br,

EBelt.1
Associate II

Yes, I did. once I make follow command:

DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh

it asked me all dependencies. I installed them and after when I re launch the command, it say was all ok and I started the build.

Can I ask witch versions of repository of those layers are tested in the tutorial?

PC $>git clone -b dunfell https://github.com/Azure/meta-iotedge.git

PC $>git clone git://github.com/meta-rust/meta-rust.git

PC $>git clone -b dunfell git://git.yoctoproject.org/meta-virtualization

I noticed that the are some update in repository meta-iotedge.git in date after the last update of article.

Hello @EBelt.1​ 

to build Rust packages, I am using this repository:

https://github.com/rust-embedded/meta-rust-bin

It may help you. This layer supports Rust 1.54 and it is easy to upgrade to 1.55 (use the script build-new-version.sh).

Best regards,

--JM

EBelt.1
Associate II

Thank you for your support. Just to understand (I'm pretty new to this builds), you say to replace those steps:

git clone git://github.com/meta-rust/meta-rust.git

bitbake-layers add-layer [your STM32MP1 Distribution path]/meta-rust/

with:

git clone https://github.com/rust-embedded/meta-rust-bin

bitbake-layers add-layer [your STM32MP1 Distribution path]/meta-rust-bin/

About that, I looking that has a specific branch for dunfell, instead meta-rust-bin has only for dizzy and zeus. What branch should I use? The master branch?

@EBelt.1 

Yes, you can use the master branch. The compatibility layer as defined in conf/layer.conf includes dunfell.

Best regards,

--JM

EBelt.1
Associate II

I tried to use meta-rust-bin, but the layer iot edge looks to depend on meta-rust:

ERROR: Layer 'meta-iotedge' depends on layer 'rust-layer', but this layer is not enabled in your configuration

Hello @EBelt.1​ 

ok, I was not aware of this dependency. Too bad, the meta-rust-bin layer is quite quick ;)

To come back to your initial question, you can update the Rust compiler version by setting the variable RUST_VERSION = "1.55.0" (or other values) in your local.conf file.

About the versions used in the tutorial:

meta-iotedge : branch dunfell  : commit 6840cf2afb51b4f2c535a05d5635736652f664f7
meta-virtualization : branch dunfell  : commit 502b81ae3ae11bf4d889b7eff6239fb9e6c55994
meta-rust : branch master : commit e4d25b98083bcecb94df6ee189a165d63ede7f3d

The tutorial has been validated against the delivery ecosystem release v3.0.0 so be sure to used it.

Best regards,

--JM

EBelt.1
Associate II

Thank you for the suggestion! I added RUST_VERSION = "1.55.0" to local.conf and aligned layers as suggested, but I had an error on building virtualitation (a repo was not found), but moving virtualitation to lastest everything work fine.

So, my final set was:

meta-iotedge : branch dunfell : commit 6840cf2afb51b4f2c535a05d5635736652f664f7

meta-rust : branch master : commit e4d25b98083bcecb94df6ee189a165d63ede7f3d

meta-virtualization : branch dunfell : latest commit

RUST_VERSION = "1.55.0" in local.conf

and I successfully build the image and connected to IOTedge.

I noticed that the version of Iotedge is 1.1, that has know issues. Is it possible to update to version 1.2 of iotedge?

Hello @EBelt.1​ 

I am happy you successfully built your image! That's a good point!

About your last question to migrate from 1.1 to 1.2 for the layer iotedge, I don't know. I think you should make an attempt on your side and select this version in your cloned repository and re-do the build.

Best regards,

--JM