sony / flutter-embedded-linux

Embedded Linux embedding for Flutter
BSD 3-Clause "New" or "Revised" License
1.22k stars 129 forks source link

Test on arm devices #4

Open HidenoriMatsubayashi opened 3 years ago

HidenoriMatsubayashi commented 3 years ago

This issue is a memo for testing on different arm devices. I would like to test on a lot of arm devices.

Tested devices

HidenoriMatsubayashi commented 3 years ago

@Mai-Matsuura Could you try testing on Raspberry Pi4?

ghost commented 3 years ago

Yes, I will try it.

psstoyanov commented 3 years ago

Observations from my devices:

Currently I can't verify on my desktop system using RX6800 (main desktop environment - Plasma Wayland). For whatever reason the Dart VM snapshot version doesn't match:

./flutter-drm-backend sample_2/build/linux/x64/release/bundle           
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
[ERROR][context_egl.h(95)] Failed to create EGL off-screen surface.(eglGetError: EGL_BAD_ALLOC)
[ERROR][linuxes_surface_gl_drm.h(50)] Off-Screen surface is invalid.
[ERROR][native_window_drm.cc(89)] TODO: implement here!!
[ERROR][flutter_linuxes_view.cc(60)] Failed to change surface size.
[ERROR][native_window_drm.cc(311)] Unsupported cursor: 
[ERROR][native_window_drm.cc(176)] Could not move the mouse cursor: -13
[ERROR][native_window_drm.cc(130)] Failed to set cursor buffer. (-13)
[FATAL:flutter/runtime/dart_vm_initializer.cc(22)] Error while initializing the Dart VM: Wrong full snapshot version, expected '39a9141bbcc3cae43e6f9f6b7fbaafe3' found 'aac992673ad0e4a5e41716d2a9911c88'
[1]    171859 abort (core dumped)  ./flutter-drm-backend sample_2/build/linux/x64/release/bundle
HidenoriMatsubayashi commented 3 years ago

Thank you for your comment.

[FATAL:flutter/runtime/dart_vm_initializer.cc(22)] Error while initializing the Dart VM: Wrong full snapshot version, expected '39a9141bbcc3cae43e6f9f6b7fbaafe3' found 'aac992673ad0e4a5e41716d2a9911c88'
[1]    171859 abort (core dumped)  ./flutter-drm-backend sample_2/build/linux/x64/release/bundle

The first problem is that the Flutter SDK and Engine (libflutter_engine.so) versions don't match. Could you re-build Flutter Engine (libflutter_engine.so) with the same version using in the Flutter SDK you are using? Flutter SDK specifies the version of Flutter Engine in ${INSTALL_PATH}/bin/internal/engine.version.

But I need to update README.

psstoyanov commented 3 years ago

Thank you for the information! This makes it a lot easier to verify if the correct versions are in use.

The issue on my x64 machine could lie somewhere else as the versions are indeed matching :thinking: I will clean and update my setup later today to ensure there are no lingering caches remaining. I've already thoroughly cleaned the Flutter SDK && sample projects but I haven't done the same for the depot_tools yet.

Versions matching ``` $ cat flutter/bin/internal/engine.version && cat depot_tools/.gclient 9b5f59ec3d54815931662a78a6ef34aa38bd5270 solutions = [ { "managed": False, "name": "src/flutter", "url": "https://github.com/flutter/engine.git@9b5f59ec3d54815931662a78a6ef34aa38bd5270", "custom_deps": {}, "deps_file": "DEPS", "safesync_url": "", }, ] ```
psstoyanov commented 3 years ago

Update with RK3399 system - PinebookPro running ManjaroARM kernel 5.11.3 && mesa 20.3.4 using the DRM mode:

Detailed log with lldb ``` lldb ./flutter-drm-backend ./sample/build/linux/arm64/release/bundle (lldb) target create "./flutter-drm-backend" Current executable set to '/home/pak0st/flutter-embedded-linux/build/flutter-drm-backend' (aarch64). (lldb) settings set -- target.run-args "./sample/build/linux/arm64/release/bundle" (lldb) run Process 2714 launched: '/home/pak0st/flutter-embedded-linux/build/flutter-drm-backend' (aarch64) [WARNING][linuxes_window_drm.cc(102)] FLUTTER_DRM_DEVICE is not set, use /dev/dri/card0 [WARNING][context_egl.h(95)] Failed to create EGL off-screen surface.(eglGetError: EGL_BAD_ALLOC) [WARNING][linuxes_surface_gl_drm.h(50)] Off-Screen surface is invalid. [ERROR][native_window_drm.cc(89)] TODO: implement here!! [ERROR][flutter_linuxes_view.cc(60)] Failed to change surface size. [ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig. [ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig. [ERROR][native_window_drm.cc(311)] Unsupported cursor: ```
psstoyanov commented 3 years ago

