Flutter demo image build fails

Fixed

Description

Hi everyone, i am trying to run a build image for RaspberryPi4 with target: agl-ivi-demo-platform-flutter after about 70% of the operation I encountered the following error:

ERROR: Task (virtual:native:/home/ubuntu-infotainment/AGL/octopus/external/meta-clang/recipes-devtools/clang/clang_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6565 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  virtual:native:/home/ubuntu-infotainment/AGL/octopus/external/meta-clang/recipes-devtools/clang/clang_git.bb:do_compile
Summary: There were 6 WARNING messages.
Summary: There was 1 ERROR message, returning a non-zero exit code.

Steps performed for env setup:

I have already tried deleting /tmp and /downloads and running the build again with bitbake.
Also, I wanted to ask if there was any documentation for creating and adding embedded applications in Flutter. Thank you very much!

  • - - - - -

UPDATE  1 - - - - - -
Possible it is related to gcc version? 
I am using: gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04) retrieved from <build-dir>/tmp/hosttools/gcc 

  • - - - - -

 UPDATE 2 

  • - - - - -

After cleaning the /tmp folder and /downloads I tried again with a new build but the result is the same. Attached I have retrieved the clang compile log. (
log.do_compile.996579 )

  • - - - - - UPDATE 3  - - - - - -

 

In the console-latest file (attached) I highlighted the following compilation errors:

ERROR: agl-service-audiomixer-2.0+gitAUTOINC+f137c6762e-r0 do_compile: ExecutionError('/home/ubuntu-infotainment/AGL/build-flutter-dashboard/tmp/work/aarch64-agl-linux/agl-service-audiomixer/2.0+gitAUTOINC+f137c6762e-r0/temp/run.do_compile.786659', 1, None, None)
ERROR: Logfile of failure stored in: /home/ubuntu-infotainment/AGL/build-flutter-dashboard/tmp/work/aarch64-agl-linux/agl-service-audiomixer/2.0+gitAUTOINC+f137c6762e-r0/temp/log.do_compile.786659
NOTE: recipe agl-service-audiomixer-2.0+gitAUTOINC+f137c6762e-r0: task do_compile: Failed
ERROR: Task (/home/ubuntu-infotainment/AGL/octopus/meta-agl-demo/recipes-demo/agl-service-audiomixer/agl-service-audiomixer_git.bb:do_compile) failed with exit code '1'

ERROR: clang-native-14.0.3-r0 do_compile: ExecutionError('/home/ubuntu-infotainment/AGL/build-flutter-dashboard/tmp/work/x86_64-linux/clang-native/14.0.3-r0/temp/run.do_compile.3381485', 1, None, None)
ERROR: Logfile of failure stored in: /home/ubuntu-infotainment/AGL/build-flutter-dashboard/tmp/work/x86_64-linux/clang-native/14.0.3-r0/temp/log.do_compile.3381485
NOTE: recipe clang-native-14.0.3-r0: task do_compile: Failed
ERROR: Task (virtual:native:/home/ubuntu-infotainment/AGL/octopus/external/meta-clang/recipes-devtools/clang/clang_git.bb:do_compile) failed with exit code '1'

log.do_compile.786659 and log.do_compile.3381485 are in attachment.

  • - - - - - UPDATE 4  - - - - - -

 
SOLUTION OOM CC1PLUS

Environment

Linux 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC x86_64 x86_64 x86_64 GNU/Linux

Attachments

5

Activity

Show:

Marius Vlad 
March 13, 2023 at 11:44 AM
(edited)

I'd suggest opening a new Jira ticket with these new issues you encountered and not hijack this one.

It would far more easier to track, and because these are not related.

Michele RUOCCO (KINETON) 
March 13, 2023 at 9:18 AM
(edited)

Thank you very much for the support, it would be helpful to have something more detailed for creating the recipient and inserting into an image build for RPi4 target. 

Following what you have provided I am currently stuck here:

 curl --proto '=https' --tlsv1.2 -sSf https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl-devel.git;a=blob_plain;f=meta-agl-flutter/tools/flutter_workspace_config.json;hb=HEAD -o flutter_workspace_config.json 

