Skip to content

CUDA 12.9 build fail #3339

@miku1958

Description

@miku1958

I installed CUDA 12.9 and used this command to build on Windows
cmake -B build -DGGML_CUDA=1 -G "MinGW Makefiles" -DCMAKE_CUDA_ARCHITECTURES=all

(DCMAKE_CUDA_ARCHITECTURES == native will also cause the build to fail)

The result is the following error

-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.9/bin/nvcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-4.0/Modules/CMakeTestCUDACompiler.cmake:59 (message):
  The CUDA compiler

    "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.9/bin/nvcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: 'aaa/whisper.cpp/build/CMakeFiles/CMakeScratch/TryCompile-a1uzwn'

    Run Build Command(s): "C:/Program Files/CMake/bin/cmake.exe" -E env VERBOSE=1 C:/PROGRA~1/mingw64/bin/mingw32-make.exe -f Makefile cmTC_561d1/fast
    C:/PROGRA~1/mingw64/bin/mingw32-make.exe  -f CMakeFiles\cmTC_561d1.dir\build.make CMakeFiles/cmTC_561d1.dir/build
    mingw32-make[1]: Entering directory 'aaa/whisper.cpp/build/CMakeFiles/CMakeScratch/TryCompile-a1uzwn'
    Building CUDA object CMakeFiles/cmTC_561d1.dir/main.cu.obj
    C:\PROGRA~1\NVIDIA~2\CUDA\v12.9\bin\nvcc.exe -forward-unknown-to-host-compiler   -D_WINDOWS -Xcompiler=" /GR /EHsc"  -Xcompiler=" -Zi -Ob0 -Od /RTC1" -arch=all -Xcompiler=-MDd -MD -MT CMakeFiles/cmTC_561d1.dir/main.cu.obj -MF CMakeFiles\cmTC_561d1.dir\main.cu.obj.d -x cu -c C:\XboxGames\whisper.cpp\build\CMakeFiles\CMakeScratch\TryCompile-a1uzwn\main.cu -o CMakeFiles\cmTC_561d1.dir\main.cu.obj -Xcompiler=-FdCMakeFiles\cmTC_561d1.dir/,-FS
    nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
    main.cu
    tmpxft_00006904_00000000-10_main.compute_121.cudafe1.cpp
    Linking CUDA executable cmTC_561d1.exe
    "C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_561d1.dir\link.txt --verbose=1
    "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_561d1.dir --rc=C:\PROGRA~1\mingw64\bin\windres.exe --mt="" --manifests -- C:\PROGRA~1\mingw64\bin\ld.exe /nologo @CMakeFiles\cmTC_561d1.dir\objects1.rsp  /out:cmTC_561d1.exe /implib:cmTC_561d1.lib /pdb:C:\XboxGames\whisper.cpp\build\CMakeFiles\CMakeScratch\TryCompile-a1uzwn\cmTC_561d1.pdb /version:0.0 /debug /INCREMENTAL @CMakeFiles\cmTC_561d1.dir\linkLibs.rsp -LIBPATH:"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.9/lib/x64"
    Visual Studio Incremental Link with embedded manifests
    Create CMakeFiles\cmTC_561d1.dir/manifest.rc
    Create empty: CMakeFiles\cmTC_561d1.dir/embed.manifest
    RC Pass 1:
    C:\PROGRA~1\mingw64\bin\windres.exe /fo CMakeFiles\cmTC_561d1.dir/manifest.res CMakeFiles\cmTC_561d1.dir/manifest.rc
    RC Pass 1: command "C:\PROGRA~1\mingw64\bin\windres.exe /fo CMakeFiles\cmTC_561d1.dir/manifest.res CMakeFiles\cmTC_561d1.dir/manifest.rc" failed (exit code 1) with the following output:
    Usage: C:\PROGRA~1\mingw64\bin\windres.exe [option(s)] [input-file] [output-file]
     The options are:
      -i --input=<file>            Name input file
      -o --output=<file>           Name output file
      -J --input-format=<format>   Specify input format
      -O --output-format=<format>  Specify output format
      -F --target=<target>         Specify COFF target
         --preprocessor=<program>  Program to use to preprocess rc file
         --preprocessor-arg=<arg>  Additional preprocessor argument
      -I --include-dir=<dir>       Include directory when preprocessing rc file
      -D --define <sym>[=<val>]    Define SYM when preprocessing rc file
      -U --undefine <sym>          Undefine SYM when preprocessing rc file
      -v --verbose                 Verbose - tells you what it's doing
      -c --codepage=<codepage>     Specify default codepage
      -l --language=<val>          Set language when reading rc file
         --use-temp-file           Use a temporary file instead of popen to read
                                   the preprocessor output
         --no-use-temp-file        Use popen (default)
      -r                           Ignored for compatibility with rc
      @<file>                      Read options from <file>
      -h --help                    Print this help message
      -V --version                 Print version information
    FORMAT is one of rc, res, or coff, and is deduced from the file name
    extension if not specified.  A single file name is an input file.
    No input-file is stdin, default rc.  No output-file is stdout, default rc.
    C:\PROGRA~1\mingw64\bin\windres.exe: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 pe-i386 pei-i386 elf32-i386 elf32-iamcu pdb elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin
    mingw32-make[1]: *** [CMakeFiles\cmTC_561d1.dir\build.make:104: cmTC_561d1.exe] Error -1
    mingw32-make[1]: Leaving directory 'aaa/whisper.cpp/build/CMakeFiles/CMakeScratch/TryCompile-a1uzwn'
    mingw32-make: *** [Makefile:133: cmTC_561d1/fast] Error 2





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


-- Configuring incomplete, errors occurred!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions