Skip to content

[vector_graphics_compiler] Use Abi.current() for engine-artifact lookup on Linux ARM64#11781

Open
HiroyukiTamura wants to merge 1 commit into
flutter:mainfrom
HiroyukiTamura:feature/linux-arm64-engine-artifact-lookup
Open

[vector_graphics_compiler] Use Abi.current() for engine-artifact lookup on Linux ARM64#11781
HiroyukiTamura wants to merge 1 commit into
flutter:mainfrom
HiroyukiTamura:feature/linux-arm64-engine-artifact-lookup

Conversation

@HiroyukiTamura
Copy link
Copy Markdown

@HiroyukiTamura HiroyukiTamura commented May 25, 2026

On Linux ARM64 hosts, vector_graphics_compiler fails with:

Could not locate libpathops at <flutter>/bin/cache/artifacts/engine/linux-x64/libpath_ops.so

Flutter ships the engine binary at .../engine/linux-arm64/libpath_ops.so, but
_initialize_path_ops_io.dart and _initialize_tessellator_io.dart hardcode
'linux-x64' on Linux and never look at the arm64 directory.

This change switches the Linux branch in both loaders to pick 'linux-arm64'
when Abi.current() == Abi.linuxArm64, and otherwise keeps the existing
'linux-x64' value. Behavior on windows-x64, darwin, and linux-x64 hosts is
unchanged. Bumps the package to 1.2.4 with a CHANGELOG entry.

Fixes flutter/flutter#158865.

Pre-Review Checklist

@flutter-dashboard
Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions Bot added p: vector_graphics triage-engine Should be looked at in engine triage labels May 25, 2026
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 25, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for linux-arm64 hosts in the vector graphics compiler. It dynamically determines the platform directory for pathops and the tessellator loader using Abi.current() instead of hardcoding linux-x64. Additionally, the package version is bumped to 1.2.4 in pubspec.yaml and documented in CHANGELOG.md. There are no review comments to address.

@HiroyukiTamura HiroyukiTamura force-pushed the feature/linux-arm64-engine-artifact-lookup branch from 4dcc545 to 0cb286c Compare May 25, 2026 19:28
On Linux ARM64 hosts, asset bundling fails with `Could not locate
libpathops at .../engine/linux-x64/libpath_ops.so`. Flutter ships the
engine binary at `.../engine/linux-arm64/...`, but
_initialize_path_ops_io.dart and _initialize_tessellator_io.dart
hardcode `'linux-x64'` on Linux.

Switch the Linux branch to pick `'linux-arm64'` when
Abi.current() == Abi.linuxArm64, otherwise keep `'linux-x64'`.
Behavior on existing hosts is unchanged.

Fixes flutter/flutter#158865.
@HiroyukiTamura HiroyukiTamura force-pushed the feature/linux-arm64-engine-artifact-lookup branch from 0cb286c to b6a9376 Compare May 25, 2026 19:37
@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

[x] I added new tests to check the change I am making, or I have commented below to indicate which test exemption this PR falls under.

Thanks for the contribution! Where is this item reflected in the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: vector_graphics triage-engine Should be looked at in engine triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vector_graphics] Support libpathops on Linux arm.

2 participants