" -o " is not recognized as a command

EDIT:
Overridden by manually downloading the workspace config json.

Joel Winarske 
March 10, 2023 at 6:10 PM

Hello,

The starting point for AGL would be this readme:
https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl-devel.git;a=blob;f=meta-agl-flutter/README.md;h=86b4f75b71fb070963ae2bbda52a1a3500003e87;hb=HEAD

Also take a look at:
https://github.com/meta-flutter

The workflow would be use flutter workspace automation on Ubuntu 20/22 or Fedora 36/37 desktop. Using device flutter-auto. This is the same embedder that runs in an AGL image. When you're happy with behavior create a recipe for your application, and then build image to test AOT image. Image can be QEMU x86_64, arm64 (Mac M1 Ventura), or target device. Mac M1 is an option with arm64 image using qemu-virt launcher on Ventura.

meta-flutter has pre-built os images which are ahead of AGL builds at the moment. Just find the last "green" build. I've been having raid issues, otherwise nightly builds would be green.

You can also raise issues on meta-flutter for help. That would be quicker than AGL issue.

Marius Vlad 
March 10, 2023 at 1:44 PM
(edited)

yocto/OE generates a package (defaults to rpms) but can be changed to generate debs) which get installed in the target's sysroot. If you do a rpm -qa on the target device you'll see all the packages installed – assuming you haven't changed them to debs.

So there's no generic package which you deploy on the target machine, you can either use well rpms or deb packages. You'll need to come with a workflow which suits your needs such that you can make this development part as hassle free as possible. I believe there's a few ways of doing it, so don't expect this to be the only way.

Generating each time an new image and installing it to sdcard then test it, would be really really painful and time consuming. My suggestion would be to re-generate your package and deploy it manually on the target device using the network. Build locally, test on the device basically.

You can use the SDK (https://docs.automotivelinux.org/en/octopus/#04_Developer_Guides/01_Setting_Up_AGL_SDK/) but that won't generate a package for you to deploy, so we're pretty much missing that. You can probably well optimize this to just transfer the binary bits and some assets, but you'll need to figure out which.

The second suggestion would create a recipe for your package, add the package as a dependency to the image such that if you want generate a new fresh image to pull that in. Copy and rename one of the already existing flutter application, as that has all the necessary bits to have a working image available.

Third, make use of externalsrc yocto/OE feature, or alternatively use devtool to write/compile locally on your host/machine. After you have set that up, doing a

$ bitbake your_package_name

would generate oe-workdir/ which contains the RPMs/DEB packages that you can scp to the target device, assuming that you have made it available to the target. Don't really remember the entire path, you'll have to do a find. After transferring, of course, you'll need to install it using rpm --force --install /path/to/your_package.rpm

You then just re-iterate this third part over and over again to rebuild, deploy, and test the application on the target device itself.

This isn't specific to flutter at all, this is just about setting up a developer workflow than can really help up avoiding and spending huge amount of just transferring sdcards.

There's some documentation on the flutter side, especially to well, try out the flutter application on the developer machine, rather than on the target.

I'd suggest looking into https://confluence.automotivelinux.org/pages/viewpage.action?pageId=49157081&preview=%2F49157081%2F49157082%2FAGL+Flutter+Deep+Dive.pdf

I believe there was some kind of talk/presentation from at some point which had some kind of workflow and helper tools but I can't seem to find them. Maybe he see this and chimes in.

Michele RUOCCO (KINETON) 
March 10, 2023 at 1:16 PM

I solved it, by adding more than 36GiB to the swapfile I completed an error-free build. Right now I am flashing the sdcard to test the result.

Is there any documentation for Flutter app development and installation? I would like to understand this better and also I was wondering if it is necessary to build the image with each app that is created and inserted into the system - I would like to prepare with a higher performance machine. Thank you for support!

Details

Assignee

Reporter

Hardware Platform(s) Affected

Raspberry Pi 4

Components

Affects versions

Priority

Created March 7, 2023 at 1:46 PM
Updated March 29, 2023 at 2:46 PM
Resolved March 10, 2023 at 1:32 PM