abetlen / abetlen/llama-cpp-python

The C compiler identification is unknown

Offen
#1,888 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
10.6k
Forks
1.4k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Windows 10 : Visual studio buildtools 2022

All path correct on my env system :
CUDA_PATH | C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5
CUDA_PATH_V12_5 | C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5
CUDA_HOME| C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5

also I have the small sys paths

D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170
D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5\libnvvp
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5\lib\x64

on Vistual Studio installer :
win 10 sdk 10.0.20348.0
c++ core stuffs
cmake toolskit
MSVC v142 x64/x86
MSVC v141 x64/x86
MSVC v140 x64/x86

also I did add args to the env

CMAKE_ARGS
-DGGML_CUDA=on
-DCMAKE_C_COMPILER="d:/mingw64/bin/gcc.exe" | with and without ""
-DCMAKE_CXX_COMPILER="d:/mingw64/bin/g++.exe" | with and without ""

also did :

set CUDACXX="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5\bin\nvcc.exe"
$env:CMAKE_ARGS="-DGGML_CUDA=on"
$env:FORCE_CMAKE=1
pip install llama-cpp-python --upgrade --force-reinstall --no-cache-dir --verbose

but still fails :
loading initial cache file D:\temp\tmpdo5ib0hg\build\CMakeInit.txt
-- Building for: Visual Studio 17 2022
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: d:/mingw64/bin/gcc.exe
-- Check for working C compiler: d:/mingw64/bin/gcc.exe - broken
CMake Error at D:/temp/pip-build-env-q8apl_08/normal/Lib/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"d:/mingw64/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'D:/temp/tmpdo5ib0hg/build/CMakeFiles/CMakeScratch/TryCompile-8bz9cb'

If I did run this : $env:CMAKE_GENERATOR = "MinGW Makefiles"
Building wheels for collected packages: llama-cpp-python
Running command Building wheel for llama-cpp-python (pyproject.toml)
*** scikit-build-core 0.10.7 using CMake 3.31.2 (wheel)
*** Configuring CMake...
2025-01-06 21:27:25,299 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
loading initial cache file D:\temp\tmphh6lo_ms\build\CMakeInit.txt
-- Building for: MinGW Makefiles
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: d:/mingw64/bin/gcc.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: d:/mingw64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.40.0.windows.1")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- Including CPU backend
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Adding CPU backend variant ggml-cpu: -march=native
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.5/include (found version "12.5.40")
-- CUDA Toolkit found
-- Using CUDA architectures: native
CMake Error at D:/temp/pip-build-env-hoji21dz/normal/Lib/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineCompilerId.cmake:865 (message):
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.
Compiler: C:/Program Files/NVIDIA GPU Computing
Toolkit/CUDA/v12.5/bin/nvcc.exe
Build flags:
Id flags: --keep;--keep-dir;tmp -v
The output was:
2
D:\temp\tmphh6lo_ms\build\CMakeFiles\3.31.2\CompilerIdCUDA>call "D:/Program
Files (x86)/Microsoft Visual
Studio/2022/BuildTools/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat"
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.12.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
#$ D:/Program Files (x86)/Microsoft Visual
Studio/2022/BuildTools/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat
....
#$ resource file tmp/a.exe.res: [-D__CUDA_ARCH_LIST__=520
-D__NV_LEGACY_LAUNCH -nologo
"D:\temp\tmphh6lo_ms\build\CMakeFiles\3.31.2\CompilerIdCUDA\tmp\a_dlink.obj"
"D:\temp\tmphh6lo_ms\build\CMakeFiles\3.31.2\CompilerIdCUDA\tmp\CMakeCUDACompilerId.obj"
-link -INCREMENTAL:NO "/LIBPATH:C:/Program Files/NVIDIA GPU Computing
Toolkit/CUDA/v12.5/bin/../lib/x64" cudadevrt.lib cudart_static.lib]
#$ cl.exe @"tmp/a.exe.res" -Fe"a.exe"
LINK : fatal error LNK1104: cannot open file 'uuid.lib'
# --error 0x2 --
Call Stack (most recent call first):
D:/temp/pip-build-env-hoji21dz/normal/Lib/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
D:/temp/pip-build-env-hoji21dz/normal/Lib/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
D:/temp/pip-build-env-hoji21dz/normal/Lib/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
vendor/llama.cpp/ggml/src/ggml-cuda/CMakeLists.txt:25 (enable_language)
-- Configuring incomplete, errors occurred!
*** CMake configuration failed
error: subprocess-exited-with-error

PD:
1- I did tried and installed cmake 3.16, 3.16.9 , latest
2- I did installed the extension of C++/C+, cmake tools, on vs code.
3- I did copied paste the cudatoolkit 4 files to the visual studio build tools extensions folder.

idk what else to do to fix , cannot install it.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.