Small update towards my experiments on x64 with my Ryzen/RDNA2 machine:

LefixBlue commented 3 years ago

Hi, I follow your work regarding flutter and embedded for a while already and I am very happy about it, because I share the same view of Sony regarding flutter and embedded linux! And it's amazing to see it running now on embedded devices..

Now lets come to my test:

So far from my side. I am looking forward to the cross compile feature! If someone can give me a hint how to generate the app.so manually on an x64 (without the needs to wait the related PR to be merged) would also be cool.

HidenoriMatsubayashi commented 3 years ago

@LefixBlue

Thank you for your comments. Those are helpful.

Error was about unordered_map includes missing in at least one header file (key_event_plugin.h).

I fixed that (https://github.com/sony/flutter-embedded-linux/pull/22)

HidenoriMatsubayashi commented 3 years ago

@LefixBlue

In terms of cross-building, I'm going to send a PR to add cross-building support into the Flutter SDK. I'll do it in March.

If someone can give me a hint how to generate the app.so manually on an x64

Yes, see: https://github.com/flutter/flutter/wiki/Custom-Flutter-Engine-Embedding-in-AOT-Mode#building-the-aot-snapshot

LefixBlue commented 3 years ago

@HidenoriMatsubayashi Thank you for the link regarding snapshots. I will have a look into it.

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

After reading the provided link I was still unsure where to get the correct gen_snapshot from. But now I just realized that building the engine for arm64 on x64 will produce a gen_snapshot in clang_x64/exe.unstripped folder with simarm64 target. So this one can be used on x64 to "cross-compile" the app.dill to app.so for arm64.

Thanks for your help!

psstoyanov commented 3 years ago

@LefixBlue check #21 for:

First I was thinking the flutter-client can be used without weston, directly from within CLI, but that was probably more related to my little understanding about it.

I agree that side-stepping the GTK app compile will be great once the embedder matures enough :)

psstoyanov commented 3 years ago

Had some fun doing something unconventional tonight by compiling the embedder on MSM8916 device (Wileyfox Swift) with postmarketOS. It resulted in the following errors:

pmOS linker errors ``` ➜ build git:(master) make [ 3%] Linking CXX executable flutter-drm-backend /usr/bin/ld: warning: libdl.so.2, needed by /usr/lib/libflutter_engine.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libpthread.so.0, needed by /usr/lib/libflutter_engine.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libm.so.6, needed by /usr/lib/libflutter_engine.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libc.so.6, needed by /usr/lib/libflutter_engine.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: ld-linux-aarch64.so.1, needed by /usr/lib/libflutter_engine.so, not found (try using -rpath or -rpath-link) ```

The errors have less to do with the embedder itself and more with Flutter/ Alpine linux.

There are several issues with the method I've use to conduct the attempt on this device tonight:

I will need to prepare a proper setup and try again but thought it would be interesting to share nonetheless.

LefixBlue commented 3 years ago

Some new input from my side as well:

Building the "flutter-weston-dekstop-shell" not succeed in my environment. It already failed on my first attempt directly on the raspberry pi some days ago, but now I retried building it cross with yocto and getting the same result.

HidenoriMatsubayashi commented 3 years ago

Thank you for your report! Actually, Weston is not backward compatible and we are looking for ways to support multiple versions. See also: https://github.com/sony/flutter-embedded-linux/issues/3

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

Havn't noticed #3 yet. Thanks for the information.

HidenoriMatsubayashi commented 3 years ago

No. Thank YOU!

HidenoriMatsubayashi commented 3 years ago

I've tried on i.MX 8M Mini EVK (OS: Zeus, imx-5.4.70-2.3.1.xml), but the embedder with DRM backend didn't work. Wayland backend is no problem.

