Skip to content
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

don't build flutter SDK artifacts for armv7 #28016

Merged
merged 2 commits into from
Nov 5, 2021

Conversation

ardera
Copy link
Contributor

@ardera ardera commented Aug 11, 2021

Don't build any flutter SDK artifacts for armv7. Download the sysroot so the engine can be built for armv7 with the bundled toolchain. Together with flutter/buildroot#499 this will allow building the engine for armv7 with the bundled toolchain / sysroot, instead of having to roll your own.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jwinarske
Copy link
Contributor

How are you generating an AOT image for production builds, or are you just running interpreted flutter apps?

@ardera
Copy link
Contributor Author

ardera commented Sep 21, 2021

@jwinarske The gen_snapshot is still built, so it's still possible to generate AOT snapshots. Though I agree it's confusing, I would've assumed it's part of the dart SDK as well.

@zanderso
Copy link
Member

Some of this might be needed to get flutter/flutter#90833 started.

@jwinarske
Copy link
Contributor

@ardera with this change frontend_server.dart.snapshot is still created? Example of how we create AOT here. Not creating it would require pulling in SDK separately which would be very non-optimal.

@jwinarske
Copy link
Contributor

I have a potential workaround for AOT, but why disable building SDK for only ARMv7? Dart supports it. It feels a little hacky to me.

@jwinarske
Copy link
Contributor

The workaround does not work. The first command generates app.dill, the second command errors:

| Can't load Kernel binary: Invalid kernel binary format version.
| WARNING: /builds/digital-cockpit/agl-flutter/build/tmp/work/corei7-64-agl-linux/flutter-gallery/git-r0/temp/run.do_compile.18777:1 exit 254 from '${ENGINE_SDK}/clang_x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=libapp.so --strip app.dill'

@ardera How are you creating a cross compiled AOT?

@chinmaygarde
Copy link
Member

Backing up a bit here, is there a blocker to using a custom toolchain and sysroot for armv7? I am having a hard time reasoning about the correctness of this patch given that the engine won't exercise this patch when building its own artifacts.

@ardera
Copy link
Contributor Author

ardera commented Oct 15, 2021

but why disable building SDK for only ARMv7? Dart supports it.

Not 100% sure, but AFAIK you need some extra steps to build the dart SDK to target armv7, you need a (32-bit) x86 CPU to run the simarm dart SDK, i.e. "bitness" of the simulated target arch must match the bitness of the host arch. I remember the flutter engine build scripts used to compile parts of the dart SDK for x86 (instead of x64) when targetting arm 32-bit. At least the directory that contained the gen_snapshot was called clang_x86 some time ago, now it's clang_x64.

Saying it's hacky is not inaccurate, I don't know how to make the dart SDK build properly, this patch just disables it so we can at least finish the build process. If anyone knows how to fix the dart SDK build I'd be glad to expand this PR

Backing up a bit here, is there a blocker to using a custom toolchain and sysroot for armv7? I am having a hard time reasoning about the correctness of this patch given that the engine won't exercise this patch when building its own artifacts.

Currently the flutter build for armv7 fails even when using custom toolchain and sysroot, because some build steps of the dart SDK fail (see the issues linked in the top post)

This just disables building the dart SDK so we can at least have a successful build for now

BUILD.gn Show resolved Hide resolved
DEPS Outdated Show resolved Hide resolved
tools/gn Outdated Show resolved Hide resolved
@chinmaygarde
Copy link
Member

This looks like a work in progress still. Marking this as WIP.

@chinmaygarde chinmaygarde added the Work in progress (WIP) Not ready (yet) for review! label Nov 4, 2021
@ardera ardera force-pushed the fix-armv7-build branch 2 times, most recently from 2c97ded to 1f69319 Compare November 5, 2021 14:16
@ardera
Copy link
Contributor Author

ardera commented Nov 5, 2021

