Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help: when "cmake --build . --config Release" , error: unknown type name 'FINDEX_INFO_LEVELS' #5158

Closed
amyweiwu opened this issue Jan 27, 2024 · 4 comments

Comments

@amyweiwu
Copy link

cmake --build . --config Release
[ 1%] Building C object CMakeFiles/ggml.dir/ggml.c.obj
In file included from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/winbase.h:18,
from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/windows.h:70,
from D:\wuwei\LLM\LLAMA\llama.cpp\ggml.c:43:
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/fileapi.h:168:65: error: unknown type name 'FINDEX_INFO_LEVELS'; did you mean 'GET_FILEEX_INFO_LEVELS'?
168 | WINBASEAPI HANDLE WINAPI FindFirstFileExA (LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
| ^~~~~~~~~~~~~~~~~~
| GET_FILEEX_INFO_LEVELS
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/fileapi.h:168:121: error: unknown type name 'FINDEX_SEARCH_OPS'
168 | WINBASEAPI HANDLE WINAPI FindFirstFileExA (LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
|
^~~~~~~~~~~~~~~~~
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/fileapi.h:169:66: error: unknown type name 'FINDEX_INFO_LEVELS'; did you mean 'GET_FILEEX_INFO_LEVELS'?
169 | WINBASEAPI HANDLE WINAPI FindFirstFileExW (LPCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
| ^~~~~~~~~~~~~~~~~~
| GET_FILEEX_INFO_LEVELS
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/fileapi.h:169:122: error: unknown type name 'FINDEX_SEARCH_OPS'
169 | WINBASEAPI HANDLE WINAPI FindFirstFileExW (LPCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
|
^~~~~~~~~~~~~~~~~
In file included from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/windows.h:76:
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/winreg.h:200:59: error: unknown type name 'PVALENTA'
200 | WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY hKey,PVALENTA val_list,DWORD num_vals,LPSTR lpValueBuf,LPDWORD ldwTotsize);
| ^~~~~~~~
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/winreg.h:201:59: error: unknown type name 'PVALENTW'
201 | WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY hKey,PVALENTW val_list,DWORD num_vals,LPWSTR lpValueBuf,LPDWORD ldwTotsize);
| ^~~~~~~~
In file included from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/objbase.h:14,
from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/ole2.h:17,
from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/wtypes.h:13,
from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/winscard.h:10,
from C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/windows.h:97:
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/combaseapi.h:232:79: error: unknown type name 'SOLE_AUTHENTICATION_SERVICE'
232 | WINOLEAPI CoInitializeSecurity (PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE *asAuthSvc, void *pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void *pAuthList, DWORD dwCapabilities, void *pReserved3);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/amywe/scoop/apps/mingw/13.2.0-rt_v11-rev1/x86_64-w64-mingw32/include/combaseapi.h:257:60: error: unknown type name 'SOLE_AUTHENTICATION_SERVICE'
257 | WINOLEAPI CoQueryAuthenticationServices (DWORD *pcAuthSvc, SOLE_AUTHENTICATION_SERVICE **asAuthSvc);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make[2]: *** [CMakeFiles\ggml.dir\build.make:76: CMakeFiles/ggml.dir/ggml.c.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:719: CMakeFiles/ggml.dir/all] Error 2
mingw32-make: *** [Makefile:145: all] Error 2

@amyweiwu amyweiwu closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
@amyweiwu amyweiwu reopened this Jan 28, 2024
@hongzicong
Copy link

I have a similar issue in Windows 10.

@jeberger
Copy link

jeberger commented Jan 30, 2024

You can work around the issue by adding the -DLLAMA_WIN_VER=0x400 option to cmake

@jeberger
Copy link

On second thought, 0x400 allows it to compile but some models won't load. You probably want at least -DLLAMA_WIN_VER=0x602 (i.e. Windows 8 and above).

@Trojaner
Copy link

Trojaner commented Feb 1, 2024

On second thought, 0x400 allows it to compile but some models won't load. You probably want at least -DLLAMA_WIN_VER=0x602 (i.e. Windows 8 and above).

This works perfectly, thank you.

crimsonmagick added a commit to crimsonmagick/llama.cpp that referenced this issue Feb 3, 2024
Updated CMakeLists.txt to update `LLAMA_WIN_VER` with `set()` instead of `option()` (which is specifically for booleans).
crimsonmagick added a commit to crimsonmagick/llama.cpp that referenced this issue Feb 3, 2024
Updated CMakeLists.txt to set `LLAMA_WIN_VER` with `set()` instead of `option()` (which is specifically for booleans).
crimsonmagick added a commit to crimsonmagick/llama.cpp that referenced this issue Feb 3, 2024
Updated CMakeLists.txt to set `LLAMA_WIN_VER` with `set()` instead of `option()` (which is specifically for booleans).
jordankanter pushed a commit to jordankanter/llama.cpp that referenced this issue Mar 13, 2024
option() is specifically for booleans.

Fixes ggml-org#5158
hodlen pushed a commit to hodlen/llama.cpp that referenced this issue Apr 1, 2024
option() is specifically for booleans.

Fixes ggml-org#5158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants