Unable to run on Windows
Thanks for your work on this project, I would be grateful if you can help with issue below:
When I try to use on windows 11, it gives error below:
......
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd” exited,code 1。 [F:\workspace\lcpp_test\build\windows\x64\INSTALL.vcxproj]
Building Windows application... 73.0s
Build process failed.
I just want to ask that have you ever seen errors like this? I also tried released version, the assistant won't display anything after user's input, like this:
Thanks for your time.
Thanks for your advice. I've tried to upgrade flutter to 3.29.0, and it can be built successfully, but it seems I can't run with logger, it gives error below:
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started. Error launching application on Windows.
Actually, I may use lcpp package in my project and in the same environment, my project using lcpp still gives error the same to my last comment. So is there anything should be noticed to use lcpp in flutter projects? I use lcpp like this:
_llama = Llama( modelParams: ModelParams( path: modelPath, ), contextParams: const ContextParams( nCtx: 2048, nBatch: 2048 ), samplingParams: const SamplingParams( greedy: true ), isolate: true );
Ok, thanks for your help. It seems everything goes well on mac, I will choose to use mac to develop.
Btw, I found some people had already met this error (Error waiting for a debug connection: The log reader stopped unexpectedly, or never started. Error launching application on Windows.) in flutter community, it has something to do with the framework itself.
Thanks for your help.
Hello friend,
I've tried to use macos to develop. Here I find some problems both in ios and macos.
Firstly, I ran maid successfully on macos (release version and complied version), but I failed to run on ios. On my iPhone( ios 18.4), it stuck when the app started, error is like this: "An abort signal terminated the process. Such crashes often happen because of an uncaught exception or unrecoverable error or calling the abort() function." Then I tried to run in vm machine, the app started successfully, however, the app gave errors below when I had already chosen gguf model: "[log] LlamaIsolateEntry: Invalid argument(s): Failed to load dynamic library 'lcpp.framework/lcpp': dlopen(lcpp.framework/lcpp, 0x0001): tried: '/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRootlcpp.framework/lcpp' (no such file)" So it may have something to do with lcpp?
Also, I add lcpp in my own projects and use the codes I mentioned previously. On virtual machine it gives error like maid, but it have another problem when running on macos:
"[log] Model params initialized register_backend: registered backend Metal (1 devices) register_device: registered device Metal (Apple M1) register_backend: registered backend CPU (1 devices) register_device: registered device CPU (Apple M1) llama_model_load_from_file_impl: using device Metal (Apple M1) - 5399 MiB free gguf_init_from_file: failed to open GGUF file '/Volumes/Macintosh HD/Users/linorman/Desktop/intelli_mailer/assets/models/inline_prediction.gguf' llama_model_load: error loading model: llama_model_loader: failed to load model from /Volumes/Macintosh HD/Users/linorman/Desktop/intelli_mailer/assets/models/inline_prediction.gguf
llama_model_load_from_file_impl: failed to load model [log] LlamaIsolateEntry: 'package:lcpp/src/llama_native.dart': Failed assertion: line 113 pos 12: '_model != ffi.nullptr': Failed to load model"
That's strange because I used the same model to maid and the same file path, it gave error but that wouldn't happen in maid.
Sorry for bothering you again, I'll be grateful if you help with this issue.
OK, thanks for your time. If I solve any of the problem, I will contact you and submit a pr.
oh yeah i just thought of something that may help
for some reason the default windows setup crashes when using
set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>") in
windows/CMakeLists.txtbut if you change it to
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") it works fine
Thanks for your advice, but unfortunately, it may not be the essential problem.
And also, may I ask that have you figured out the issue in ios which the model can't be loaded successfully?
Team, I downloaded the Windows version and opened the app without issues. I pointed to the model, but the agent failed to answer any questions. It looks like the llama is not using the model I pointed to.