root@imx8mmevk:~# FLUTTER_DRM_DEVICE=/dev/dri/card1 ./flutter-drm-backend ./bundle/
[     1] ioctl(DRM_IOCTL_GEM_CLOSE) failed
[ERROR][native_window_drm.cc(42)] Failed to create the compositor surface.
[ERROR][linuxes_window_drm.cc(110)] Failed to create the native window
psstoyanov commented 3 years ago

Wohoo! After some extensive cleanup on my host machine, I've found the offending piece causing me problems with the depot_tools. As it turns out, I've had a number of remnants of an AUR package - flutter-git that collided with my main Flutter install and was using different version. Whatever unintended referencing was happening there is no more.

So, I can finally confirm - the embedder does work with AMD RX6800 with the open source drivers using both the DRM and wayland clients. Mesa version installed on the x64 system - 20.3.4. Note: Unlike with the arm devices I have, for the DRM session there was one card to be targeted - /dev/dri/card0

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

I also had a try on the actual iMX8M-MiniEVK BSP Release (OS: Gatesgarth 5.10.9) with the drm-backend. And unfortunately I got the same result as you mentioned here a while ago (ioctl failed). Is there already an explanation why this error happens? Or is the drm-backend not meant to run on the iMX8M-Platform at all?

HidenoriMatsubayashi commented 3 years ago

We want to support the i.MX8M platform, so we need to investigate this issue. I think i.MX8M supports DRM and actually, Weston which uses the DRM backend works on i.MX8M mini. I'll investigate this week. Please tell me more if you have any information.

LefixBlue commented 3 years ago

I am unfortunately not that deep into all these graphical backend stuff..

The only thing I observed today is that I ran into the same build-error like someone reported in #30 while building the drm-backend cross with yocto. You mentioned in #30 that the WL_EGL_PLATFORM define would be missing, but that didn't worked for me because in the drm-backend case we dealing with gbm. To get around the build-errors I finally (after try many different other things) tried to cast the relevant parameter in the calls eglCreateWindowSurface and eglGetDisplay to EGLNativeWindowType. It did build through then, but the result at runtime is that ioctl error.

No idea if that helps.

HidenoriMatsubayashi commented 3 years ago

To get around the build-errors I finally (after try many different other things) tried to cast the relevant parameter in the calls eglCreateWindowSurface and eglGetDisplay to EGLNativeWindowType

If it's a bug, I'd like to fix it. Now, we are preparing yocto recipe examples.

In terms of i.mx8m, it looks like it doesn't support GBM_BO_FORMAT_ARGB8888. Probably I need to fix the code.

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

Please note the build-errors I mentioned in my last comment here in this thread regarding cross build drm-gbm-backend with yocto when not hard casting the problematic parameters to EGLNativeWindowType for iMX8M-Mini-EVK.

I use the actual Yocto iMX8M-MiniEVK BSP Release (OS: Gatesgarth 5.10.9) (Distro: fsl-imx-wayland):

