ardera / flutter-pi

A light-weight Flutter Engine Embedder for Raspberry Pi that runs without X.
MIT License
1.48k stars 153 forks source link

pi@raspberrypi:~ $ flutter-pi ./test/ filesystem_layout.c: icudtl file not found! #383

Open gnu-xiaosong opened 3 months ago

gnu-xiaosong commented 3 months ago

pi@raspberrypi:~ $ flutter-pi ./test/ filesystem_layout.c: icudtl file not found!

why?

SwordTechCorp commented 3 months ago

You need to install engine binary. You can either build it yourself or just follow the instruction provided by the author repo

It's mentioned in the readme btw.

manszigher commented 1 month ago

I am faced with the same problem I am building using the yocto project and have bumped up flutter to 3.19.3. When installing flutter 3.19.3 we are getting the following files installed

flutter-engine:
       /usr/share/flutter/3.19.3/debug/data/icudtl.dat
       /usr/share/flutter/3.19.3/debug/lib/libflutter_engine.so
       /usr/share/flutter/3.19.3/profile/data/icudtl.dat
       /usr/share/flutter/3.19.3/profile/lib/libflutter_engine.so
       /usr/share/flutter/3.19.3/release/data/icudtl.dat
       /usr/share/flutter/3.19.3/release/lib/libflutter_engine.so

From looking at the flutter-pi code

https://github.com/ardera/flutter-pi/blob/master/src/filesystem_layout.c#L97

it looks like it will only look for the engine directly under /usr/share/flutter so it cannot locate the icudtl file. Now I can change it so that we skip the version and only install under /usr/share/flutter but flutter-pi will still not find the file because in this version it is placed under the data folder which was not the case earlier. So is my installation of flutter-engine broken or can I tell flutter-pi where to look for the icudtl file?

manszigher commented 1 month ago

I am new to the flutter eco-system but I am using this https://github.com/meta-flutter/meta-flutter/blob/kirkstone/recipes-graphics/flutter-engine/flutter-engine_git.bb to install the flutter-engine.

ardera commented 3 weeks ago

@manszigher It will look in /usr/share/flutter, but also in data/icudtl.dat relative to the bundle path, at least when the meta-flutter filesystem layout is chosen at build-time. (Which meta-flutter will do for you implicitly)

meta-flutter will add symlinks at those locations: https://github.com/meta-flutter/meta-flutter/blob/kirkstone/conf/include/flutter-app.inc#L54-L59

What commandline are you launching flutter-pi with?