# flutter cmake issue

**URL:** https://discourse.cmake.org/t/flutter-cmake-issue/8338
**Category:** Usage
**Created:** [June 15, 2023, 8:00am UTC](https://discourse.cmake.org/t/flutter-cmake-issue/8338 "2023-06-15T08:00:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![PrashantSaxena07](https://discourse.cmake.org/user_avatar/discourse.cmake.org/prashantsaxena07/32/3531_2.png) [@PrashantSaxena07](https://discourse.cmake.org/u/PrashantSaxena07)
#### Post date: [June 15, 2023, 8:00am UTC](https://discourse.cmake.org/t/flutter-cmake-issue/8338/1 "2023-06-15T08:00:24Z")

</div>

hello guys i am facing this issue in building flutter build for linux over snapcraft

[+1 ms] CMake Error at /snap/flutter/141/usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):  
[+2 ms] The C++ compiler  
[] “/snap/flutter/current/usr/bin/clang++”  
[] is not able to compile a simple test program.  
[] It fails with the following output:  
[] Change Dir: /root/parts/workstatus/build/build/linux/x64/release/CMakeFiles/CMakeTmp  
[] Run Build Command(s):/snap/flutter/current/usr/bin/ninja cmTC\_60c22 && [1/2] Building CXX object CMakeFiles/cmTC\_60c22.dir/testCXXCompiler.cxx.o  
[] [2/2] Linking CXX executable cmTC\_60c22  
[] FAILED: cmTC\_60c22

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [June 17, 2023, 10:55pm UTC](https://discourse.cmake.org/t/flutter-cmake-issue/8338/2 "2023-06-17T22:55:07Z")

</div>

If you run with `--debug-trycompile`, you should be able to go into that `CMakeTmp` directory and see what might be up. `CMakeFiles/CMakeError.log` is also of interest here.

---

<div class="post-metadata">

### Author: ![Junaid\_Aslam](https://discourse.cmake.org/user_avatar/discourse.cmake.org/junaid_aslam/32/4718_2.png) [@Junaid\_Aslam](https://discourse.cmake.org/u/Junaid_Aslam)
#### Post date: [July 2, 2024, 5:04pm UTC](https://discourse.cmake.org/t/flutter-cmake-issue/8338/3 "2024-07-02T17:04:52Z")

</div>

[+7 ms] Building Windows application…  
[+4 ms] executing: C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S  
C:\Users\junAI\StudioProjects\intellifarm\_old\windows -B C:\Users\junAI\StudioProjects\intellifarm\_old\build\windows\x64 -G Visual Studio 17 2022 -A x64  
-DFLUTTER\_TARGET\_PLATFORM=windows-x64  
[+182 ms] – Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.  
[+56 ms] – Using cached Firebase SDK zip file  
[] – Using cached extracted Firebase SDK  
[+12 ms] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:119 (add\_subdirectory):  
[+5 ms] The source directory  
[+10 ms] C:/Users/junAI/StudioProjects/intellifarm\_old/build/windows/x64/extracted/firebase\_cpp\_sdk\_windows  
[+1 ms] does not contain a CMakeLists.txt file.  
[+3 ms] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:125 (get\_target\_property):  
[+6 ms] get\_target\_property() called with non-existent target “firebase\_app”.  
[+1 ms] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:126 (string):  
[+1 ms] string sub-command REPLACE requires at least four arguments.  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:127 (set\_target\_properties):  
[+1 ms] set\_target\_properties Can not find target to add properties to:  
[] firebase\_app  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:125 (get\_target\_property):  
[] get\_target\_property() called with non-existent target “firebase\_auth”.  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:126 (string):  
[] string sub-command REPLACE requires at least four arguments.  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:127 (set\_target\_properties):  
[] set\_target\_properties Can not find target to add properties to:  
[] firebase\_auth  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:125 (get\_target\_property):  
[] get\_target\_property() called with non-existent target “firebase\_storage”.  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:126 (string):  
[] string sub-command REPLACE requires at least four arguments.  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:127 (set\_target\_properties):  
[+1 ms] set\_target\_properties Can not find target to add properties to:  
[+1 ms] firebase\_storage  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:125 (get\_target\_property):  
[] get\_target\_property() called with non-existent target “firebase\_firestore”.  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:126 (string):  
[] string sub-command REPLACE requires at least four arguments.  
[] CMake Error at flutter/ephemeral/.plugin\_symlinks/firebase\_core/windows/CMakeLists.txt:127 (set\_target\_properties):  
[] set\_target\_properties Can not find target to add properties to:  
[] firebase\_firestore  
[+1 ms] – Configuring incomplete, errors occurred!  
[+29 ms] Building Windows application… (completed in 323ms)  
[] “flutter windows” took 2,254ms.  
[+8 ms] Unable to generate build files  
[+1 ms]  
#0 throwToolExit (package:flutter\_tools/src/base/common.dart:10:3)  
#1 \_runCmakeGeneration (package:flutter\_tools/src/windows/build\_windows.dart:209:5)  
  
#2 buildWindows (package:flutter\_tools/src/windows/build\_windows.dart:101:5)  
  
#3 BuildWindowsCommand.runCommand (package:flutter\_tools/src/commands/build\_windows.dart:66:5)  
  
#4 FlutterCommand.run. (package:flutter\_tools/src/runner/flutter\_command.dart:1394:27)  
  
#5 AppContext.run. (package:flutter\_tools/src/base/context.dart:153:19)  
  
#6 CommandRunner.runCommand (package:args/command\_runner.dart:212:13)  
  
#7 FlutterCommandRunner.runCommand. (package:flutter\_tools/src/runner/flutter\_command\_runner.dart:372:9)  
  
#8 AppContext.run. (package:flutter\_tools/src/base/context.dart:153:19)  
  
#9 FlutterCommandRunner.runCommand (package:flutter\_tools/src/runner/flutter\_command\_runner.dart:308:5)  
  
#10 run.. (package:flutter\_tools/runner.dart:130:9)  
  
#11 AppContext.run. (package:flutter\_tools/src/base/context.dart:153:19)  
  
#12 main (package:flutter\_tools/executable.dart:93:3)

[+273 ms] ensureAnalyticsSent: 265ms  
[] Running 0 shutdown hooks  
[] Shutdown hooks complete  
[] exiting with code 1

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 17, 2025, 4:25pm UTC](https://discourse.cmake.org/t/flutter-cmake-issue/8338/4 "2025-07-17T16:25:04Z")

</div>

> [@Junaid\_Aslam](#):
>
> [+6 ms] get\_target\_property() called with non-existent target “firebase\_app”.

This looks like the root cause (the rest are either instances of this with different missing targets or cascade errors when using the empty result of this in places expecting non-empty values). For some reason, the `firebase_*` targets aren’t defined; I’d recommend looking into why that is first.
