Closed Li-00 closed 1 year ago
linaro@linaro-alip:/media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/demo/elinux_sample$ sudo find / -name libflutter_elinux_gbm.so /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/demo/elinux_sample/elinux/flutter/ephemeral/libflutter_elinux_gbm.so /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/demo/flutter_elinux2/elinux/flutter/ephemeral/libflutter_elinux_gbm.so /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/flutter/bin/cache/artifacts/engine/elinux-arm64-release/libflutter_elinux_gbm.so /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/flutter/bin/cache/artifacts/engine/elinux-arm64-debug/libflutter_elinux_gbm.so /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/flutter/bin/cache/artifacts/engine/elinux-x64-release/libflutter_elinux_gbm.so /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/flutter/bin/cache/artifacts/engine/elinux-x64-debug/libflutter_elinux_gbm.so /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/bin/cache/libflutter_elinux_gbm.so
I guess my libflutter_elinux_gbm.so version can’t match,If so, which version should I specify
/usr/bin/ld: /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/demo/elinux_sample/elinux/flutter/ephemeral/libflutter_elinux_gbm.so: undefined reference to `drmIsMaster'
The cause is that `drmIsMaster' API doesn't seem to be supported in your environment for cross-building.
I found that my target-backend-type parameter was specified incorrectly, it should be x11 for my graph architecture, and it works fine after making the change
flutter-elinux build elinux --target-arch=arm64 --target-sysroot=/ --target-backend-type=x11 --verbose
Sorry, this is due to insufficient knowledge of the graphics backend library, thanks to HidenoriMatsubayashi for the follow-up reply
My device detail:
rk3568 SO:Debain 10 aarch64 GPU so:libmali-bifrost-g52-g2p0-x11.so
env version cmake version 3.26.4 flutter 3.10.5 dart 3.0.5 flutter-elinux 3.10.5 3.0.5
My CMake.txt
elinux_sample/elinux/runner/CMakeLists.txt
The so I added
elinux_sample/elinux/flutter_lib$ ls ld-linux-aarch64.so.1 libc.so.6
libdrm.so.2
libdrm.so.2.4.0
libffi.so
libmali-bifrost-g52-g2p0-x11.so
libwayland-cursor.so
libwayland-server.so.0
libxkbcommon.so.0
Build error
flutter-elinux build elinux --target-arch=arm64 --target-sysroot=/ --target-backend-type=gbm --verbose