abetlen / abetlen/llama-cpp-python

The maximum full path to an object file is 250 characters (see CMAKE_OBJECT_PATH_MAX)

Ouverte
#582 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
build
Langage dominant
Python
Étoiles
10.6k
Forks
1.4k
Métriques de merge des PR
Métriques de PR en attente

Description

I am running the latest code
I carefully followed the [README.md](https://github.com/abetlen/llama-cpp-python/blob/main/README.md).
I searched for my issue but no hope.

I am trying to enable gpu overloading for my ggml model "TheBloke_Wizard-Vicuna-13B-Uncensored-GGML"
with these commands :

1-pip uninstall -y llama-cpp-python
2-set CMAKE_ARGS="-DLLAMA_CUBLAS=on"
3-set FORCE_CMAKE=1
4-pip install llama-cpp-python --no-cache-dir
but step four did not work, also tried pip install llama-cpp-python --force-reinstall --upgrade --no-cache-dir, but no hope.

when I try normal pip install llama-cpp-python it works correctly but with no --no-cache-dir

this is the log:

```
pip install llama-cpp-python --no-cache-dir
Collecting llama-cpp-python
Downloading llama_cpp_python-0.1.77.tar.gz (1.6 MB)
---------------------------------------- 1.6/1.6 MB 230.1 kB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: typing-extensions>=4.5.0 in c:\users\king\documents\oobabooga_windows\installer_files\env\lib\site-packages (from llama-cpp-python) (4.7.1)
Requirement already satisfied: numpy>=1.20.0 in c:\users\king\documents\oobabooga_windows\installer_files\env\lib\site-packages (from llama-cpp-python) (1.24.4)
Requirement already satisfied: diskcache>=5.6.1 in c:\users\king\documents\oobabooga_windows\installer_files\env\lib\site-packages (from llama-cpp-python) (5.6.1)
Building wheels for collected packages: llama-cpp-python
Building wheel for llama-cpp-python (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [157 lines of output]

--------------------------------------------------------------------------------
-- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- The C compiler identification is MSVC 19.36.32537.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.36.32532/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is MSVC 19.36.32537.0
-- Detecting CXX compiler ABI info
CMake Warning in C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_cmake_test_compile/build/CMakeFiles/CMakeScratch/TryCompile-xcnw0z/CMakeLists.txt:
The object file directory

C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_cmake_test_compile/build/CMakeFiles/CMakeScratch/TryCompile-xcnw0z/CMakeFiles/cmTC_892de.dir/./

has 225 characters. The maximum full path to an object file is 250
characters (see CMAKE_OBJECT_PATH_MAX). Object file

CMakeCXXCompilerABI.cpp.obj

cannot be safely placed under this directory. The build may not work
correctly.

-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (2.5s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator - success
--------------------------------------------------------------------------------

Configuring Project
Working directory:
C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf\_skbuild\win-amd64-3.10\cmake-build
Command:
'C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf' -G Ninja '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\ninja\data\bin\ninja' -D_SKBUILD_FORCE_MSVC=1930 --no-warn-unused-cli '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf\_skbuild\win-amd64-3.10\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.10.12 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\python.exe' '-DPYTHON_INCLUDE_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\Include' '-DPYTHON_LIBRARY:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\libs\python310.lib' '-DPython_EXECUTABLE:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\python.exe' '-DPython_ROOT_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_INCLUDE_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\Include' '-DPython_LIBRARY:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\libs\python310.lib' '-DPython3_EXECUTABLE:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\python.exe' '-DPython3_ROOT_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_INCLUDE_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\Include' '-DPython3_LIBRARY:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\libs\python310.lib' '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\ninja\data\bin\ninja' -DCMAKE_BUILD_TYPE:STRING=Release

Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.36.32537.0
-- The CXX compiler identification is MSVC 19.36.32537.0
-- Detecting C compiler ABI info
CMake Warning in C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_skbuild/win-amd64-3.10/cmake-build/CMakeFiles/CMakeScratch/TryCompile-h6wfeg/CMakeLists.txt:
The object file directory

C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_skbuild/win-amd64-3.10/cmake-build/CMakeFiles/CMakeScratch/TryCompile-h6wfeg/CMakeFiles/cmTC_e0515.dir/./

has 235 characters. The maximum full path to an object file is 250
characters (see CMAKE_OBJECT_PATH_MAX). Object file

CMakeCCompilerABI.c.obj

cannot be safely placed under this directory. The build may not work
correctly.

-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx86/x64/cl.exe
CMake Warning in C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_skbuild/win-amd64-3.10/cmake-build/CMakeFiles/CMakeScratch/TryCompile-nnakk2/CMakeLists.txt:
The object file directory

C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_skbuild/win-amd64-3.10/cmake-build/CMakeFiles/CMakeScratch/TryCompile-nnakk2/CMakeFiles/cmTC_1959a.dir/./

has 235 characters. The maximum full path to an object file is 250
characters (see CMAKE_OBJECT_PATH_MAX). Object file

testCCompiler.c.obj

cannot be safely placed under this directory. The build may not work
correctly.

-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx86/x64/cl.exe - broken
CMake Error at C:/Users/king/Documents/oobabooga_windows/installer_files/pip-build-env-8kkrd0oa/overlay/Lib/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx86/x64/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'C:/Users/king/Documents/oobabooga_windows/installer_files/pip-install-xlfw0gzx/llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf/_skbuild/win-amd64-3.10/cmake-build/CMakeFiles/CMakeScratch/TryCompile-nnakk2'

Run Build Command(s): C:/Users/king/Documents/oobabooga_windows/installer_files/pip-build-env-8kkrd0oa/overlay/Lib/site-packages/ninja/data/bin/ninja -v cmTC_1959a
[1/2] C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx86\x64\cl.exe /nologo /DWIN32 /D_WINDOWS /Zi /Ob0 /Od /RTC1 -MDd /showIncludes /FoCMakeFiles\cmTC_1959a.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_1959a.dir\ /FS -c C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-nnakk2\testCCompiler.c
[2/2] cmd.exe /C "cd . && C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\cmake\data\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_1959a.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x86\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x86\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx86\x64\link.exe /nologo CMakeFiles\cmTC_1959a.dir\testCCompiler.c.obj /out:cmTC_1959a.exe /implib:cmTC_1959a.lib /pdb:cmTC_1959a.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: cmTC_1959a.exe
cmd.exe /C "cd . && C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\cmake\data\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_1959a.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x86\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x86\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx86\x64\link.exe /nologo CMakeFiles\cmTC_1959a.dir\testCCompiler.c.obj /out:cmTC_1959a.exe /implib:cmTC_1959a.lib /pdb:cmTC_1959a.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x86\rc.exe /fo CMakeFiles\cmTC_1959a.dir/manifest.res CMakeFiles\cmTC_1959a.dir/manifest.rc" failed (exit code 2) with the following output:
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384

Copyright (C) Microsoft Corporation. All rights reserved.

CMakeFiles\cmTC_1959a.dir/manifest.rc(3) : error RC2136 : missing '=' in EXSTYLE=

ninja: build stopped: subcommand failed.

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

-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\skbuild\setuptools_wrap.py", line 666, in setup
env = cmkr.configure(
File "C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\skbuild\cmaker.py", line 357, in configure
raise SKBuildError(msg)

An error occurred while configuring with CMake.
Command:
'C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf' -G Ninja '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\ninja\data\bin\ninja' -D_SKBUILD_FORCE_MSVC=1930 --no-warn-unused-cli '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf\_skbuild\win-amd64-3.10\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.10.12 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\python.exe' '-DPYTHON_INCLUDE_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\Include' '-DPYTHON_LIBRARY:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\libs\python310.lib' '-DPython_EXECUTABLE:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\python.exe' '-DPython_ROOT_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_INCLUDE_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\Include' '-DPython_LIBRARY:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\libs\python310.lib' '-DPython3_EXECUTABLE:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\python.exe' '-DPython3_ROOT_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_INCLUDE_DIR:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\Include' '-DPython3_LIBRARY:PATH=C:\Users\king\Documents\oobabooga_windows\installer_files\env\libs\python310.lib' '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\king\Documents\oobabooga_windows\installer_files\pip-build-env-8kkrd0oa\overlay\Lib\site-packages\ninja\data\bin\ninja' -DCMAKE_BUILD_TYPE:STRING=Release
Source directory:
C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf
Working directory:
C:\Users\king\Documents\oobabooga_windows\installer_files\pip-install-xlfw0gzx\llama-cpp-python_4dd08a4d691c4b88a6c354911a1fceaf\_skbuild\win-amd64-3.10\cmake-build
Please see CMake's output for more information.

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

(C:\Users\king\Documents\oobabooga_windows\installer_files\env) C:\Users\king\Documents\oobabooga_windows>

```

cmake version: 3.27.1
I did try to install visual studio and download UWP and cmake
![image](https://github.com/abetlen/llama-cpp-python/assets/101470839/ebaf46a3-1e50-4c87-9d7e-9f41d390a2f5)
![image](https://github.com/abetlen/llama-cpp-python/assets/101470839/a30d4a12-6e9d-4e73-bf64-11aa35a1dbf1)

I am running:
windows 10
radeon r5 5600g CPU
radeon RX 750 GPU

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.