| src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.cc:43:13: error: incompatible pointer types assigning to 'EGLNativeWindowType' (aka 'wl_egl_window *') from 'struct gbm_surface *' | window_ = gbm_surface_create(gbm_device_, drm_mode_info_.hdisplay, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.cc:72:32: error: static_cast from 'EGLNativeWindowType' (aka 'wl_egl_window *') to 'gbm_surface *', which are not related by inheritance, is not allowed | gbm_surface_release_buffer(static_cast<gbm_surface*>(window_), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | recipe-sysroot/usr/include/gbm.h:47:8: note: 'gbm_surface' is incomplete | struct gbm_surface; | ^ | recipe-sysroot/usr/include/EGL/eglplatform.h:96:16: note: 'wl_egl_window' is incomplete | typedef struct wl_egl_window *EGLNativeWindowType; | ^ | src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.cc:74:25: error: static_cast from 'EGLNativeWindowType' (aka 'wl_egl_window *') to 'gbm_surface *', which are not related by inheritance, is not allowed | gbm_surface_destroy(static_cast<gbm_surface*>(window_)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | recipe-sysroot/usr/include/gbm.h:47:8: note: 'gbm_surface' is incomplete | struct gbm_surface; | ^ | recipe-sysroot/usr/include/EGL/eglplatform.h:96:16: note: 'wl_egl_window' is incomplete | typedef struct wl_egl_window *EGLNativeWindowType; | ^ | src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.cc:140:44: error: static_cast from 'EGLNativeWindowType' (aka 'wl_egl_window *') to 'gbm_surface *', which are not related by inheritance, is not allowed | auto* bo = gbm_surface_lock_front_buffer(static_cast<gbm_surface*>(window_)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | recipe-sysroot/usr/include/gbm.h:47:8: note: 'gbm_surface' is incomplete | struct gbm_surface; | ^ | recipe-sysroot/usr/include/EGL/eglplatform.h:96:16: note: 'wl_egl_window' is incomplete | typedef struct wl_egl_window *EGLNativeWindowType; | ^ | src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.cc:159:32: error: static_cast from 'EGLNativeWindowType' (aka 'wl_egl_window *') to 'gbm_surface *', which are not related by inheritance, is not allowed | gbm_surface_release_buffer(static_cast<gbm_surface*>(window_), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | recipe-sysroot/usr/include/gbm.h:47:8: note: 'gbm_surface' is incomplete | struct gbm_surface; | ^ | recipe-sysroot/usr/include/EGL/eglplatform.h:96:16: note: 'wl_egl_window' is incomplete | typedef struct wl_egl_window *EGLNativeWindowType; | ^ | In file included from src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.cc:5: | In file included from src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.h:14: | In file included from src/flutter/shell/platform/linux_embedded/window/native_window_drm.h:12: | In file included from src/flutter/shell/platform/linux_embedded/surface/linuxes_surface_gl.h:8: | In file included from recipe-sysroot/usr/lib//aarch64-poky-linux/10.2.0/../../../include/c++/10.2.0/memory:83: | recipe-sysroot/usr/lib//aarch64-poky-linux/10.2.0/../../../include/c++/10.2.0/bits/unique_ptr.h:962:34: error: no matching constructor for initialization of 'flutter::EnvironmentEgl' | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); } | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | src/flutter/shell/platform/linux_embedded/window/native_window_drm_gbm.cc:136:12: note: in instantiation of function template specialization 'std::make_unique<flutter::EnvironmentEgl, gbm_device *&>' requested here | std::make_unique<EnvironmentEgl>(gbm_device_))); | ^ | src/flutter/shell/platform/linux_embedded/surface/environment_egl.h:15:7: note: candidate constructor (the implicit copy constructor) not viable: cannot convert argument of incomplete type 'gbm_device *' to 'const flutter::EnvironmentEgl' for 1st argument | class EnvironmentEgl { | ^ | src/flutter/shell/platform/linux_embedded/surface/environment_egl.h:17:3: note: candidate constructor not viable: cannot convert argument of incomplete type 'gbm_device *' to 'EGLNativeDisplayType' (aka 'wl_display *') for 1st argument | EnvironmentEgl(EGLNativeDisplayType platform_display) | ^ | src/flutter/shell/platform/linux_embedded/surface/environment_egl.h:29:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided | EnvironmentEgl() : display_(EGL_NO_DISPLAY), valid_(false) {} | ^ | 6 errors generated.

HidenoriMatsubayashi commented 3 years ago

@LefixBlue

I'll try to cross-build using the SDK (toolchain) which is generated by Yocto for iMX8M-MiniEVK BSP Release.

HidenoriMatsubayashi commented 3 years ago

@LefixBlue Could you inform me of the manifest version you are using? imx-5.10.9-1.0.0.xml?

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

I am using imx-5.10.9-1.0.0.xml

They recently "upgraded" the BSP, see:

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

But I have to say that i used my own yocto recipe to build the drm-backend as I already started using your project before you integrated the yocto-recipes into the repository. So it could be a source of failure from my side. Even the recipes look more or less the same. At least I have cross checked the DEPENDS variable today.

HidenoriMatsubayashi commented 3 years ago

Thanks. No problem. I'll do that from now.

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

Should the eglstream-backend also run on the i.MX8M-Mini-EVK?

Because I can build that backend successfully with the imx-5.10.9-1.0.0.xml BSP

But it fails with a segmentation fault at runtime:

$>FLUTTER_DRM_DEVICE=/dev/dri/card1 flutter-drm-eglstream-backend bundle

[ERROR][environment_egl_drm_eglstream.cc(15)] Failed to set extension function pointers [ERROR][context_egl.cc(31)] Failed to choose EGL surface config: eglGetError: EGL_BAD_DISPLAY [ERROR][context_egl_drm_eglstream.cc(20)] Failed to set extension function pointers

HidenoriMatsubayashi commented 3 years ago

Should the eglstream-backend also run on the i.MX8M-Mini-EVK?

No, I don't think EGLStream works on i.MX8M platforms. Because EGLStream is basically supported on NVIDIA devices only. NXP supports GBM.

LefixBlue commented 3 years ago

Thanks for clarification.

HidenoriMatsubayashi commented 3 years ago

@LefixBlue I got the same error, too. But it seems that the cause is that EGL library is built for Wayland (-DWL_EGL_PLATFORM is added). So, we cannot build for DRM-GBM backend if we use fsl-imx-wayland DESTRO. Unfortunately, i.mx8m seems to support only Wayland + EGL. We need EGL + GBM instead of Wayland if we want to use DRM-GBM backend.

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

Here are the list of DISTRO configurations. Note that fsl-imx-fb is not supported on i.MX 8 and fsl-imx-x11 is not
supported anymore.
• fsl-imx-wayland - Wayland weston graphics.
• fsl-imx-xwayland - Wayland graphics and X11. X11 applications using EGL are not supported.
• fsl-imx-fb - Frame Buffer graphics - no X11 or Wayland. Frame Buffer is not supported on i.MX 8

In conclusion, I'm afraid we can't run Flutter with drm-gbm backend on i.mx8m platforms. We need to use Wayland backend on i.mx8m platforms.

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

Interesting news. I somehow had the feeling already that it may not be possible to run the drm-backend on i.MX8 platform. I just couldn't fiddle it out that clearly by myself, as I am still new and learning about all those graphical libraries and backend stuff. I am happy to know about that fact though!

It leads me to one more question:

Using the Wayland-backend always implies a running weston- or any other wayland compositor-instance, right?

So there is always a wayland compositor running and on top of that the flutter-wayland-client is running. At least that's my basic understanding.

That was actually the main reason why I thought using the drm-backend will be my way to go when only need a simple fullscreen app running on a system. Even though from a user-perspective it is no difference when running the flutter-app full-screen on top of a weston for example.

I will try to play around with the i.MX8 and flutter-wayland-client as soon as I have some free time.

HidenoriMatsubayashi commented 3 years ago

Using the Wayland-backend always implies a running weston- or any other wayland compositor-instance, right?

So there is always a wayland compositor running and on top of that the flutter-wayland-client is running. At least that's my basic understanding.

That was actually the main reason why I thought using the drm-backend will be my way to go when only need a simple fullscreen app running on a system. Even though from a user-perspective it is no difference when running the flutter-app full-screen on top of a weston for example.

Exactly. UI in embedded systems sometimes doesn't require a window manager like weston. DRM backend is prepared for that case.

I will try to play around with the i.MX8 and flutter-wayland-client as soon as I have some free time.

Thank you. If you have any questions please please comment.

LefixBlue commented 3 years ago

@HidenoriMatsubayashi

Yesterday I have successfully tried to flutter-deskop-shell (weston) on i.IMX8M-Mini-EVK with imx-5.10.9-1.0.0.xml BSP.

You ever mentioned in another comment weston wouldn't be backward compatible and I also noticed #94. However the only issue I came over while building the weston-desktop-shell against weston9 is an unresolved include which I could fix with this diff:

`diff --git a/examples/flutter-weston-desktop-shell/main.cc b/examples/flutter-weston-desktop-shell/main.cc index db81ea9..2884ffa 100644 --- a/examples/flutter-weston-desktop-shell/main.cc +++ b/examples/flutter-weston-desktop-shell/main.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.

-#include +#include <libweston-9/libweston/config-parser.h>

include <flutter/dart_project.h>

include <flutter/flutter_view_controller.h>`

This is just my quick fix for testing. I am not sure how to fix it for different weston versions. libweston-9.pc file points to /usr/include/libweston-9 for INCLUDEs in my case, if that helps something.

At runtime I have no problems using the weston-destop-shell after adjusting the weston.ini file according to the one you have in the config folder.

So I was able to successfully run a flutter app started in fullscreen automatically on top of weston with your flutter-deskop-shell.

HidenoriMatsubayashi commented 3 years ago

@LefixBlue Thank you for your comment.

-#include +#include <libweston-9/libweston/config-parser.h>

Thank you. But, we've already added pkg-config for libweston in https://github.com/sony/flutter-embedded-linux/blob/master/cmake/package.cmake#L36 to add the path to config-parser.h. I'll confirm that.

However, weston-desktop-shell protocol isn't compatible which means the build would fail or not work correctly depending on weston version, so we need to reconsider the source code. https://github.com/sony/flutter-embedded-linux/issues/3

topolittle commented 3 years ago

Here is my results on the i.MX8M-Mini BSP: 5.4.70-2.3.0 Init: SystemD Backend: Wayland Flutter engine version: 610fd039ae48e1c493ff7387a46237a8dc99e949 flutter-embedded-linux version: 9b2c62b1cd351cab8e198bbe3425a23d8a9e8f9b Both debug and release apps are working fine.

Observation:

HidenoriMatsubayashi commented 3 years ago

@topolittle Thank you for your report!

The Flutter window is not movable in Weston

Yes, we need to implement it. See: https://github.com/sony/flutter-embedded-linux/issues/6 But I think it isn't basically required in embedded systems. In addition, a problem is that it is difficult to distinguish whether the mouse operation is handled as an event in the Flutter app or as a window in the Wayland app.

The bundle folder need to be copied to /usr/bin/.

Really?

psstoyanov commented 3 years ago

Window resize and minimize actions would be pretty nice addition for Wayland. Not sure if "close" counts as window action as well (good thing I will be checking other environments today on the PinePhone apart from Plasma Mobile).

I still need to double-check the other "convergent" Flutter example app apart from Gallery to be sure but resize can have it's uses for orientation changes at the very least. Launch parameters to deal with different ppi for scaling could be another.

psstoyanov commented 3 years ago

Some further findings about Alpine/ PostmarketOS:

/usr/bin/ld: libflutter_engine.so: undefined reference to `connect@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pipe@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getaddrinfo@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtod@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `mprotect@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fseeko64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `inotify_init1@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `ftell@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_rwlock_destroy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `memcmp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `readlinkat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtof_l@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `ioctl@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `wmemset@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__ctype_b_loc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `setlocale@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `lseek64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_cond_wait@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `inotify_rm_watch@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `powf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `ceil@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_condattr_destroy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fseek@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `memcpy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fileno@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__fxstat64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strerror_r@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `utimensat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `floor@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtoll@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strerror@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_cond_init@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `wcslen@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fputc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fprintf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sem_post@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `tan@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fread@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `exp2f@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `malloc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `open64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getifaddrs@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strncpy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `setpriority@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `gmtime_r@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__stack_chk_fail@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__isoc99_sscanf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strftime_l@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `uselocale@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_condattr_init@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sendfile64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `acosf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_setspecific@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strstr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sprintf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_rwlock_init@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `catclose@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `cosf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__isinff@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_key_create@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sigaddset@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_attr_destroy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strcspn@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `dlopen@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `dlsym@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `log10@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `erff@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_create@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strdup@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fmod@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutexattr_settype@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `realpath@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strrchr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fsync@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_attr_init@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `wait@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `atan@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `faccessat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strspn@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fcntl@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `rand@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `readlink@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strncmp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `log2f@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `dlclose@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `accept@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sem_destroy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `exit@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `dladdr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `asin@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__ctype_get_mb_cur_max@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_rwlock_rdlock@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `mmap64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `ftello64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getenv@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `dlerror@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `vfprintf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `stderr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `isatty@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `inet_ntop@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `gai_strerror@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `readdir64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `stdout@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `memchr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `unlinkat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_setname_np@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strndup@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `epoll_ctl@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `ungetc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `_setjmp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `mbsrtowcs@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `setsockopt@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `mbtowc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `tcsetattr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sem_init@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `posix_memalign@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__isnanf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__cxa_atexit@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__errno_location@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fork@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `environ@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getauxval@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `calloc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `epoll_wait@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_condattr_setclock@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pipe2@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__stack_chk_guard@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `snprintf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fclose@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fopen64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `rewinddir@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `inotify_add_watch@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `timezone@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_cond_broadcast@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `tzset@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getnameinfo@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `write@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strnlen@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtoull@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getsockopt@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `trunc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `timerfd_create@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `puts@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fmodf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_rwlock_unlock@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `inet_pton@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `tanf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strncat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `ferror@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `socket@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getpid@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `ftruncate64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `dup2@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `mbsnrtowcs@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutex_destroy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtol@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutexattr_init@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__isnan@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `freelocale@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `scalbnf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_getspecific@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sin@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_cond_signal@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_rwlock_wrlock@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `newlocale@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__isoc99_fscanf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `wmemcpy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pread64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fwrite@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sigaction@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `clock_gettime@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `vsnprintf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strcat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `read@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `dup@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strlen@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strchr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `catopen@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtold_l@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `memset@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `cos@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `renameat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `closedir@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_key_delete@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `wcrtomb@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `mbrtowc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__lxstat64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `catgets@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `syscall@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getpeername@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `shutdown@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `feof@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `cbrtf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sinf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `freeifaddrs@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `freeaddrinfo@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `atan2f@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `munmap@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pow@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `atan2@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `exp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `_exit@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtoull_l@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fgets@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getcwd@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `symlinkat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strcpy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `epoll_create@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `gethostname@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sigemptyset@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `bzero@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getpagesize@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_sigmask@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutexattr_destroy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `qsort@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtoul@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `wcsnrtombs@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `openat64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__isoc99_vsscanf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `bcmp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `mkdirat@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sem_trywait@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `unlink@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutex_trylock@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_cond_timedwait@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_cond_destroy@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sendto@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_attr_getstack@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutex_init@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `madvise@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `log@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `longjmp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `nextafterf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__ctype_tolower_loc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `wmemmove@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtoll_l@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `expf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `realloc@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `listen@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sem_wait@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `vasprintf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `acos@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `round@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__xstat64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `setsid@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `lrintf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strtod_l@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `isxdigit@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sqrt@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `memmove@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `nan@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `perror@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `if_nametoindex@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_attr_setdetachstate@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `recvfrom@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sqrtf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_self@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getrusage@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `gettimeofday@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutex_unlock@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `uname@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_once@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `getsockname@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `time@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__fxstatat64@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `abort@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `bind@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `kill@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `chdir@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `localtime_r@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `execvp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `__isinf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `stdin@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `free@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `sysconf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fdopendir@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `printf@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `fflush@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `timerfd_settime@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `opendir@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_mutex_lock@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `nanosleep@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `tcgetattr@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `strcmp@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `close@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_join@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `pthread_getattr_np@GLIBC_2.17'
/usr/bin/ld: libflutter_engine.so: undefined reference to `poll@GLIBC_2.17'

dongzhangsun commented 3 years ago

My board is AMLOGIC s905d3 (quad core A55), the system is Linux buildroot (Linux kernel 4.9), and the flutter(wayland) works normally.

georgfaust commented 3 years ago

@dongzhangsun

My board is AMLOGIC s905d3 (quad core A55), the system is Linux buildroot (Linux kernel 4.9), and the flutter(wayland) works normally.

Did you create a BR-package for the embedder? If so would you share it?

dongzhangsun commented 3 years ago

@dongzhangsun

My board is AMLOGIC s905d3 (quad core A55), the system is Linux buildroot (Linux kernel 4.9), and the flutter(wayland) works normally.

Did you create a BR-package for the embedder? If so would you share it?

@dongzhangsun

My board is AMLOGIC s905d3 (quad core A55), the system is Linux buildroot (Linux kernel 4.9), and the flutter(wayland) works normally.

Did you create a BR-package for the embedder? If so would you share it?

flutter_amlogic.zip

Nagendra-Bankupalli commented 3 years ago

@all My setup is imx8mm and running wayland while running flutter example stuck with below error , any inputs ?

$ ./flutter-client -b /home/root/bundle -d [FATAL:flutter/runtime/dart_vm_initializer.cc(22)] Error while initializing the Dart VM: Wrong full snapshot version, expected '659a72e41e3276e882709901c27de33d' found '7a5b240780941844bae88eca5dbaa7b8' Aborted tried reinstalling flutter SDK and cross compiled for arm64 , but no use

Flutter sdk version [✓] Flutter (Channel beta, 2.3.0-24.1.pre, on Ubuntu 20.04.1 LTS 5.8.0-59-generic, locale en_IN) • Flutter version 2.3.0-24.1.pre at /opt/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 615957513e (3 weeks ago), 2021-06-25 09:24:44 -0700 • Engine revision 9d517f475b • Dart version 2.14.0 (build 2.14.0-188.5.beta)

flutter engine version 9d517f475ba1282b619477bde8e708d6a34287cf

regards nagendra

ConnorRigby commented 2 years ago

i just tested on pine64 using buildroot to cross compile. for anyone hoping to do the same, this command will probably help you:

flutter-elinux build elinux --target-arch=arm64 \
--target-sysroot=/home/connor/workspace/fhunleth/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/ \
--system-include-directories=/home/connor/workspace/fhunleth/buildroot/output/host/opt/ext-toolchain/aarch64-buildroot-linux-gnu/include/c++/10.3.0/aarch64-buildroot-linux-gnu/ \
--target-backend-type=gbm \
--debug
topolittle commented 2 years ago

I tested on i.MX8M-Mini with the toolchain generated by Yocto. Unfortunately, this doesn’t works.

The Yocto’s toolchain doesn’t put the cross tools (cross-compiler, linker, etc) in the /usr/bin/ folder, instead they are in /usr/bin//

The toolchain sets the environment variables “CC”, “CXX”, “CLANGCC”, “CLANGCXX” and “LD” to the location of the corresponding cross-tools in /usr/bin// but flutter-elinux doesn’t seems to use these environment variables, like a traditional ‘Make’ would. Instead flutter-elinux looks for the cross-tools directly in /usr/bin/ but with the Yocto’s toolchain, it’s the native x86 tools at this location.

Is there a way to tell flutter-elinux to look for the cross-tools in a specific folder ? Can flutter-elinux make use of the above environment variables ?

topolittle commented 2 years ago

A quick update: I managed to make it work by adding the following to my toolchain file 'OEToolchainConfig.cmake':

set ( CMAKE_CXX_COMPILER_WORKS 1 )
set( CMAKE_CXX_COMPILER_TARGET "aarch64-poky-linux" )

Now I am able to cross-compile using flutter-elinux and the SDK generated by Yocto. It still doesn't works because of the bug #70

LefixBlue commented 2 years ago

Hi @topolittle ,

See my comment here: https://github.com/sony/meta-flutter/issues/27

Another way to cross build flutter app with Yocto SDK is to patch flutter-elinux to use the correct compiler triple. I wasn't aware of editing the cmake toolchain file like you mentioned also does the trick. I would prefer to add a cmdline argument to elinux where the compiler-target/triple can be specified for cross building.

Regarding https://github.com/sony/flutter-elinux/issues/70: As far as I understood the current workaround is to use and copy the correct gen_snapshot-binary from the flutter-engine build results to elinux. See the wiki here or also my comment mentioned above.

atornqvist commented 2 years ago

Hi,

Cross compiling with a pure Yocto Poky dunfell SDK fails. The following can be made to reproduce the error. It would be nice with cmdline argument where the compiler prefix could be specified. Alternatively the environment variable CROSS_COMPILE as with other packages if possible.

Build a dunfell Poky SDK: mkdir ~/flutter_tests cd ~/flutter_tests

git clone git://git.yoctoproject.org/poky.git -b dunfell git clone https://github.com/kraj/meta-clang -b dunfell git clone https://github.com/sony/meta-flutter.git source poky/oe-init-build-env build

cat >> conf/local.conf << EOF MACHINE ?= "qemuarm64" CLANGSDK = "1" EOF

bitbake-layers add-layer ../meta-clang bitbake-layers add-layer ../meta-flutter

bitbake core-image-weston -c populate_sdk

tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-qemuarm64-toolchain-3.1.15.sh

Source the SDK . /scratch/opt/poky/3.1.15/environment-setup-aarch64-poky-linux

git clone https://github.com/sony/flutter-elinux.git export PATH="$PATH:pwd/flutter-elinux/bin" flutter-elinux precache flutter-elinux create exampleapp cd exampleapp flutter-elinux build elinux --target-arch=arm64 --target-sysroot=/scratch/opt/poky/3.1.15/sysroots/aarch64-poky-linux/

=====> Linker error since it is the Yocto x86_64 ld that is used and not the cross-build ld.

Modifying the SDK file OEToolchainConfig.cmake to include these two lines does not help. set ( CMAKE_CXX_COMPILER_WORKS 1 ) set( CMAKE_CXX_COMPILER_TARGET "aarch64-poky-linux" )

Editing the flutter-elinux files from aarch64-linux-gnu to aarch64-poky-linux does not help either.