llama_cpp_dart icon indicating copy to clipboard operation
llama_cpp_dart copied to clipboard

CMake Build Failure for llama_cpp_dart: Missing add_subdirectory Source Directory

Open MarkNwilliam opened this issue 1 year ago • 6 comments

Steps to Reproduce

  1. Make flutter app.
  2. install library flutter pub add llama_cpp_dart
  3. Download llama.cpp and make a shared library for me this is .libllama.dylib and add to root.
  4. Observe the build failure with the above error.

Environment

  • Operating System: macOS
  • CMake Version: 3.30
  • NDK Version: 23.1.7779620
  • API Level: 23
  • Architecture: arm64-v8a

Additional Information

  • The CMakeLists.txt file does not contain a project() command, which seems to be a requirement.
  • The path specified for add_subdirectory does not exist, leading to the failure.
  • Any suggestions on how to resolve these issues would be greatly appreciated!

Expected Behavior

The build should complete successfully without any configuration errors.

MarkNwilliam avatar Oct 16 '24 09:10 MarkNwilliam

Have you found a solution to this yet? We are also facing this problem.

Vinayak006 avatar Oct 30 '24 05:10 Vinayak006

can you edit cmake, this line add_subdirectory(./llama.cpp) to point exactly to where you have cloned llama.cpp make sure to clone exact version

netdur avatar Oct 31 '24 14:10 netdur

What I did was, cloned the llama.cpp into this ~/.pub-cache/hosted/pub.dev/llama_cpp_dart-0.0.7/src.

And then app runned without any warnings or errors, but when i tried to load model, app crashed. you can on more at here: https://github.com/netdur/llama_cpp_dart/issues/41

Vinayak006 avatar Nov 03 '24 07:11 Vinayak006

What I did was, cloned the llama.cpp into this ~/.pub-cache/hosted/pub.dev/llama_cpp_dart-0.0.7/src.

And then app runned without any warnings or errors, but when i tried to load model, app crashed. you can on more at here: #41

I have the same problem. How can it be fixed?

rpardela avatar Nov 17 '24 20:11 rpardela

What I did was, cloned the llama.cpp into this ~/.pub-cache/hosted/pub.dev/llama_cpp_dart-0.0.7/src.

And then app runned without any warnings or errors, but when i tried to load model, app crashed. you can on more at here: #41

this solution worked for me as well but app is being crashed on loading the model

mnawazshah avatar Apr 29 '25 08:04 mnawazshah

same

sgehrman avatar Aug 06 '25 05:08 sgehrman