Comments (7)
I'm not cross-compiling
Are you building your flutter app for arm64 targets on arm64 host PC? (= you are doing self-builds on arm64 host?)
from flutter-embedded-linux.
Yes :)
from flutter-embedded-linux.
https://github.com/sony/flutter-embedded-linux/wiki/Building-Flutter-apps#2-3-cross-build-for-arm64-targets-on-x64-hosts-manually describes how to cross-build for arm64 targets on x64 hosts, so this is not a bug. You need to use proper binary for self-build on your arm64 host if you want to build your apps manually.
from flutter-embedded-linux.
Essentially I want to build just libapp without the runner as I’m using my own runner. But, it’s also fine if this is not possible as I can run the normal build process and extract the artifact.
from flutter-embedded-linux.
Script here, it’s not cross-compiling, and it used to work.
https://github.com/PADL/FlutterSwift/blob/main/Examples/counter/build-counter.sh
from flutter-embedded-linux.
I think the log messages from flutter-elinux build elinux --verbose
on arm64 host would would be helpful for updating your build script on an arm64 host. Could you try that?
from flutter-embedded-linux.
Thank you! I updated the build script accordingly (likely not all changes were required, I presume the important ones were just dartaotruntime
and correcting the snapshot path).
diff --git a/build-aot.sh b/build-aot.sh
index 412597a..6dd9128 100755
--- a/build-aot.sh
+++ b/build-aot.sh
@@ -12,7 +12,7 @@ export APP_PACKAGE_NAME=inferno_ui
# The build data.
export RESULT_DIR=build/elinux/arm64
-export BUILD_MODE=debug
+export BUILD_MODE=release
mkdir -p .dart_tool/flutter_build/flutter-embedded-linux
mkdir -p ${RESULT_DIR}/${BUILD_MODE}/bundle/lib/
@@ -24,9 +24,9 @@ cp ${FLUTTER_SDK}/bin/cache/artifacts/engine/linux-arm64/icudtl.dat \
${RESULT_DIR}/${BUILD_MODE}/bundle/data/
# Build kernel_snapshot.
-${FLUTTER_SDK}/bin/cache/dart-sdk/bin/dart \
+${FLUTTER_SDK}/bin/cache/dart-sdk/bin/dartaotruntime \
--verbose \
- --disable-dart-dev ${FLUTTER_SDK}/bin/cache/artifacts/engine/linux-arm64/frontend_server.dart.snapshot \
+ --disable-dart-dev ${FLUTTER_SDK}/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot \
--sdk-root ${FLUTTER_SDK}/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ \
--target=flutter \
--no-print-incremental-dependencies \
@@ -34,18 +34,20 @@ ${FLUTTER_SDK}/bin/cache/dart-sdk/bin/dart \
-Ddart.vm.product=true \
--aot \
--tfa \
+ --target-os linux \
--packages .dart_tool/package_config.json \
--output-dill .dart_tool/flutter_build/flutter-embedded-linux/app.dill \
--depfile .dart_tool/flutter_build/flutter-embedded-linux/kernel_snapshot.d \
+ --verbosity=error \
package:${APP_PACKAGE_NAME}/main.dart
# Build AOT image.
${FLUTTER_SDK}/bin/cache/artifacts/engine/linux-arm64/gen_snapshot \
--deterministic \
--snapshot_kind=app-aot-elf \
- --elf=.dart_tool/flutter_build/flutter-embedded-linux/libapp.so \
+ --elf=.dart_tool/flutter_build/flutter-embedded-linux/app.so \
+ --strip \
.dart_tool/flutter_build/flutter-embedded-linux/app.dill
-# --strip
-cp .dart_tool/flutter_build/flutter-embedded-linux/libapp.so ${RESULT_DIR}/${BUILD_MODE}/bundle/lib/
+cp .dart_tool/flutter_build/flutter-embedded-linux/app.so ${RESULT_DIR}/${BUILD_MODE}/bundle/lib/
from flutter-embedded-linux.
Related Issues (20)
- Add Impeller support HOT 1
- Add FlutterEngineNotifyDisplayUpdate support HOT 2
- Debug - Can only start Dart VM service, not observatory HOT 1
- Support DRM-GBM Backend for IMX GPU Vivante 6 Driver HOT 4
- Atomic Modeset fails HOT 8
- waylnd: [FATAL:flutter/shell/common/display_manager.cc(32)] Check failed: displays_.empty(). HOT 14
- DRM mode on raspberry pi 4b Error: Couldn't find file "symbols/US" in include paths HOT 3
- "text_scaling_factor" should default to 1 if unset HOT 1
- Internal CI for Engine artifacts doesn't work HOT 2
- xdg_wm_base@11: error 4: xdg_surface buffer (1280 x 720) is larger than the configured fullscreen state (1024 x 600) HOT 3
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 1
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 16
- Does this project run without systemd? HOT 1
- Disconnecting mouse that is hovering over button on wayland client results in Segmentation fault HOT 4
- how to measure flutter performance on embedded device HOT 4
- Support multiple wl_seats for remote desktop sharing HOT 3
- Turning the display OFF/ON swaps the width and height of the application HOT 9
- Dart VM: Wrong full snapshot version, expected XXX, found YYY HOT 2
- App crashes when non-ASCII characters are sent from input method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-embedded-linux.