Skip to content

Native Assets Custom Device #187980

Closed

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.

Activity

  1. jwinarske commented on Jun 13, 2026

    @jwinarske
    ContributorAuthor

    Workaround

    flutter config --no-enable-native-assets --enable-dart-data-assets (drops code assets from the build), or seed a CMakeCache.txt at the expected path pointing at a clang toolchain.

    Potential fix

    thread a mustMatchAppBuild flag (already supported by the asset targets for the widget-test path) from the bundle entry point so these builds skip the app-compiler match.

  2. jwinarske commented on Jun 13, 2026

    @jwinarske
    ContributorAuthor

    This resolves it, perhaps there is a better way?
    0001-flutter_tools-Don-t-require-a-native-app-compiler-ma.patch

    Patch...

    From 0f6eb130140f6042fdbf4a80b6fd8658ca82ab81 Mon Sep 17 00:00:00 2001
    From: Joel Winarske <[email protected]>
    Date: Sat, 13 Jun 2026 11:40:59 -0700
    Subject: [PATCH] [flutter_tools] Don't require a native app compiler match for
     bundle-only code-asset builds
    
    `flutter run` on a Linux custom device and `flutter build bundle` fail with
    "Could not read compiler configurations for build hooks, expected
    build/flutter_assets/linux/x64/debug/CMakeCache.txt to exist." whenever the
    dependency tree contains a package with a code-asset hook (e.g. objective_c via
    webview_flutter_wkwebview / video_player_avfoundation).
    
    DartBuild runs the code-asset preflight (setCCompilerConfig) for every build,
    which on Linux/Windows resolves the app compiler by reading CMakeCache.txt.
    Asset-bundle-only builds (flutter tester, `flutter build bundle`, custom
    devices) have no native CMake app build, and BundleBuilder points outputDir at
    build/flutter_assets, so the lookup targets a path that can never exist and
    throws -- before any hook runs. The offending package emits zero code assets on
    the bundle target; it only needs to exist in package_config.json to trip the
    preflight.
    
    The asset targets already support skipping the app-compiler match
    (LinuxAssetTarget.setCCompilerConfig({mustMatchAppBuild}), used by the
    widget-test path). Thread that flag from the bundle entry point: BundleBuilder
    sets a new define kNativeAssetsMatchAppBuild=false, DartBuild reads it into
    BuildCodeAssetsOptions.matchAppBuild (defaults true, so desktop/iOS/Android are
    unchanged), and runFlutterSpecificHooks forwards it to setCCompilerConfig.
    
    Signed-off-by: Joel Winarske <[email protected]>
    ---
     .../flutter_tools/lib/src/build_info.dart     |  7 ++++
     .../build_system/targets/native_assets.dart   |  8 +++-
     .../flutter_tools/lib/src/bundle_builder.dart |  5 +++
     .../isolated/native_assets/native_assets.dart | 24 +++++++++--
     .../fake_native_assets_build_runner.dart      |  2 +-
     .../isolated/native_assets_test.dart          | 42 ++++++++++++++++++-
     6 files changed, 80 insertions(+), 8 deletions(-)
    
    diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart
    index 29ef12f7bb8..da50a2d1fd4 100644
    --- a/packages/flutter_tools/lib/src/build_info.dart
    +++ b/packages/flutter_tools/lib/src/build_info.dart
    @@ -1029,6 +1029,13 @@ const kExtraGenSnapshotOptions = 'ExtraGenSnapshotOptions';
     /// components.
     const kDeferredComponents = 'DeferredComponents';
     
    +/// Whether the code asset toolchain must match a native (CMake) app build.
    +///
    +/// Defaults to true. Set to 'false' by asset-bundle-only builds (the flutter
    +/// tester, `flutter build bundle`, and custom devices) which have no native
    +/// CMake app build to align the code asset compiler with.
    +const kNativeAssetsMatchAppBuild = 'NativeAssetsMatchAppBuild';
    +
     /// Whether to strip source code information out of release builds and where to save it.
     const kSplitDebugInfo = 'SplitDebugInfo';
     
    diff --git a/packages/flutter_tools/lib/src/build_system/targets/native_assets.dart b/packages/flutter_tools/lib/src/build_system/targets/native_assets.dart
    index dcaa77c69a4..71b84175e92 100644
    --- a/packages/flutter_tools/lib/src/build_system/targets/native_assets.dart
    +++ b/packages/flutter_tools/lib/src/build_system/targets/native_assets.dart
    @@ -59,7 +59,13 @@ class DartBuild extends Target {
           targetPlatform: targetPlatform,
           projectUri: projectUri,
           fileSystem: fileSystem,
    -      buildCodeAssets: BuildCodeAssetsOptions(appBuildDirectory: environment.outputDir),
    +      buildCodeAssets: BuildCodeAssetsOptions(
    +        appBuildDirectory: environment.outputDir,
    +        // Asset-bundle-only builds (flutter tester, `flutter build bundle`,
    +        // custom devices) have no native CMake app build to align the code
    +        // asset compiler with, so they opt out of the compiler match.
    +        matchAppBuild: environment.defines[kNativeAssetsMatchAppBuild] != 'false',
    +      ),
           buildDataAssets: true,
         );
         final File dartHookResultJsonFile = environment.buildDir.childFile(dartHookResultFilename);
    diff --git a/packages/flutter_tools/lib/src/bundle_builder.dart b/packages/flutter_tools/lib/src/bundle_builder.dart
    index e04757e4af0..8daa7d55f38 100644
    --- a/packages/flutter_tools/lib/src/bundle_builder.dart
    +++ b/packages/flutter_tools/lib/src/bundle_builder.dart
    @@ -62,6 +62,11 @@ class BundleBuilder {
             kTargetPlatform: getNameForTargetPlatform(platform),
             kTargetFile: mainPath,
             kDeferredComponents: 'false',
    +        // This path only produces the asset bundle and runs it on a separate
    +        // embedder (flutter tester, custom devices, `flutter build bundle`).
    +        // There is no native CMake app build here, so code asset hooks must not
    +        // try to match a (non-existent) app compiler. See DartBuild.
    +        kNativeAssetsMatchAppBuild: 'false',
             ...buildInfo.toBuildSystemEnvironment(),
           },
           artifacts: globals.artifacts!,
    diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart
    index 332d0d182cb..a2e2bd207fc 100644
    --- a/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart
    +++ b/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart
    @@ -46,7 +46,7 @@ enum SupportedAssetTypes { codeAssets, dataAssets }
     
     /// Hook options specific to building code assets.
     final class BuildCodeAssetsOptions {
    -  const BuildCodeAssetsOptions({required this.appBuildDirectory});
    +  const BuildCodeAssetsOptions({required this.appBuildDirectory, this.matchAppBuild = true});
     
       /// The build directory of the main app build, e.g. `/path/to/app/build`.
       ///
    @@ -57,6 +57,18 @@ final class BuildCodeAssetsOptions {
       /// Null for hook invocations not associated with an app build (e.g. widget
       /// tests).
       final Directory? appBuildDirectory;
    +
    +  /// Whether the code asset toolchain must match the native app build.
    +  ///
    +  /// On platforms with a native CMake app build (Linux, Windows) this drives a
    +  /// lookup of the app's compiler (e.g. by reading `CMakeCache.txt`). That
    +  /// lookup is only valid when a native app is actually being built.
    +  ///
    +  /// Builds that only produce the asset bundle and run it on a separate
    +  /// embedder -- the flutter tester, `flutter build bundle`, and custom devices
    +  /// -- have no such CMake build, so they set this to false and let the hooks
    +  /// resolve to any available compiler instead.
    +  final bool matchAppBuild;
     }
     
     /// Invokes the build of all transitive Dart package hooks and prepares assets
    @@ -98,7 +110,10 @@ Future<DartHooksResult> runFlutterSpecificHooks({
         // This is ugly, but sadly necessary as fetching the cCompilerConfig is async,
         // while using it in native_assets_builder is not.
         for (final CodeAssetTarget target in targets.whereType<CodeAssetTarget>()) {
    -      await buildRunner.setCCompilerConfig(target);
    +      await buildRunner.setCCompilerConfig(
    +        target,
    +        mustMatchAppBuild: buildCodeAssets!.matchAppBuild,
    +      );
         }
       }
     
    @@ -169,7 +184,7 @@ abstract interface class FlutterNativeAssetsBuildRunner {
         required BuildResult buildResult,
       });
     
    -  Future<void> setCCompilerConfig(CodeAssetTarget target);
    +  Future<void> setCCompilerConfig(CodeAssetTarget target, {bool mustMatchAppBuild = true});
     }
     
     /// Uses `package:hooks_runner` for its implementation.
    @@ -276,7 +291,8 @@ class FlutterNativeAssetsBuildRunnerImpl implements FlutterNativeAssetsBuildRunn
       }
     
       @override
    -  Future<void> setCCompilerConfig(CodeAssetTarget target) async => target.setCCompilerConfig();
    +  Future<void> setCCompilerConfig(CodeAssetTarget target, {bool mustMatchAppBuild = true}) async =>
    +      target.setCCompilerConfig(mustMatchAppBuild: mustMatchAppBuild);
     }
     
     Future<Uri> _writeNativeAssetsJson(
    diff --git a/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart b/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart
    index 70233135758..b90c4958d6c 100644
    --- a/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart
    +++ b/packages/flutter_tools/test/general.shard/isolated/fake_native_assets_build_runner.dart
    @@ -102,7 +102,7 @@ class FakeFlutterNativeAssetsBuildRunner implements FlutterNativeAssetsBuildRunn
       CCompilerConfig? get ndkCCompilerConfigResult => null;
     
       @override
    -  Future<void> setCCompilerConfig(CodeAssetTarget target) async {
    +  Future<void> setCCompilerConfig(CodeAssetTarget target, {bool mustMatchAppBuild = true}) async {
         if (target is AndroidAssetTarget) {
           target.cCompilerConfigSync = ndkCCompilerConfigResult;
         } else if (target is FlutterTesterAssetTarget) {
    diff --git a/packages/flutter_tools/test/general.shard/isolated/native_assets_test.dart b/packages/flutter_tools/test/general.shard/isolated/native_assets_test.dart
    index 33d15914030..6bf6003554f 100644
    --- a/packages/flutter_tools/test/general.shard/isolated/native_assets_test.dart
    +++ b/packages/flutter_tools/test/general.shard/isolated/native_assets_test.dart
    @@ -333,6 +333,42 @@ CMAKE_LINKER:FILEPATH=/usr/bin/ld.ldd
           );
     
           expect(target.didSetCCompilerConfig, isTrue);
    +      expect(target.lastMustMatchAppBuild, isTrue);
    +    },
    +  );
    +
    +  testUsingContext(
    +    'bundle-only linux build does not require CMakeCache.txt when matchAppBuild is false',
    +    overrides: <Type, Generator>{
    +      ProcessManager: () => FakeProcessManager.empty(),
    +      FileSystem: () => fileSystem,
    +    },
    +    () async {
    +      final target = _SetCCompilerConfigTarget(
    +        packagesWithNativeAssetsResult: <String>['bar'],
    +        buildResult: FakeFlutterNativeAssetsBuilderResult.fromAssets(),
    +      );
    +
    +      final Directory project = fileSystem.directory(projectUri);
    +      // Note: no CMakeCache.txt is created. Asset-bundle-only builds (flutter
    +      // tester, `flutter build bundle`, custom devices) have no native CMake
    +      // app build, so they must not require one.
    +
    +      await runFlutterSpecificHooks(
    +        environmentDefines: {kBuildMode: 'release'},
    +        targetPlatform: TargetPlatform.linux_arm64,
    +        projectUri: projectUri,
    +        fileSystem: fileSystem,
    +        buildRunner: target,
    +        buildCodeAssets: BuildCodeAssetsOptions(
    +          appBuildDirectory: project.childDirectory('build/flutter_assets'),
    +          matchAppBuild: false,
    +        ),
    +        buildDataAssets: false,
    +      );
    +
    +      expect(target.didSetCCompilerConfig, isTrue);
    +      expect(target.lastMustMatchAppBuild, isFalse);
         },
       );
     }
    @@ -341,10 +377,12 @@ class _SetCCompilerConfigTarget extends FakeFlutterNativeAssetsBuildRunner {
       _SetCCompilerConfigTarget({super.buildResult, super.packagesWithNativeAssetsResult});
     
       bool didSetCCompilerConfig = false;
    +  bool? lastMustMatchAppBuild;
     
       @override
    -  Future<void> setCCompilerConfig(CodeAssetTarget target) async {
    -    await target.setCCompilerConfig();
    +  Future<void> setCCompilerConfig(CodeAssetTarget target, {bool mustMatchAppBuild = true}) async {
    +    lastMustMatchAppBuild = mustMatchAppBuild;
    +    await target.setCCompilerConfig(mustMatchAppBuild: mustMatchAppBuild);
         didSetCCompilerConfig = true;
       }
     }
    -- 
    2.54.0
    

  3. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-linuxBuilding on or for Linux specifically
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    workaround availableThere is a workaround available to overcome the issue
    team-linuxOwned by the Linux platform team
    on Jun 15, 2026
  4. mbcorona commented on Jun 15, 2026

    @mbcorona
    Member

    Hi @jwinarske , thanks for the detailed report, routing to the Linux team for further investigation.

  5. loic-sharma commented on Jun 15, 2026

    @loic-sharma
    Member

    cc @dcharkes as this seems to be a native assets issue. In case it's helpful, here are the docs on custom-devices.

    I was able to reproduce a similar error on a Linux machine:

    1. Turn on custom devices:

      flutter config --enable-custom-devices
      
    2. Add a custom device (follow the recommended values):

      flutter custom-devices add
      
    3. Navigate to the new_gallery app:

      cd path/to/flutter/dev/integration_tests/new_gallery
      
    4. Run flutter build bundle:

      flutter build bundle
      
    Logs: flutter build bundle

    ~/Code/flutter/dev/integration_tests/new_gallery$ flutter build bundle
    Resolving dependencies in `/usr/local/google/home/loicsharma/Code/flutter`... 
    Downloading packages... 
      _fe_analyzer_shared 95.0.0 (103.0.0 available)
      adaptive_breakpoints 0.1.7 (discontinued)
      analyzer 10.1.0 (13.3.0 available)
      animations 2.1.2 (2.2.0 available)
      archive 3.6.1 (4.0.9 available)
      cli_util 0.4.2 (0.5.1 available)
      code_assets 1.0.0 (1.2.1 available)
      coverage 1.15.0 (1.15.1 available)
      dart_style 3.1.7 (3.1.9 available)
      data_assets 0.19.6 (0.20.0 available)
      device_info 2.0.3 (discontinued replaced by device_info_plus)
      gcloud 0.8.19 (0.9.0 available)
      google_fonts 6.3.3 (8.1.0 available)
      google_mobile_ads 5.1.0 (9.0.0 available)
      googleapis 14.0.0 (16.0.0 available)
      googleapis_auth 2.0.0 (2.3.2 available)
      hooks 1.0.2 (2.0.2 available)
      isolate 2.1.1 (discontinued)
      js 0.7.2 (discontinued)
      json_annotation 4.11.0 (4.12.0 available)
      matcher 0.12.19 (0.12.20 available)
      meta 1.18.0 (1.18.3 available)
      native_toolchain_c 0.17.6 (0.19.1 available)
      objective_c 9.2.3 (9.4.1 available)
      package_config 2.2.0 (3.0.0 available)
      path_provider 2.1.5 (2.1.6 available)
      path_provider_platform_interface 2.1.2 (2.1.3 available)
      pedantic 1.11.1 (discontinued replaced by lints)
      standard_message_codec 0.0.1+4 (0.0.1+5 available)
      test 1.31.0 (1.31.1 available)
      test_api 0.7.11 (0.7.12 available)
      test_core 0.6.17 (0.6.18 available)
      url_launcher_android 6.3.29 (6.3.32 available)
      url_launcher_web 2.4.2 (2.4.3 available)
      vector_math 2.2.0 (2.4.0 available)
      video_player_android 2.9.5 (2.9.6 available)
      video_player_avfoundation 2.9.4 (2.9.7 available)
      video_player_platform_interface 6.6.0 (6.7.0 available)
      vm_service 15.0.2 (15.2.0 available)
      webview_flutter 4.9.0 (4.14.0 available)
      webview_flutter_android 3.16.9 (4.13.0 available)
      webview_flutter_wkwebview 3.24.2 (3.26.0 available)
      xml 6.6.1 (7.0.1 available)
    Got dependencies in `/usr/local/google/home/loicsharma/Code/flutter`!
    5 packages are discontinued.
    38 packages have newer versions incompatible with dependency constraints.
    Try `flutter pub outdated` for more information.
    Target dart_build failed: Error: Android SDK could not be found.
    #0      throwToolExit (package:flutter_tools/src/base/common.dart:34:3)
    #1      cCompilerConfigAndroid (package:flutter_tools/src/isolated/native_assets/android/native_assets.dart:105:5)
    #2      AndroidAssetTarget.setCCompilerConfig (package:flutter_tools/src/isolated/native_assets/targets.dart:373:35)
    #3      FlutterNativeAssetsBuildRunnerImpl.setCCompilerConfig (package:flutter_tools/src/isolated/native_assets/native_assets.dart:279:75)
    #4      runFlutterSpecificHooks (package:flutter_tools/src/isolated/native_assets/native_assets.dart:101:25)
    <asynchronous suspension>
    #5      DartBuild.build (package:flutter_tools/src/build_system/targets/native_assets.dart:56:14)
    <asynchronous suspension>
    #6      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:937:9)
    <asynchronous suspension>
    #7      Future.wait.<anonymous closure> (dart:async/future.dart:546:21)
    <asynchronous suspension>
    #8      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:875:32)
    <asynchronous suspension>
    #9      Future.wait.<anonymous closure> (dart:async/future.dart:546:21)
    <asynchronous suspension>
    #10     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:875:32)
    <asynchronous suspension>
    #11     FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:684:16)
    <asynchronous suspension>
    #12     BundleBuilder.build (package:flutter_tools/src/bundle_builder.dart:78:32)
    <asynchronous suspension>
    #13     BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:146:5)
    <asynchronous suspension>
    #14     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1630:27)
    <asynchronous suspension>
    #15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
    <asynchronous suspension>
    #16     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
    <asynchronous suspension>
    #17     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
    <asynchronous suspension>
    #18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
    <asynchronous suspension>
    #19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
    <asynchronous suspension>
    #20     FlutterCommandRunner.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:307:33)
    <asynchronous suspension>
    #21     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:104:11)
    <asynchronous suspension>
    #22     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
    <asynchronous suspension>
    #23     main (package:flutter_tools/executable.dart:103:3)
    <asynchronous suspension>
    
    Failed to build bundle.
    

    Logs: flutter build bundle --target-platform linux-x64

    ~/Code/flutter/dev/integration_tests/new_gallery$ flutter build bundle --target-platform linux-x64
    Resolving dependencies in `/usr/local/google/home/loicsharma/Code/flutter`... 
    Downloading packages... 
      _fe_analyzer_shared 95.0.0 (103.0.0 available)
      adaptive_breakpoints 0.1.7 (discontinued)
      analyzer 10.1.0 (13.3.0 available)
      animations 2.1.2 (2.2.0 available)
      archive 3.6.1 (4.0.9 available)
      cli_util 0.4.2 (0.5.1 available)
      code_assets 1.0.0 (1.2.1 available)
      coverage 1.15.0 (1.15.1 available)
      dart_style 3.1.7 (3.1.9 available)
      data_assets 0.19.6 (0.20.0 available)
      device_info 2.0.3 (discontinued replaced by device_info_plus)
      gcloud 0.8.19 (0.9.0 available)
      google_fonts 6.3.3 (8.1.0 available)
      google_mobile_ads 5.1.0 (9.0.0 available)
      googleapis 14.0.0 (16.0.0 available)
      googleapis_auth 2.0.0 (2.3.2 available)
      hooks 1.0.2 (2.0.2 available)
      isolate 2.1.1 (discontinued)
      js 0.7.2 (discontinued)
      json_annotation 4.11.0 (4.12.0 available)
      matcher 0.12.19 (0.12.20 available)
      meta 1.18.0 (1.18.3 available)
      native_toolchain_c 0.17.6 (0.19.1 available)
      objective_c 9.2.3 (9.4.1 available)
      package_config 2.2.0 (3.0.0 available)
      path_provider 2.1.5 (2.1.6 available)
      path_provider_platform_interface 2.1.2 (2.1.3 available)
      pedantic 1.11.1 (discontinued replaced by lints)
      standard_message_codec 0.0.1+4 (0.0.1+5 available)
      test 1.31.0 (1.31.1 available)
      test_api 0.7.11 (0.7.12 available)
      test_core 0.6.17 (0.6.18 available)
      url_launcher_android 6.3.29 (6.3.32 available)
      url_launcher_web 2.4.2 (2.4.3 available)
      vector_math 2.2.0 (2.4.0 available)
      video_player_android 2.9.5 (2.9.6 available)
      video_player_avfoundation 2.9.4 (2.9.7 available)
      video_player_platform_interface 6.6.0 (6.7.0 available)
      vm_service 15.0.2 (15.2.0 available)
      webview_flutter 4.9.0 (4.14.0 available)
      webview_flutter_android 3.16.9 (4.13.0 available)
      webview_flutter_wkwebview 3.24.2 (3.26.0 available)
      xml 6.6.1 (7.0.1 available)
    Got dependencies in `/usr/local/google/home/loicsharma/Code/flutter`!
    5 packages are discontinued.
    38 packages have newer versions incompatible with dependency constraints.
    Try `flutter pub outdated` for more information.
    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:33)
    #3      FlutterNativeAssetsBuildRunnerImpl.setCCompilerConfig (package:flutter_tools/src/isolated/native_assets/native_assets.dart:279:75)
    #4      runFlutterSpecificHooks (package:flutter_tools/src/isolated/native_assets/native_assets.dart:101:25)
    <asynchronous suspension>
    #5      DartBuild.build (package:flutter_tools/src/build_system/targets/native_assets.dart:56:14)
    <asynchronous suspension>
    #6      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:937:9)
    <asynchronous suspension>
    #7      Future.wait.<anonymous closure> (dart:async/future.dart:546:21)
    <asynchronous suspension>
    #8      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:875:32)
    <asynchronous suspension>
    #9      Future.wait.<anonymous closure> (dart:async/future.dart:546:21)
    <asynchronous suspension>
    #10     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:875:32)
    <asynchronous suspension>
    #11     FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:684:16)
    <asynchronous suspension>
    #12     BundleBuilder.build (package:flutter_tools/src/bundle_builder.dart:78:32)
    <asynchronous suspension>
    #13     BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:146:5)
    <asynchronous suspension>
    #14     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1630:27)
    <asynchronous suspension>
    #15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
    <asynchronous suspension>
    #16     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
    <asynchronous suspension>
    #17     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
    <asynchronous suspension>
    #18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
    <asynchronous suspension>
    #19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
    <asynchronous suspension>
    #20     FlutterCommandRunner.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:307:33)
    <asynchronous suspension>
    #21     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:104:11)
    <asynchronous suspension>
    #22     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
    <asynchronous suspension>
    #23     main (package:flutter_tools/executable.dart:103:3)
    <asynchronous suspension>
    
    Failed to build bundle.
    
  6. jwinarske commented on Jun 20, 2026

    @jwinarske
    ContributorAuthor

    Any update on this?

  7. added
    P2Important issues not at the top of the work list
    triaged-toolTriaged by Flutter Tool team
    on Jun 23, 2026
  8. self-assigned this
    on Jun 23, 2026
  9. Markus43 commented on Jul 3, 2026

    @Markus43

    @bkonyi Are you planning a backport for the fix, as it is breaking bundle builds on stable?

  10. bkonyi commented on Jul 8, 2026

    @bkonyi
    Contributor

    @bkonyi Are you planning a backport for the fix, as it is breaking bundle builds on stable?

    I've created a cherry pick for this PR, so it should go out in the next hotfix release after it's approved!

  11. github-actions commented on Jul 22, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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