Sorry, was busy with some other stuff the last few weeks. Should all be fixed now

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 7, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 7, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 7, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Nov 8, 2021
* 422b15a Roll Skia from d9d9e21b311c to a8d38078a4f3 (1 revision) (flutter/engine#29521)

* afe1c98 Roll Fuchsia Mac SDK from SfdmlzXiU... to nkHhPcy3q... (flutter/engine#29522)

* b7f4651 Roll Fuchsia Linux SDK from 5-RB9TzQH... to m90mMA37b... (flutter/engine#29523)

* 15d5a23 [Web] Fix BMP encoder (flutter/engine#29448)

* 3f55aec Fix FlutterPresentInfo struct_size doc string (flutter/engine#29524)

* b991af9 Roll Skia from a8d38078a4f3 to 7368c6d00b7c (5 revisions) (flutter/engine#29525)

* 93666e2 Fix isolate_configuration typo (flutter/engine#29318)

* 91033b9 Roll Skia from 7368c6d00b7c to a5030e9090e8 (3 revisions) (flutter/engine#29527)

* c2090c2 [iOS] Make sure spawnee's isGpuDisabled is set correctly when FlutterEngine spawn (flutter/engine#29361)

* e071f1d Roll Skia from a5030e9090e8 to 37afdbc22e89 (4 revisions) (flutter/engine#29528)

* ca1710a Roll Skia from 37afdbc22e89 to a05d3029ac65 (4 revisions) (flutter/engine#29532)

* 3364409 Reland Display Features support (Foldable and Cutout) (flutter/engine#29447)

* 4684d23 [fuchsia] Add more logging for error cases. (flutter/engine#29397)

* 5cf7c39 Remove D3D9 fallback path (flutter/engine#29533)

* 98d31de [raster_cache] Increment access_count on Touch (flutter/engine#29529)

* cc6fc4a Re-enable A11yTreeIsConsistent with higher timeout (flutter/engine#29367)

* fb20916 Roll Skia from a05d3029ac65 to 37da672b14b7 (1 revision) (flutter/engine#29534)

* d229ec8 use SkMatrix.invert() instead of MatrixDecomposition to validate cache matrices (flutter/engine#29530)

* a92aebb Roll Clang Linux from 5N9a1nYj5... to UtjvZhwws... (flutter/engine#29535)

* 47dab8a Roll Dart SDK from 3b11f88c96a5 to f38618d5d0c0 (7 revisions) (flutter/engine#29537)

* 83ccad7 FragmentProgram constructed asynchronously (flutter/engine#29513)

* 2078baf Roll Fuchsia Linux SDK from m90mMA37b... to Ci-Vji1rx... (flutter/engine#29546)

* 6bf8093 Roll Fuchsia Mac SDK from nkHhPcy3q... to emi7COLIo... (flutter/engine#29547)

* 290d179 Roll Skia from 37da672b14b7 to cf8daf79e710 (9 revisions) (flutter/engine#29548)

* 197ca59 [iOS] Fixes press key message leaks (flutter/engine#29354)

* 986b8d8 Roll Skia from cf8daf79e710 to ae67f07a58a2 (1 revision) (flutter/engine#29549)

* 11010f0 Roll Skia from ae67f07a58a2 to 17616469ddf8 (1 revision) (flutter/engine#29551)

* dadc7b2 Roll Skia from 17616469ddf8 to 4322c7fec7e4 (3 revisions) (flutter/engine#29552)

* ed66091 don't build flutter SDK artifacts for armv7 (flutter/engine#28016)

* 484cc5c Roll Dart SDK from f38618d5d0c0 to 05febe0a7860 (5 revisions) (flutter/engine#29539)

* 387563a Roll Skia from 4322c7fec7e4 to 1800d410df16 (1 revision) (flutter/engine#29553)

* 05ceba2 Roll Skia from 1800d410df16 to 725705f6630b (1 revision) (flutter/engine#29555)

* 2b142ef Roll Dart SDK from 05febe0a7860 to 38e7078fa2b7 (5 revisions) (flutter/engine#29556)

* 29da91f Roll Fuchsia Linux SDK from Ci-Vji1rx... to kHXT3xnTG... (flutter/engine#29557)

* da02a4b Roll Fuchsia Mac SDK from emi7COLIo... to 6BYh8qaYo... (flutter/engine#29558)

* 71fb575 Roll Skia from 725705f6630b to deb9386be146 (3 revisions) (flutter/engine#29559)

* c5f572a [Linux keyboard] Fix logical keys of up events are not regularized (flutter/engine#29550)

* 988ea43 Roll Dart SDK from 38e7078fa2b7 to d464cd3f2dc8 (5 revisions) (flutter/engine#29561)

* fdee74d Trace calls to Canvas::saveLayer (flutter/engine#29444)

* 953f718 ios test script checks for `ios_test_flutter` artifacts (flutter/engine#29554)

* 145d890 Roll Skia from deb9386be146 to 37bef2d300e4 (6 revisions) (flutter/engine#29563)

* cc9b174 Fix race condition introduced by background platform channels (flutter/engine#29377)

* 79b5e3c Roll Dart SDK from d464cd3f2dc8 to 996ef242a2c9 (1 revision) (flutter/engine#29564)

* 3eb6e15 fuchsia: Enable integration tests (flutter/engine#29565)

* ffa8b25 Roll Skia from 37bef2d300e4 to 2417872a9993 (1 revision) (flutter/engine#29567)

* 9af2de9 Roll Dart SDK from 996ef242a2c9 to 5ccf755b37a4 (1 revision) (flutter/engine#29568)

* 16d6d18 Roll Fuchsia Linux SDK from kHXT3xnTG... to uP2kJIngK... (flutter/engine#29569)

* 321bc56 Roll Fuchsia Mac SDK from 6BYh8qaYo... to W9UXc2Fwx... (flutter/engine#29570)

* f0a8d4e Roll Dart SDK from 5ccf755b37a4 to f6a43e5eb71d (1 revision) (flutter/engine#29571)

* 0be0303 Hide a11y elements when resigning active (flutter/engine#29566)

* 9a3195a Roll Fuchsia Linux SDK from uP2kJIngK... to aD3d4Kqmy... (flutter/engine#29572)

* b3cbee5 Roll Fuchsia Mac SDK from W9UXc2Fwx... to rIpW1050J... (flutter/engine#29573)

* df686d2 Revert "Reland Display Features support (Foldable and Cutout) (#29447)" (flutter/engine#29574)

* e812731 Revert dart to 38e7078fa2b7 (flutter/engine#29575)

* 049074e Roll Skia from 2417872a9993 to cd7220e7686c (2 revisions) (flutter/engine#29577)

* e6a51a4 Roll Fuchsia Mac SDK from rIpW1050J... to TOmxgL3av... (flutter/engine#29578)

* 8f272d9 Roll Fuchsia Linux SDK from aD3d4Kqmy... to ZniYyCw7U... (flutter/engine#29579)

* 469d6f1 Revert "[Web] Fix BMP encoder (#29448)" (flutter/engine#29580)
WizzXu pushed a commit to WizzXu/flutter that referenced this pull request Nov 19, 2021
* 422b15a Roll Skia from d9d9e21b311c to a8d38078a4f3 (1 revision) (flutter/engine#29521)

* afe1c98 Roll Fuchsia Mac SDK from SfdmlzXiU... to nkHhPcy3q... (flutter/engine#29522)

* b7f4651 Roll Fuchsia Linux SDK from 5-RB9TzQH... to m90mMA37b... (flutter/engine#29523)

* 15d5a23 [Web] Fix BMP encoder (flutter/engine#29448)

* 3f55aec Fix FlutterPresentInfo struct_size doc string (flutter/engine#29524)

* b991af9 Roll Skia from a8d38078a4f3 to 7368c6d00b7c (5 revisions) (flutter/engine#29525)

* 93666e2 Fix isolate_configuration typo (flutter/engine#29318)

* 91033b9 Roll Skia from 7368c6d00b7c to a5030e9090e8 (3 revisions) (flutter/engine#29527)

* c2090c2 [iOS] Make sure spawnee's isGpuDisabled is set correctly when FlutterEngine spawn (flutter/engine#29361)

* e071f1d Roll Skia from a5030e9090e8 to 37afdbc22e89 (4 revisions) (flutter/engine#29528)

* ca1710a Roll Skia from 37afdbc22e89 to a05d3029ac65 (4 revisions) (flutter/engine#29532)

* 3364409 Reland Display Features support (Foldable and Cutout) (flutter/engine#29447)

* 4684d23 [fuchsia] Add more logging for error cases. (flutter/engine#29397)

* 5cf7c39 Remove D3D9 fallback path (flutter/engine#29533)

* 98d31de [raster_cache] Increment access_count on Touch (flutter/engine#29529)

* cc6fc4a Re-enable A11yTreeIsConsistent with higher timeout (flutter/engine#29367)

* fb20916 Roll Skia from a05d3029ac65 to 37da672b14b7 (1 revision) (flutter/engine#29534)

* d229ec8 use SkMatrix.invert() instead of MatrixDecomposition to validate cache matrices (flutter/engine#29530)

* a92aebb Roll Clang Linux from 5N9a1nYj5... to UtjvZhwws... (flutter/engine#29535)

* 47dab8a Roll Dart SDK from 3b11f88c96a5 to f38618d5d0c0 (7 revisions) (flutter/engine#29537)

* 83ccad7 FragmentProgram constructed asynchronously (flutter/engine#29513)

* 2078baf Roll Fuchsia Linux SDK from m90mMA37b... to Ci-Vji1rx... (flutter/engine#29546)

* 6bf8093 Roll Fuchsia Mac SDK from nkHhPcy3q... to emi7COLIo... (flutter/engine#29547)

* 290d179 Roll Skia from 37da672b14b7 to cf8daf79e710 (9 revisions) (flutter/engine#29548)

* 197ca59 [iOS] Fixes press key message leaks (flutter/engine#29354)

* 986b8d8 Roll Skia from cf8daf79e710 to ae67f07a58a2 (1 revision) (flutter/engine#29549)

* 11010f0 Roll Skia from ae67f07a58a2 to 17616469ddf8 (1 revision) (flutter/engine#29551)

* dadc7b2 Roll Skia from 17616469ddf8 to 4322c7fec7e4 (3 revisions) (flutter/engine#29552)

* ed66091 don't build flutter SDK artifacts for armv7 (flutter/engine#28016)

* 484cc5c Roll Dart SDK from f38618d5d0c0 to 05febe0a7860 (5 revisions) (flutter/engine#29539)

* 387563a Roll Skia from 4322c7fec7e4 to 1800d410df16 (1 revision) (flutter/engine#29553)

* 05ceba2 Roll Skia from 1800d410df16 to 725705f6630b (1 revision) (flutter/engine#29555)

* 2b142ef Roll Dart SDK from 05febe0a7860 to 38e7078fa2b7 (5 revisions) (flutter/engine#29556)

* 29da91f Roll Fuchsia Linux SDK from Ci-Vji1rx... to kHXT3xnTG... (flutter/engine#29557)

* da02a4b Roll Fuchsia Mac SDK from emi7COLIo... to 6BYh8qaYo... (flutter/engine#29558)

* 71fb575 Roll Skia from 725705f6630b to deb9386be146 (3 revisions) (flutter/engine#29559)

* c5f572a [Linux keyboard] Fix logical keys of up events are not regularized (flutter/engine#29550)

* 988ea43 Roll Dart SDK from 38e7078fa2b7 to d464cd3f2dc8 (5 revisions) (flutter/engine#29561)

* fdee74d Trace calls to Canvas::saveLayer (flutter/engine#29444)

* 953f718 ios test script checks for `ios_test_flutter` artifacts (flutter/engine#29554)

* 145d890 Roll Skia from deb9386be146 to 37bef2d300e4 (6 revisions) (flutter/engine#29563)

* cc9b174 Fix race condition introduced by background platform channels (flutter/engine#29377)

* 79b5e3c Roll Dart SDK from d464cd3f2dc8 to 996ef242a2c9 (1 revision) (flutter/engine#29564)

* 3eb6e15 fuchsia: Enable integration tests (flutter/engine#29565)

* ffa8b25 Roll Skia from 37bef2d300e4 to 2417872a9993 (1 revision) (flutter/engine#29567)

* 9af2de9 Roll Dart SDK from 996ef242a2c9 to 5ccf755b37a4 (1 revision) (flutter/engine#29568)

* 16d6d18 Roll Fuchsia Linux SDK from kHXT3xnTG... to uP2kJIngK... (flutter/engine#29569)

* 321bc56 Roll Fuchsia Mac SDK from 6BYh8qaYo... to W9UXc2Fwx... (flutter/engine#29570)

* f0a8d4e Roll Dart SDK from 5ccf755b37a4 to f6a43e5eb71d (1 revision) (flutter/engine#29571)

* 0be0303 Hide a11y elements when resigning active (flutter/engine#29566)

* 9a3195a Roll Fuchsia Linux SDK from uP2kJIngK... to aD3d4Kqmy... (flutter/engine#29572)

* b3cbee5 Roll Fuchsia Mac SDK from W9UXc2Fwx... to rIpW1050J... (flutter/engine#29573)

* df686d2 Revert "Reland Display Features support (Foldable and Cutout) (flutter#29447)" (flutter/engine#29574)

* e812731 Revert dart to 38e7078fa2b7 (flutter/engine#29575)

* 049074e Roll Skia from 2417872a9993 to cd7220e7686c (2 revisions) (flutter/engine#29577)

* e6a51a4 Roll Fuchsia Mac SDK from rIpW1050J... to TOmxgL3av... (flutter/engine#29578)

* 8f272d9 Roll Fuchsia Linux SDK from aD3d4Kqmy... to ZniYyCw7U... (flutter/engine#29579)

* 469d6f1 Revert "[Web] Fix BMP encoder (flutter#29448)" (flutter/engine#29580)
@ardera ardera deleted the fix-armv7-build branch April 30, 2022 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
5 participants