Skip to content

Fix Flutter compatibility in QEMU custom device configuration #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v2.0
Choose a base branch
from

Conversation

AhmedAdelWafdy7
Copy link

Description

This PR fixes Flutter compatibility issues in the QEMU custom device configuration by updating the environment variables.

Initial Issue

I am preparing to contribute in GSoC2025 with Linux Foundation ..while preparing to the AGL Flutter Quiz , I encountered the following error when trying to run a Flutter app in the AGL QEMU environment:

Launching lib/main.dart on AGL salmon-latest QEMU Image in debug mode...
Warning: Permanently added '[localhost]:2222' (ED25519) to the list of known hosts.
[12:31:43.702010] [I] v2.0 @ 2341312e
[12:31:43.702133] [I] **
[12:31:43.702135] [I] * Global *
[12:31:43.702137] [I] **
[12:31:43.702138] [I] Application Id: .......... agl-qemu-salmon
[12:31:43.702140] [I] Cursor Theme: ............ DMZ-White
[12:31:43.702141] [I] Disable Cursor: .......... false
[12:31:43.702143] [I] Debug Backend: ........... false
[12:31:43.702144] [I] **
[12:31:43.702145] [I] * View *
[12:31:43.702146] [I] **
[12:31:43.702148] [I] Bundle Path: .............. /tmp/rive_example
[12:31:43.702149] [I] Window Type: .............. BG
[12:31:43.702151] [I] Output Index: ............. 0
[12:31:43.702153] [I] Size: ..................... 1080 x 1920
[12:31:43.702156] [I] Pixel Ratio: .............. 1.0
[12:31:43.702158] [I] Fullscreen: ............... true
[12:31:43.702159] [I] Accessibility Features: ... 0
libEGL warning: MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
[12:31:50.059588] [I] (0) Runtime=debug
[ERROR:flutter/shell/common/shell.cc(115)] Dart Error: Can't load Kernel binary: Invalid kernel binary format version.
[ERROR:flutter/runtime/dart_isolate.cc(147)] Could not prepare isolate.
[ERROR:flutter/runtime/runtime_controller.cc(549)] Could not create root isolate.
[ERROR:flutter/shell/common/shell.cc(675)] Could not launch engine with configuration.

This error occurred due to Flutter version incompatibility between the host machine and the QEMU environment.

Changes

  • Updated Flutter SDK packaging to only include essential files
  • Added explicit engine copying from host to QEMU device
  • Fixed symlink paths for Flutter resources
  • Added proper file permission settings (chmod 777 & chown)
  • Added Flutter bundle building step to the install process
  • Created system-wide symlinks for ICU data files

Testing Done

Tested with the Rive Flutter example app on AGL QEMU salmon image. The app now runs correctly without errors about incompatible kernel binary formats or missing libraries.

Issues Fixed

  • Fixed the "Invalid kernel binary format version" error that prevented Flutter apps from running
  • Fixed "libflutter_engine.so: cannot open shared object file" error
  • Fixed "icudtl.dat is not present" error when running Flutter apps on the QEMU device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant