[GH-ISSUE #6266] MSBUILD : error MSB1009: Arquivo de projeto não existe. Opção: ollama_llama_server.vcxproj llm\generate\generate_windows.go:3: running "powershell": exit status 1 #3923

Closed
opened 2026-04-12 14:47:47 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @insinfo on GitHub (Aug 8, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6266

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

I'm trying to compile on windows and I'm getting this error

PS C:\my_cpp_projects\ollama> Install-Module -Name ThreadJob -Scope CurrentUser

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): a
PS C:\my_cpp_projects\ollama> go generate ./...
Already on 'minicpm-v2.5'
Your branch is up to date with 'origin/minicpm-v2.5'.
Submodule path '../llama.cpp': checked out '65f7455cea443bd9b6fd8546ef53440d6f6d963f'
Checking for MinGW...

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     gcc.exe                                            0.0.0.0    C:\mingw64\bin\gcc.exe
Application     mingw32-make.exe                                   0.0.0.0    C:\mingw64\bin\mingw32-make.exe
Building static library
generating config with: cmake -S ../llama.cpp -B ../build/windows/amd64_static -G MinGW Makefiles -DCMAKE_C_COMPILER=gcc.exe -DCMAKE_CXX_COMPILER=g++.exe -DBUILD_SHARED_LIBS=off -DLLAMA_NATIVE=off -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_F16C=off -DLLAMA_FMA=off
cmake version 3.30.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- OpenMP found
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with LLAMA_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- x86 detected
-- Configuring done (0.6s)
-- Generating done (4.9s)
-- Build files have been written to: C:/my_cpp_projects/ollama/llm/build/windows/amd64_static
building with: cmake --build ../build/windows/amd64_static --config Release --target llama --target ggml
[  0%] Building C object CMakeFiles/ggml.dir/ggml.c.obj
C:\my_cpp_projects\ollama\llm\llama.cpp\ggml.c:84:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
   84 | static atomic_bool atomic_flag_test_and_set(atomic_flag * ptr) {
      |        ^~~~~~~~~~~
[ 16%] Building C object CMakeFiles/ggml.dir/ggml-alloc.c.obj
[ 16%] Building C object CMakeFiles/ggml.dir/ggml-backend.c.obj
[ 33%] Building C object CMakeFiles/ggml.dir/ggml-quants.c.obj
[ 50%] Building CXX object CMakeFiles/ggml.dir/sgemm.cpp.obj
[ 50%] Built target ggml
[ 66%] Building CXX object CMakeFiles/llama.dir/llama.cpp.obj
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In member function 'std::string llama_file::GetErrorMessageWin32(DWORD) const':
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:1319:46: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
 1319 |             ret = format("Win32 error code: %s", error_code);
      |                                             ~^   ~~~~~~~~~~
      |                                              |   |
      |                                              |   DWORD {aka long unsigned int}
      |                                              char*
      |                                             %ld
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In constructor 'llama_mmap::llama_mmap(llama_file*, size_t, bool)':
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:1657:38: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(HANDLE, ULONG_PTR, PWIN32_MEMORY_RANGE_ENTRY, ULONG)' {aka 'int (*)(void*, long long unsigned int, _WIN32_MEMORY_RANGE_ENTRY*, long unsigned int)'} [-Wcast-function-type]
 1657 |             pPrefetchVirtualMemory = reinterpret_cast<decltype(pPrefetchVirtualMemory)> (GetProcAddress(hKernel32, "PrefetchVirtualMemory"));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In function 'float* llama_get_logits_ith(llama_context*, int32_t)':
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:18512:65: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long long unsigned int'} [-Wformat=]
18512 |             throw std::runtime_error(format("out of range [0, %lu)", ctx->output_ids.size()));
      |                                                               ~~^    ~~~~~~~~~~~~~~~~~~~~~~
      |                                                                 |                        |
      |                                                                 long unsigned int        std::vector<int>::size_type {aka long long unsigned int}
      |                                                               %llu
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In function 'float* llama_get_embeddings_ith(llama_context*, int32_t)':
C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:18557:65: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long long unsigned int'} [-Wformat=]
18557 |             throw std::runtime_error(format("out of range [0, %lu)", ctx->output_ids.size()));
      |                                                               ~~^    ~~~~~~~~~~~~~~~~~~~~~~
      |                                                                 |                        |
      |                                                                 long unsigned int        std::vector<int>::size_type {aka long long unsigned int}
      |                                                               %llu
[ 83%] Building CXX object CMakeFiles/llama.dir/unicode.cpp.obj
[ 83%] Building CXX object CMakeFiles/llama.dir/unicode-data.cpp.obj
[100%] Linking CXX static library libllama.a
[100%] Built target llama
[100%] Built target ggml
Building LCD CPU
generating config with: cmake -S ../llama.cpp -B ../build/windows/amd64/cpu -DCMAKE_POSITION_INDEPENDENT_CODE=on -A x64 -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off -DBUILD_SHARED_LIBS=on -DLLAMA_NATIVE=off -DLLAMA_SERVER_VERBOSE=off -DCMAKE_BUILD_TYPE=Release
cmake version 3.30.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.40.33813.0
-- The CXX compiler identification is MSVC 19.40.33813.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.46.0.windows.1")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- OpenMP found
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with LLAMA_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- CMAKE_GENERATOR_PLATFORM: x64
-- x86 detected
-- Configuring done (28.0s)
-- Generating done (1.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    LLAMA_F16C


-- Build files have been written to: C:/my_cpp_projects/ollama/llm/build/windows/amd64/cpu
building with: cmake --build ../build/windows/amd64/cpu --config Release --target ollama_llama_server
Versão do MSBuild 17.10.4+10fbfbf2e para .NET Framework
MSBUILD : error MSB1009: Arquivo de projeto não existe.
Opção: ollama_llama_server.vcxproj
llm\generate\generate_windows.go:3: running "powershell": exit status 1
PS C:\my_cpp_projects\ollama>

OS

Windows

GPU

Intel

CPU

Intel

Ollama version

No response

Originally created by @insinfo on GitHub (Aug 8, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6266 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? I'm trying to compile on windows and I'm getting this error ``` PS C:\my_cpp_projects\ollama> Install-Module -Name ThreadJob -Scope CurrentUser Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): a PS C:\my_cpp_projects\ollama> go generate ./... Already on 'minicpm-v2.5' Your branch is up to date with 'origin/minicpm-v2.5'. Submodule path '../llama.cpp': checked out '65f7455cea443bd9b6fd8546ef53440d6f6d963f' Checking for MinGW... CommandType Name Version Source ----------- ---- ------- ------ Application gcc.exe 0.0.0.0 C:\mingw64\bin\gcc.exe Application mingw32-make.exe 0.0.0.0 C:\mingw64\bin\mingw32-make.exe Building static library generating config with: cmake -S ../llama.cpp -B ../build/windows/amd64_static -G MinGW Makefiles -DCMAKE_C_COMPILER=gcc.exe -DCMAKE_CXX_COMPILER=g++.exe -DBUILD_SHARED_LIBS=off -DLLAMA_NATIVE=off -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_F16C=off -DLLAMA_FMA=off cmake version 3.30.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). -- OpenMP found -- Warning: ccache not found - consider installing it for faster compilation or disable this warning with LLAMA_CCACHE=OFF -- CMAKE_SYSTEM_PROCESSOR: AMD64 -- x86 detected -- Configuring done (0.6s) -- Generating done (4.9s) -- Build files have been written to: C:/my_cpp_projects/ollama/llm/build/windows/amd64_static building with: cmake --build ../build/windows/amd64_static --config Release --target llama --target ggml [ 0%] Building C object CMakeFiles/ggml.dir/ggml.c.obj C:\my_cpp_projects\ollama\llm\llama.cpp\ggml.c:84:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 84 | static atomic_bool atomic_flag_test_and_set(atomic_flag * ptr) { | ^~~~~~~~~~~ [ 16%] Building C object CMakeFiles/ggml.dir/ggml-alloc.c.obj [ 16%] Building C object CMakeFiles/ggml.dir/ggml-backend.c.obj [ 33%] Building C object CMakeFiles/ggml.dir/ggml-quants.c.obj [ 50%] Building CXX object CMakeFiles/ggml.dir/sgemm.cpp.obj [ 50%] Built target ggml [ 66%] Building CXX object CMakeFiles/llama.dir/llama.cpp.obj C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In member function 'std::string llama_file::GetErrorMessageWin32(DWORD) const': C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:1319:46: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=] 1319 | ret = format("Win32 error code: %s", error_code); | ~^ ~~~~~~~~~~ | | | | | DWORD {aka long unsigned int} | char* | %ld C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In constructor 'llama_mmap::llama_mmap(llama_file*, size_t, bool)': C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:1657:38: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(HANDLE, ULONG_PTR, PWIN32_MEMORY_RANGE_ENTRY, ULONG)' {aka 'int (*)(void*, long long unsigned int, _WIN32_MEMORY_RANGE_ENTRY*, long unsigned int)'} [-Wcast-function-type] 1657 | pPrefetchVirtualMemory = reinterpret_cast<decltype(pPrefetchVirtualMemory)> (GetProcAddress(hKernel32, "PrefetchVirtualMemory")); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In function 'float* llama_get_logits_ith(llama_context*, int32_t)': C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:18512:65: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long long unsigned int'} [-Wformat=] 18512 | throw std::runtime_error(format("out of range [0, %lu)", ctx->output_ids.size())); | ~~^ ~~~~~~~~~~~~~~~~~~~~~~ | | | | long unsigned int std::vector<int>::size_type {aka long long unsigned int} | %llu C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp: In function 'float* llama_get_embeddings_ith(llama_context*, int32_t)': C:\my_cpp_projects\ollama\llm\llama.cpp\llama.cpp:18557:65: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long long unsigned int'} [-Wformat=] 18557 | throw std::runtime_error(format("out of range [0, %lu)", ctx->output_ids.size())); | ~~^ ~~~~~~~~~~~~~~~~~~~~~~ | | | | long unsigned int std::vector<int>::size_type {aka long long unsigned int} | %llu [ 83%] Building CXX object CMakeFiles/llama.dir/unicode.cpp.obj [ 83%] Building CXX object CMakeFiles/llama.dir/unicode-data.cpp.obj [100%] Linking CXX static library libllama.a [100%] Built target llama [100%] Built target ggml Building LCD CPU generating config with: cmake -S ../llama.cpp -B ../build/windows/amd64/cpu -DCMAKE_POSITION_INDEPENDENT_CODE=on -A x64 -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off -DBUILD_SHARED_LIBS=on -DLLAMA_NATIVE=off -DLLAMA_SERVER_VERBOSE=off -DCMAKE_BUILD_TYPE=Release cmake version 3.30.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.40.33813.0 -- The CXX compiler identification is MSVC 19.40.33813.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.46.0.windows.1") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Found Threads: TRUE -- Found OpenMP_C: -openmp (found version "2.0") -- Found OpenMP_CXX: -openmp (found version "2.0") -- Found OpenMP: TRUE (found version "2.0") -- OpenMP found -- Warning: ccache not found - consider installing it for faster compilation or disable this warning with LLAMA_CCACHE=OFF -- CMAKE_SYSTEM_PROCESSOR: AMD64 -- CMAKE_GENERATOR_PLATFORM: x64 -- x86 detected -- Configuring done (28.0s) -- Generating done (1.1s) CMake Warning: Manually-specified variables were not used by the project: LLAMA_F16C -- Build files have been written to: C:/my_cpp_projects/ollama/llm/build/windows/amd64/cpu building with: cmake --build ../build/windows/amd64/cpu --config Release --target ollama_llama_server Versão do MSBuild 17.10.4+10fbfbf2e para .NET Framework MSBUILD : error MSB1009: Arquivo de projeto não existe. Opção: ollama_llama_server.vcxproj llm\generate\generate_windows.go:3: running "powershell": exit status 1 PS C:\my_cpp_projects\ollama> ``` ### OS Windows ### GPU Intel ### CPU Intel ### Ollama version _No response_
GiteaMirror added the bugwindows labels 2026-04-12 14:47:47 -05:00
Author
Owner

@dhiltgen commented on GitHub (Aug 9, 2024):

What version of Visual Studio do you have installed?

<!-- gh-comment-id:2278544066 --> @dhiltgen commented on GitHub (Aug 9, 2024): What version of Visual Studio do you have installed?
Author
Owner

@insinfo commented on GitHub (Aug 9, 2024):

the latest version available, I downloaded and installed it yesterday on a clean machine

image

image

go version go1.22.6 windows/amd64

gcc.exe (GCC) 13.2.0
g++.exe (GCC) 13.2.0
MinGW Distro: https://nuwen.net/mingw.html

PowerShell 7.4.3

<!-- gh-comment-id:2278711620 --> @insinfo commented on GitHub (Aug 9, 2024): the latest version available, I downloaded and installed it yesterday on a clean machine ![image](https://github.com/user-attachments/assets/2af027fd-83a7-450a-8724-4bee16b1d116) ![image](https://github.com/user-attachments/assets/af9a99d9-d0b3-4cf4-a2df-fb13478c0954) go version go1.22.6 windows/amd64 gcc.exe (GCC) 13.2.0 g++.exe (GCC) 13.2.0 MinGW Distro: https://nuwen.net/mingw.html PowerShell 7.4.3
Author
Owner

@dhiltgen commented on GitHub (Aug 9, 2024):

Maybe this is a cmake generator problem. I'm using the MSVC cmake

> (get-command cmake).source
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.ex

Try building from an MSVC Developer Shell and see if that clears it up. (just make sure go and gcc show up in your PATH)

<!-- gh-comment-id:2278853729 --> @dhiltgen commented on GitHub (Aug 9, 2024): Maybe this is a `cmake` generator problem. I'm using the MSVC cmake ``` > (get-command cmake).source C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.ex ``` Try building from an MSVC Developer Shell and see if that clears it up. (just make sure `go` and `gcc` show up in your PATH)
Author
Owner

@dhiltgen commented on GitHub (Oct 16, 2024):

We've simplified the windows build setup with the new Go server - instructions here https://github.com/ollama/ollama/blob/main/docs/development.md#windows-1

If you're still having trouble getting a build environment set up based on those instructions, please share updated information and I'll reopen and assist.

<!-- gh-comment-id:2415589398 --> @dhiltgen commented on GitHub (Oct 16, 2024): We've simplified the windows build setup with the new Go server - instructions here https://github.com/ollama/ollama/blob/main/docs/development.md#windows-1 If you're still having trouble getting a build environment set up based on those instructions, please share updated information and I'll reopen and assist.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3923