Skip to content

Native Assets Custom Device #187980

Description

@jwinarske

Steps to reproduce

  1. Configure a Linux custom-devices entry (platform: linux-x64) and flutter config --enable-custom-devices --enable-native-assets.
  2. Use a project whose dependency tree includes any package with a hook/build.dart that is normally only relevant on another platform — e.g. dev/integration_tests/new_gallery reproduces this directly.
  3. flutter run -d <custom-device-id> (or flutter build bundle).

Expected results

The asset bundle builds. Code-asset hooks that emit nothing for OS.linux (like objective_c) should not block the build, and no native (CMake) compiler match is required because a custom device / bundle build has no native app build.

Actual results

Target dart_build failed: Error: Could not read compiler configurations for build hooks, expected
build/flutter_assets/linux/x64/debug/CMakeCache.txt to exist.
#0      throwToolExit (package:flutter_tools/src/base/common.dart:34:3)
#1      cCompilerConfigLinux (package:flutter_tools/src/isolated/native_assets/linux/native_assets.dart:30:5)
#2      LinuxAssetTarget.setCCompilerConfig (package:flutter_tools/src/isolated/native_assets/targets.dart:283)
#3      FlutterNativeAssetsBuildRunnerImpl.setCCompilerConfig (.../native_assets.dart:279)
#4      runFlutterSpecificHooks (.../native_assets.dart:101)
#5      DartBuild.build (.../build_system/targets/native_assets.dart:56)
...
Error: Failed to build bundle.

Flutter Doctor output

Doctor output
[!] Flutter (Channel [user-branch], 3.44.2, on Fedora Linux 43 (Workstation Edition) 7.0.10-100.fc43.x86_64, locale en_US.UTF-8) [22ms]
    ! Flutter version 3.44.2 on channel [user-branch] at /home/joel/workspace-automation/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not the same as FLUTTER_GIT_URL
    • FLUTTER_GIT_URL = https:/github.com/flutter/flutter.git
    • Framework revision c9a6c48423 (3 days ago), 2026-06-10 15:52:41 -0700
    • Engine revision 77e2e94772
    • Dart version 3.12.2
    • DevTools version 2.57.0
    • Feature flags: no-enable-web, enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop, no-enable-android,
      no-enable-ios, enable-custom-devices, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file,
      enable-lldb-debugging, enable-uiscene-migration, enable-riscv64
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update
      checks and upgrades.

[✓] Linux toolchain - develop for Linux desktop [192ms]
    • clang version 18.1.8
    • cmake version 3.31.7
    • ninja version 1.12.1
    • pkg-config version 2.3.0
    • OpenGL core renderer: AMD Ryzen 9 9950X 16-Core Processor (radeonsi, raphael_mendocino, LLVM 21.1.8, DRM 3.64, 7.0.10-100.fc43.x86_64)
    • OpenGL core version: 4.6 (Core Profile) Mesa 25.3.6
    • OpenGL core shading language version: 4.60
    • OpenGL ES renderer: AMD Ryzen 9 9950X 16-Core Processor (radeonsi, raphael_mendocino, LLVM 21.1.8, DRM 3.64, 7.0.10-100.fc43.x86_64)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 25.3.6
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20
    • GL_EXT_framebuffer_blit: yes
    • GL_EXT_texture_format_BGRA8888: yes

[✓] Connected device (2 available) [30ms]
    • Linux (desktop)            • linux              • linux-x64 • Fedora Linux 43 (Workstation Edition) 7.0.10-100.fc43.x86_64
    • Toyota homescreen (mobile) • desktop-homescreen • linux-x64 • homescreen x86_64

[✓] Network resources [177ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listcustomer: toyotahas reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-linuxBuilding on or for Linux specificallyteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions