Open wangcker opened 21 hours ago
Hey @wangcker, have you installed CMake prior to trying to run Flutter scene? That's a common issue that trips up a lot of people. You have to install CMake before running the model converter.
@kwill39 cmake --version
cmake version 3.28.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
@wangcker Perfect
Good to see that's not the issue. Can you paste in the command that you're using and a picture of the file structure of your root project? Feel free to block out / replace any personal or sensitive info
@wangcker Perfect
Good to see that's not the issue. Can you paste in the command that you're using and a picture of the file structure of your root project? Feel free to block out / replace any personal or sensitive info
just cloned from flutter_scene from github it likely occur at FetchContent_MakeAvailable(flatbuffers) in importer/CMakeLists.txt
my project ref the flutter_scene in pubspec.yaml by this: flutter_scene: path: ../flutter_scene
Oh I see what you're trying to do now. I haven't tried using a local copy of Flutter scene and referring to it directly before.
bdero would probably be more familiar with building it locally, and I'm sure they'll see this ticket fairly soon and be able to comment with better advice.
@wangcker If you do find the issue before then, definitely comment here if you don't mind! I'd love to know what the issue was myself.
all the error info:
Unhandled exception:
Exception: CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
#0 main.<anonymous closure> (file:///Users/**/flutter_scene/importer/hook/build.dart:37:7)
#1 build (package:native_assets_cli/src/api/build.dart:93:16)
#2 main (file:///Users/**/flutter_scene/importer/hook/build.dart:7:9)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Building native assets for package:flutter_scene_importer failed.
file:///Users/**/flutter_scene/importer/hook/build.dart returned with exit code: 255.
To reproduce run:
/Users/wangcker/opt/flutter/bin/dart --packages=/Users/**/my_3d_app/.dart_tool/package_config.json /Users/**/my_3d_app/.dart_tool/native_assets_builder/ad5635314aae4ae03d576269d98dd699/hook.dill --config=/Users/**/my_3d_app/.dart_tool/native_assets_builder/ad5635314aae4ae03d576269d98dd699/config.json
stderr:
Unhandled exception:
Exception: CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
#0 main.<anonymous closure> (file:///Users/**/flutter_scene/importer/hook/build.dart:37:7)
#1 build (package:native_assets_cli/src/api/build.dart:93:16)
#2 main (file:///Users/**/flutter_scene/importer/hook/build.dart:7:9)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
stdout:
Running cmake gen step...
CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
Unhandled exception:
Exception: Unable to find build executable flatc! Tried the following locations: [file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Release/flatc, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Release/flatc.exe, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Debug/flatc, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Debug/flatc.exe, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/flatc, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/flatc.exe]
#0 findBuiltExecutable (package:flutter_scene_importer/offline_import.dart:27:5)
#1 generateImporterFlatbufferDart (package:flutter_scene_importer/offline_import.dart:42:17)
#2 main.<anonymous closure> (file:///Users/**/flutter_scene/hook/build.dart:8:5)
#3 build (package:native_assets_cli/src/api/build.dart:93:16)
#4 main (file:///Users/**/flutter_scene/hook/build.dart:7:9)
#5 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#6 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Building native assets for package:flutter_scene failed.
file:///Users/**/flutter_scene/hook/build.dart returned with exit code: 255.
To reproduce run:
/Users/wangcker/opt/flutter/bin/dart --packages=/Users/**/my_3d_app/.dart_tool/package_config.json /Users/**/my_3d_app/.dart_tool/native_assets_builder/0d50bf83c90021c6c9d86d23ebf805fb/hook.dill --config=/Users/**/my_3d_app/.dart_tool/native_assets_builder/0d50bf83c90021c6c9d86d23ebf805fb/config.json
stderr:
Unhandled exception:
Exception: Unable to find build executable flatc! Tried the following locations: [file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Release/flatc, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Release/flatc.exe, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Debug/flatc, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/Debug/flatc.exe, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/flatc, file:///Users/**/flutter_scene/importer/build/_deps/flatbuffers-build/flatc.exe]
#0 findBuiltExecutable (package:flutter_scene_importer/offline_import.dart:27:5)
#1 generateImporterFlatbufferDart (package:flutter_scene_importer/offline_import.dart:42:17)
#2 main.<anonymous closure> (file:///Users/**/flutter_scene/hook/build.dart:8:5)
#3 build (package:native_assets_cli/src/api/build.dart:93:16)
#4 main (file:///Users/**/flutter_scene/hook/build.dart:7:9)
#5 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#6 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
stdout:
Unhandled exception:
Exception: Failed to run flutter_scene_importer:import command in build hook (exit code 255):
STDERR: Unhandled exception:
Exception: CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
#0 main.<anonymous closure> (file:///Users/**/flutter_scene/importer/hook/build.dart:37:7)
#1 build (package:native_assets_cli/src/api/build.dart:93:16)
#2 main (file:///Users/**/flutter_scene/importer/hook/build.dart:7:9)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Building native assets for package:flutter_scene_importer failed.
file:///Users/**/flutter_scene/importer/hook/build.dart returned with exit code: 255.
To reproduce run:
/Users/wangcker/opt/flutter/bin/cache/dart-sdk/bin/dart --packages=/Users/**/my_3d_app/.dart_tool/package_config.json /Users/**/my_3d_app/.dart_tool/native_assets_builder/eb82b79aba38faeae02ae065523f1a96/hook.dill --config=/Users/**/my_3d_app/.dart_tool/native_assets_builder/eb82b79aba38faeae02ae065523f1a96/config.json
stderr:
Unhandled exception:
Exception: CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
#0 main.<anonymous closure> (file:///Users/**/flutter_scene/importer/hook/build.dart:37:7)
#1 build (package:native_assets_cli/src/api/build.dart:93:16)
#2 main (file:///Users/**/flutter_scene/importer/hook/build.dart:7:9)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
stdout:
Running cmake gen step...
CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
Error: Compiling native assets failed.
STDOUT:
#0 buildModels (package:flutter_scene_importer/build_hooks.dart:46:7)
#1 main.<anonymous closure> (file:///Users/**/my_3d_app/hook/build.dart:6:5)
#2 build (package:native_assets_cli/src/api/build.dart:93:16)
#3 main (file:///Users/**/my_3d_app/hook/build.dart:5:3)
#4 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#5 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Building native assets for package:my_3d_app failed.
file:///Users/**/my_3d_app/hook/build.dart returned with exit code: 255.
To reproduce run:
/Users/wangcker/opt/flutter/bin/dart --packages=/Users/**/my_3d_app/.dart_tool/package_config.json /Users/**/my_3d_app/.dart_tool/native_assets_builder/79f989ad58edcd9ea7a456ca4fe90521/hook.dill --config=/Users/**/my_3d_app/.dart_tool/native_assets_builder/79f989ad58edcd9ea7a456ca4fe90521/config.json
stderr:
Unhandled exception:
Exception: Failed to run flutter_scene_importer:import command in build hook (exit code 255):
STDERR: Unhandled exception:
Exception: CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
#0 main.<anonymous closure> (file:///Users/**/flutter_scene/importer/hook/build.dart:37:7)
#1 build (package:native_assets_cli/src/api/build.dart:93:16)
#2 main (file:///Users/**/flutter_scene/importer/hook/build.dart:7:9)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Building native assets for package:flutter_scene_importer failed.
file:///Users/**/flutter_scene/importer/hook/build.dart returned with exit code: 255.
To reproduce run:
/Users/wangcker/opt/flutter/bin/cache/dart-sdk/bin/dart --packages=/Users/**/my_3d_app/.dart_tool/package_config.json /Users/**/my_3d_app/.dart_tool/native_assets_builder/eb82b79aba38faeae02ae065523f1a96/hook.dill --config=/Users/**/my_3d_app/.dart_tool/native_assets_builder/eb82b79aba38faeae02ae065523f1a96/config.json
stderr:
Unhandled exception:
Exception: CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
#0 main.<anonymous closure> (file:///Users/**/flutter_scene/importer/hook/build.dart:37:7)
#1 build (package:native_assets_cli/src/api/build.dart:93:16)
#2 main (file:///Users/**/flutter_scene/importer/hook/build.dart:7:9)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
stdout:
Running cmake gen step...
CMake generate step failed (exit code 1):
STDERR: [ 11%] Performing update step for 'flatbuffers-populate'
CMake Error at /Users/**/flutter_scene/importer/build/_deps/flatbuffers-subbuild/flatbuffers-populate-prefix/tmp/flatbuffers-populate-gitupdate.cmake:34 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: '.git'
make[2]: *** [flatbuffers-populate-prefix/src/flatbuffers-populate-stamp/flatbuffers-populate-update] Error 1
make[1]: *** [CMakeFiles/flatbuffers-populate.dir/all] Error 2
make: *** [all] Error 2
CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for flatbuffers failed: 2
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt:27 (FetchContent_MakeAvailable)
STDOUT: -- Configuring incomplete, errors occurred!
Error: Compiling native assets failed.
STDOUT:
#0 buildModels (package:flutter_scene_importer/build_hooks.dart:46:7)
#1 main.<anonymous closure> (file:///Users/**/my_3d_app/hook/build.dart:6:5)
#2 build (package:native_assets_cli/src/api/build.dart:93:16)
#3 main (file:///Users/**/my_3d_app/hook/build.dart:5:3)
#4 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#5 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
stdout:
Building (dry run) native assets failed. See the logs for more details.
hello, I try to build scene lib,but it throws:
flutter doctor -v