Skip to content

Build error: Incorrect file path casing on case-sensitive filesystem prevents macOS build #180963

Description

@Xm798

Steps to reproduce

  1. Use or create a macOS (APFS, case-sensitive) disk image or partition.
  2. Clone the Flutter Engine repository.
  3. Attempt to build the macOS target.

The build fails referencing a missing file due to the directory name being incorrectly cased in BUILD.gn:

    "framework/source/FlutterWindowControllerTest.mm",

But the actual file path is:

engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterWindowControllerTest.mm

Casing mismatch between source and Source triggers build errors on case-sensitive disks.

Expected results

Build should succeed on both case-sensitive and case-insensitive file systems. File paths in build scripts should always match the actual filesystem casing to ensure cross-platform compatibility.

Actual results

The build fails with an error:

ERROR at //build/config/BUILDCONFIG.gn:645:7: Source file not found.
      target(_target_type, target_name) {
      ^----------------------------------
The target: 
  //flutter/shell/platform/darwin/macos:flutter_desktop_darwin_unittests
has a source file:
  //flutter/shell/platform/darwin/macos/framework/source/FlutterWindowControllerTest. mm
which was not found.

This occurs because BUILD.gn uses framework/source/FlutterWindowControllerTest.mm but on disk it is framework/Source/FlutterWindowControllerTest.mm. The default macOS file system (case-insensitive) does not expose this mismatch, but it fails on case-sensitive systems or elsewhere.

Code sample

Code sample
// Not applicable:  This is a GN build configuration bug rather than a Dart code issue.
// See above for the relevant BUILD.gn entry and actual file system path. 

Screenshots or Video

Not applicable

Logs

Logs
ERROR at //build/config/BUILDCONFIG.gn:695:7: Source file not found.
      target(_target_type, target_name) {
      ^----------------------------------
The target:
  //flutter/shell/platform/darwin/macos:flutter_desktop_darwin_unittests
has a source file:
  //flutter/shell/platform/darwin/macos/framework/source/FlutterWindowControllerTest.mm
which was not found.
ninja: Entering directory `out/mac_release_arm64'
[0/1] Regenerating ninja files
WARNING at build arg file (use "gn args <out_dir>" to edit):65:19: Build argument has no effect.
angle_build_all = false
                  ^----
The variable "angle_build_all" was set as a build argument
but never appeared in a declare_args() block in any buildfile.

To view all possible args, run "gn args --list <out_dir>"

The build continued as if that argument was unspecified.

ERROR at //build/config/BUILDCONFIG.gn:695:7: Source file not found.
      target(_target_type, target_name) {
      ^----------------------------------
The target:
  //flutter/shell/platform/darwin/macos:flutter_desktop_darwin_unittests
has a source file:
  //flutter/shell/platform/darwin/macos/framework/source/FlutterWindowControllerTest.mm
which was not found.
FAILED: build.ninja

Flutter Doctor output

Doctor output

Not applicable

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-macosBuilding on or for macOS specifically
    a: buildBuilding flutter applications with the tool
    engineflutter/engine related. See also e: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Jan 15, 2026
  2. github-actions commented on Jan 30, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: buildBuilding flutter applications with the toola: desktopRunning on desktopengineflutter/engine related. See also e: labels.platform-macosBuilding on or for macOS specificallyteam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions