-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
Steps to reproduce
- Use or create a macOS (APFS, case-sensitive) disk image or partition.
- Clone the Flutter Engine repository.
- 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.ninjaFlutter Doctor output
Doctor output
Not applicable