Bitbake Yocto rust-llvm_1.59. Nitrogen8mm SBC

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bitbake Yocto rust-llvm_1.59. Nitrogen8mm SBC

Contributor I

I am attempting to follow these instructions on a Nitrogen8m Mini SBC . I am using the following Dockerfile for the build environment set up: 

After modifying the local.conf file and executing the bitbake command, I received the following error:
ERROR: Task (virtual:native:/home/jenkins/yocto-mender/sources/poky/meta/recipes-devtools/rust/ failed with exit code '1'

I noticed the poky repo is synced to this git repo - , and it looks like the /poky/meta/recipes-devtools/rust/ folder for the kirkstone branch does incude the 1.59 rust version, not a higher version.

For reference, here is the Build Configuration output.



Can anyone help me understand why this error is occurring with rust-llvm? Do I need to manually update the poky repo to use a newer version of rust-llvm? For example, it looks like the poky repo kept in github uses version 1.67 instead 

0 Kudos
3 Replies

Contributor I


Regarding your query, I would like to mention that while I am not an expert or an employee of NXP, I have successfully compiled and executed a Rust program on an IMX8MP device. As per my understanding, the only version of Rust supported on Kirkstone release of The Yocto Project is 1.59. Although there is a variable RUSTVERSION in poky/meta/conf/distro/include/, there is no recipe available in poky/meta/recipes-devtool/rust for versions other than 1.59. The master layer of poky, however, supports Rust version 1.67. Since seems you are using Kirkstone, I believe you have a few options to consider:

  1. Attempt to use the poky master branch, although this may potentially break the build for other recipes in other layers.

  2. Endeavor to port the necessary Rust files from the master to your Kirkstone branch.

  3. Utilize the meta-rust layer. However, please keep in mind that there is already Rust support in the poky/openembedded core layer, and there may be conflicts that arise. To address this, you will need to set layer priorities.

  4. Opt to use Rust 1.59, if feasible. From my understanding, the changes in Rust between versions 1.59 and 1.67 should not cause significant issues.

Also, about the error in you rust-llvm compilation. Can you show your log file output in tmp/work of your build?

Best regards,

0 Kudos

Contributor I

@jpgoncalves I was able to get the build working as is with rust-llvm-1.59.0. It turns out that this package specifically takes a lot of RAM/CPU to build and I was running into low RAM issues when executing the full build, which wasn't apparent as the cause of the error in the build error output. I followed the instructions from the NXP post below by building rust-llvm separately with "bitbake rust-llvm" and then built the full package again and it worked.

0 Kudos

Contributor III

Ran it with 4 CPUs and 10 G of memory - still doesn't work. Is there a quick and dirty way of just removing rust from the build? Not planning on using it anyway.

0 Kudos