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

cmake -G "MinGW Makefiles" -DGGML_CUBLAS=ON .. error in windows 10 #644

Open
wuxianjun666 opened this issue Dec 11, 2023 · 2 comments
Open

Comments

@wuxianjun666
Copy link

GNU ld (GNU Binutils) 2.30
-- x86 detected
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/include (found version "11.6.55")
-- cuBLAS found
-- The CUDA compiler identification is NVIDIA 11.6.55
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - failed
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/bin/nvcc.exe
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/bin/nvcc.exe - broken
CMake Error at D:/cmake/share/cmake-3.28/Modules/CMakeTestCUDACompiler.cmake:59 (message):
The CUDA compiler

"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/bin/nvcc.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5'

Run Build Command(s): D:/cmake/bin/cmake.exe -E env VERBOSE=1 D:/mingw64/bin/make.exe -f Makefile cmTC_54b8d/fast
D:/mingw64/bin/make.exe  -f CMakeFiles/cmTC_54b8d.dir/build.make CMakeFiles/cmTC_54b8d.dir/build
make.exe[1]: Entering directory 'E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5'
Building CUDA object CMakeFiles/cmTC_54b8d.dir/main.cu.obj
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/bin/nvcc.exe" -forward-unknown-to-host-compiler   -D_WINDOWS -Xcompiler=" /GR /EHsc"  -Xcompiler=" -Zi -Ob0 -Od /RTC1" -Xcompiler=-MDd -MD -MT CMakeFiles/cmTC_54b8d.dir/main.cu.obj -MF CMakeFiles/cmTC_54b8d.dir/main.cu.obj.d -x cu -c E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5/main.cu -o CMakeFiles/cmTC_54b8d.dir/main.cu.obj -Xcompiler=-FdCMakeFiles/cmTC_54b8d.dir/,-FS
main.cu
Linking CUDA executable cmTC_54b8d.exe
D:/cmake/bin/cmake.exe -E vs_link_exe --intdir=CMakeFiles/cmTC_54b8d.dir --rc=D:/mingw64/bin/windres.exe --mt="" --manifests -- D:/mingw64/bin/ld.exe /nologo @CMakeFiles/cmTC_54b8d.dir/objects1.rsp  /out:cmTC_54b8d.exe /implib:cmTC_54b8d.lib /pdb:E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5/cmTC_54b8d.pdb /version:0.0 /debug /INCREMENTAL @CMakeFiles/cmTC_54b8d.dir/linkLibs.rsp -LIBPATH:"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/lib/x64"
Visual Studio Non-Incremental Link
LINK:
D:/mingw64/bin/ld.exe C:/Program Files/Git/nologo @CMakeFiles/cmTC_54b8d.dir/objects1.rsp /out:cmTC_54b8d.exe /implib:cmTC_54b8d.lib /pdb:E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5/cmTC_54b8d.pdb /version:0.0 C:/Program Files/Git/debug C:/Program Files/Git/INCREMENTAL @CMakeFiles/cmTC_54b8d.dir/linkLibs.rsp -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/lib/x64 /MANIFEST:EMBED,ID=1
LINK: command "D:/mingw64/bin/ld.exe C:/Program Files/Git/nologo @CMakeFiles/cmTC_54b8d.dir/objects1.rsp /out:cmTC_54b8d.exe /implib:cmTC_54b8d.lib /pdb:E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5/cmTC_54b8d.pdb /version:0.0 C:/Program Files/Git/debug C:/Program Files/Git/INCREMENTAL @CMakeFiles/cmTC_54b8d.dir/linkLibs.rsp -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/lib/x64 /MANIFEST:EMBED,ID=1" failed (exit code 1) with the following output:
D:/mingw64/bin/ld.exe: cannot find C:/Program Files/Git/nologo: No such file or directory
D:/mingw64/bin/ld.exe: cannot find /out:cmTC_54b8d.exe: No such file or directory
D:/mingw64/bin/ld.exe: cannot find /implib:cmTC_54b8d.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find /pdb:E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5/cmTC_54b8d.pdb: Invalid argument
D:/mingw64/bin/ld.exe: cannot find /version:0.0: No such file or directory
D:/mingw64/bin/ld.exe: cannot find C:/Program Files/Git/debug: No such file or directory
D:/mingw64/bin/ld.exe: cannot find C:/Program Files/Git/INCREMENTAL: No such file or directory
D:/mingw64/bin/ld.exe: cannot find cudadevrt.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find cudart_static.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find kernel32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find user32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find gdi32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find winspool.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find shell32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find ole32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find oleaut32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find uuid.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find comdlg32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find advapi32.lib: No such file or directory
D:/mingw64/bin/ld.exe: cannot find /MANIFEST:EMBED,ID=1: No such file or directory
make.exe[1]: *** [CMakeFiles/cmTC_54b8d.dir/build.make:101: cmTC_54b8d.exe] Error 127
make.exe[1]: Leaving directory 'E:/c++/ggml/build/CMakeFiles/CMakeScratch/TryCompile-69z2j5'
make.exe: *** [Makefile:127: cmTC_54b8d/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
src/CMakeLists.txt:212 (enable_language)

-- Configuring incomplete, errors occurred!

@wuxianjun666
Copy link
Author

if i use Visual Studio 16 2019 is ok ,when i use cmake -G "MinGW Makefiles" it broken
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.29.30152.0
-- The CXX compiler identification is MSVC 19.29.30152.0
-- x86 detected
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/include (found version "11.6.55")
-- cuBLAS found
-- The CUDA compiler identification is NVIDIA 11.6.55
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/bin/nvcc.exe - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- GGML CUDA sources found
-- GGML Configuring CUDA architectures 52;61;70

@slaren
Copy link
Collaborator

slaren commented Jan 29, 2024

I don't think that CUDA supports mingw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants