Rac error, bitbake unable to build

Hello,

  • apalis imx8 max
  • custom carrier board
  • Torizon OS 6.6.0

using YOCTO i am trying to build torizon-core-docker with torizon os 6.6.0 and i am getting following error

ERROR: rac-0.0+gitAUTOINC+719afe6b829316c096b3-r0 do_compile: ExecutionError('/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/temp/run.do_compile.4441', 101, None, None)
ERROR: Logfile of failure stored in: /home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/temp/log.do_compile.4441
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: Using rust targets from /home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/rust-targets/
| NOTE: cargo = /home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/recipe-sysroot-native/usr/bin/cargo
| NOTE: cargo build -v --offline --target aarch64-tdx-linux-gnu --release --manifest-path=/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/git//Cargo.toml
| error: could not load Cargo configuration
|
| Caused by:
|   could not parse TOML configuration in `/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/cargo_home/config`
|
| Caused by:
|   could not parse input as TOML
|
| Caused by:
|   TOML parse error at line 42, column 1
|      |
|   42 | olpc-cjson = { path = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/tough/olpc-cjson" }
|      | ^
|   duplicate key `olpc-cjson` in table `patch.https://github.com/toradex/tough`
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/cristiang/YoctoLinux_latest/build-test/conf/../../layers/meta-toradex-torizon/recipes-sota/rac/rac_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4747 tasks of which 4746 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds

Summary: 1 task failed:
  /home/cristiang/YoctoLinux_latest/build-test/conf/../../layers/meta-toradex-torizon/recipes-sota/rac/rac_git.bb:do_compile
Summary: There was 1 WARNING message.
Summary: There was 1 ERROR message, returning a non-zero exit code.

I managed to build this last week and now wanted to remove conman.
The problems started to appear after adding these lines to the local.conf file:

# Remove connman
IMAGE_INSTALL:remove = " connman"
IMAGE_INSTALL:remove = " connman-client"
IMAGE_INSTALL:remove = " connman-gnome"
IMAGE_INSTALL:remove = " connman-plugin-wifi"
IMAGE_INSTALL:remove = " connman-plugin-ethernet"
IMAGE_INSTALL:remove = " connman-plugin-loopback"
# Add NetworkManager
IMAGE_INSTALL:append = " networkmanager"
IMAGE_INSTALL:append = " modemmanager"

I tried repo sync and bitbake torizon-core-docker -c clean but with no success.

What am i missing?
Thanks

Hi @c.gantner !

By default, Torizon OS comes with NetworkManager and ModemManager. Also, it doesn’t have Connman:

torizon@apalis-imx8-06980209:~$ sudo tdx-info

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.129-6.5.0+git.6f8fd49366db #1-TorizonCore SMP PREEMPT Fri Dec 22 11:15:52 UTC 2023
Kernel command line:      pci=nomsi root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/d84a97a24c27b978c409f4a362d0c0c28589d246081ac1a02c48b317582ca645/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.5.0-build.8
Distro variant:           VARIANT="Docker"
Hostname:                 apalis-imx8-06980209
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Apalis iMX8QM V1.1 on Apalis Evaluation Board
Toradex version:          0037 V1.1C
Serial number:            06980209
Processor arch:           aarch64
------------------------------------------------------------
torizon@apalis-imx8-06980209:~$ nmcli --version
nmcli tool, version 1.36.2
torizon@apalis-imx8-06980209:~$ mmcli --version
mmcli 1.18.8
Copyright (2011 - 2021) Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

torizon@apalis-imx8-06980209:~$ connmanctl --version
-sh: connmanctl: command not found

So seems like you are “redoing” work with your set of IMAGE_INSTALL.

Also, about IMAGE_INSTALL on local.conf, please check Bitbake documentation. You should use CORE_IMAGE_EXTRA_INSTALL instead:

Having said that, the issue you are facing seems related to building RAC (Remote Access Client).

Could you please share the TOML configuration you are getting? According to your error log, it should be at /home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/cargo_home/config.

Could you please also try building without the “rework” you are doing related to NetworkManager, ModemManager and Connman?

Best regards,

Hi @henrique.tx ,

i took the image install list form here, networkManager section.

rerun torizon-core-docker without the install, generated same error

TOML config is

# EXTRA_OECARGO_PATHS
paths = [

]

# Local mirror vendored by bitbake
[source.bitbake]
directory = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/cargo_home/bitbake"

[source.crates-io]
replace-with = "bitbake"
local-registry = "/nonexistent"

[http]
# Multiplexing can't be enabled because http2 can't be enabled
# in curl-native without dependency loops
multiplexing = false

# Ignore the hard coded and incorrect path to certificates
cainfo = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt"


# HOST_SYS
[target.aarch64-tdx-linux-gnu]
linker = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/wrapper/target-rust-ccld"

# BUILD_SYS
[target.x86_64-unknown-linux-gnu]
linker = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/wrapper/build-rust-ccld"

[build]
# Use out of tree build destination to avoid polluting the source tree
target-dir = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/build/target"

[term]
progress.when = 'always'
progress.width = 80

[patch."https://github.com/toradex/tough"]
tough = { path = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/tough/tough" }
olpc-cjson = { path = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/tough/olpc-cjson" }

[patch."https://github.com/warp-tech/russh.git"]
russh = { path = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/russh/russh" }
    russh-keys = { path = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/russh/russh-keys" } 
    russh-cryptovec = { path = "/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/russh/cryptovec" }

I am not sure why it uses the --offline instead of online during the cargo build command

Thank you

Update:
when i delte the lines from olpc=cjson and russh from the config file i get this error when trying to rebuild with bitbake

ERROR: rac-0.0+gitAUTOINC+719afe6b829316c096b3-r0 do_compile: ExecutionError('/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/temp/run.do_compile.22688', 101, None, None)
ERROR: Logfile of failure stored in: /home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/temp/log.do_compile.22688
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: Using rust targets from /home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/rust-targets/
| NOTE: cargo = /home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/recipe-sysroot-native/usr/bin/cargo
| NOTE: cargo build -v --offline --target aarch64-tdx-linux-gnu --release --manifest-path=/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/git//Cargo.toml
| error: failed to get `tough` as a dependency of package `rac v0.1.0 (/home/cristiang/YoctoLinux_latest/build-test/tmp/work/cortexa72-cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/git)`
|
| Caused by:
|   failed to load source for dependency `tough`
|
| Caused by:
|   Unable to update https://github.com/toradex/tough?branch=rac#28c2deb2
|
| Caused by:
|   can't checkout from 'https://github.com/toradex/tough': you are in the offline mode (--offline)
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/cristiang/YoctoLinux_latest/build-test/conf/../../layers/meta-toradex-torizon/recipes-sota/rac/rac_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4878 tasks of which 4877 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds

Summary: 1 task failed:
  /home/cristiang/YoctoLinux_latest/build-test/conf/../../layers/meta-toradex-torizon/recipes-sota/rac/rac_git.bb:do_compile
Summary: There was 1 WARNING message.
Summary: There was 1 ERROR message, returning a non-zero exit code.

Greetings,

This Yocto issue with rac was recently discovered and just fixed yesterday on our open source repo, as seen here: rac: fix some compilation problems by MingliuYan · Pull Request #29 · torizon/meta-toradex-torizon · GitHub

Could you try pulling in the latest fix and see if that helps.

Best Regards,
Jeremias

This exact problem happens when I try to build BSP 6.5.0 for the following:

Verdin imx8mp
Verdin eval board
Ubuntu 20.04 host machine

Now this is a pull of 6.5.0 from the repo that only has layers in local.conf that I’ve been appending for a couple of years and have worked fine.

V6.5.0 built fine for me a month or so back but now gets an error for what looks like something related to Rust and Cargo? I haven’t made any changes to networking like described in this post.

Also, this error looks strange -

Caused by:
could not parse input as TOML

Caused by:
TOML parse error at line 41, column 1
|
41 | olpc-cjson = { path = “/mnt/usb/Yocto_BSP_6.5.0_Verdin-patch/build/tmp/work/cortexa53-tdx-linux/rac/0.0+gitAUTOINC+719afe6b829316c096b3-r0/tough/olpc-cjson” }
| ^
duplicate key olpc-cjson in table patch.https://github.com/toradex/tough

Is there a solution for this?

thanks,
Dave

Thanks Jeremias, I didn’t answer before I posted…

Dave

Hi @jeremias.tx

I tested it and it works now, torizon-core-docker builds

Thank you

Hi I want to chime in and say this is affecting torizon-minimal image I’m using the default manifest: Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center

I was using this: repo init -u git://git.toradex.com/toradex-manifest.git -b refs/tags/6.5.0 -m tdxref/default.xml since our project requires to have the revision constant. Will this bug fix be backported? Or must we use kirkstone-6.x.y?

It’s a bit troubling to me that an upstream change can break a stable release like this.

We’re migrating our custom project from an ancient Yocto version so I’m still learning about the new build process :slight_smile:

Hi @gudnimar !

Please take a look at our Embedded Linux Support Strategy | Toradex Developer Center. From there you will understand how Toradex perform the releases and what expectations there should be.

In general guidelines, as you are using a quarterly release, during your development it is expected that you keep updating your OpenEmbedded layers at least with upcoming Quarterly releases. As you can see, there is no support for previous Quarterly/Monthly/Nightly releases.

Best regards,

Thanks for the reply, to continue building the reference image I created a custom manifest repository to pull in that compilation fix. Hopefully it builds now :blush:

So I’m still a little confused…

My questions are the same as gudnimar:

  • why did a change to 6.6.y (that breaks the build) break the stable 6.5.0?
  • is the fix for this going to be in 6.5.0 (soon)?

We need 6.5.0 building for a project we’re working on now. As of an hour ago, the build still breaks…

Hi @buchmeister!

As said previously, please check the Embedded Linux Support Strategy from our documentation.

If you are using BSP 6, which is active, it is expected that you keep updating your layers together with atl least our Quarterly releases.

As BSP/Torizon layers version 6.6.0 were released, previous versions of BSP 6 are not maintained anymore. So there should be no expectation to fix unmaintained versions.

Good question :slight_smile:

The way our RAC recipe was written made it sensitive to some upstream changes (e.g. RAC’s dependencies). With this issue that happened and was fixed already, we are improving the recipe to avoid such issues in the future.

Best regards,

Hey, just pulled the kirkstone-6.x.y branch this morning and got the same error. Should I be specifying a different manifest in the ‘repo init’ command?

thanks,
Dave

@buchmeister, strange are you sure you are on the latest commit for meta-toradex-torizon with the fix I mentioned previously?

I don’t think you need to update the entire manifest/other layers. Just updating meta-toradex-torizon should suffice as seen by other users on these forums who have successfully tested this fix.

Another idea, is perhaps you may need to also clean your build for the fix to take full effect.

Best Regards,
Jeremias

Hey thanks, pilot error…I needed to fix my build env…grabbed the layer fix and it built fine.

Dave

@buchmeister Perfect! Glad we were able to help clear things up.