how to compile on last gcc?
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cmake, python
- Lĩnh vực
- build-system
Hướng nghiên cứu
Lỗi xảy ra trong quá trình CMake nhận diện trình biên dịch CUDA khi build llama-cpp-python với CUDA 11.4 và GCC 12.2.0. Hãy xem cấu hình CMake trong các build script của dự án, đặc biệt là các flag được truyền cho nvcc. Vấn đề là khả năng tương thích giữa CUDA 11.4 và các phiên bản GCC mới hơn; hãy kiểm tra xem dự án có ghi lại các phiên bản trình biên dịch được hỗ trợ hay có cần một workaround flag nào không. Việc kiểm thử bao gồm sửa các đối số CMake hoặc các biến môi trường để xem build có thành công hay không.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
export PATH=/usr/local/cuda-11.4/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH
NVCC_PREPEND_FLAGS="-allow-unsupported-compiler" CMAKE_ARGS="-DGGML_CUDA=on -DLLAVA_BUILD=off -DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler" proxychains ../../bin/pip install -U llama-cpp-python
ProxyChains-3.1 (http://proxychains.sf.net)
|DNS-request| pypi.org
|S-chain|-<>-127.0.0.1:4445-<><>-4.2.2.2:53-<><>-OK
|DNS-response| pypi.org is 151.101.0.223
|S-chain|-<>-127.0.0.1:4445-<><>-151.101.0.223:443-<><>-OK
Collecting llama-cpp-python
Using cached llama_cpp_python-0.3.16.tar.gz (50.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: typing-extensions>=4.5.0 in /mnt/SOLR/lib/python3.11/site-packages (from llama-cpp-python) (4.15.0)
Requirement already satisfied: numpy>=1.20.0 in /mnt/SOLR/lib/python3.11/site-packages (from llama-cpp-python) (1.26.4)
Collecting diskcache>=5.6.1
Using cached diskcache-5.6.3-py3-none-any.whl (45 kB)
Requirement already satisfied: jinja2>=2.11.3 in /mnt/SOLR/lib/python3.11/site-packages (from llama-cpp-python) (3.1.6)
Requirement already satisfied: MarkupSafe>=2.0 in /mnt/SOLR/lib/python3.11/site-packages (from jinja2>=2.11.3->llama-cpp-python) (3.0.3)
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
╰─> [379 lines of output]
*** scikit-build-core 0.11.6 using CMake 3.25.1 (wheel)
*** Configuring CMake...
loading initial cache file /tmp/tmpsrjhdqci/build/CMakeInit.txt
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc - 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: /usr/bin/x86_64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_BUILD_TYPE=Release
-- Found Git: /usr/bin/git (found version "2.39.5")
-- 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: x86_64
-- GGML_SYSTEM_ARCH: x86
-- 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")
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native
-- Found CUDAToolkit: /usr/local/cuda-11.4/include (found version "11.4.48")
-- CUDA Toolkit found
-- Using CUDA architectures: 50-virtual;61-virtual;70-virtual;75-virtual;80-virtual;86-real
CMake Error at /usr/share/cmake-3.25/Modules/CMakeDetermineCompilerId.cmake:739 (message):
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.
Compiler: /usr/local/cuda-11.4/bin/nvcc
Build flags: -allow-unsupported-compiler
Id flags: --keep;--keep-dir;tmp -v
The output was:
1
#$ NVCC_PREPEND_FLAGS="-allow-unsupported-compiler"
#$ _NVVM_BRANCH_=nvvm
#$ _SPACE_=
#$ _CUDART_=cudart
#$ _HERE_=/usr/local/cuda-11.4/bin
#$ _THERE_=/usr/local/cuda-11.4/bin
#$ _TARGET_SIZE_=
#$ _TARGET_DIR_=
#$ _TARGET_DIR_=targets/x86_64-linux
#$ TOP=/usr/local/cuda-11.4/bin/..
#$ NVVMIR_LIBRARY_DIR=/usr/local/cuda-11.4/bin/../nvvm/libdevice
#$
LD_LIBRARY_PATH=/usr/local/cuda-11.4/bin/../lib:/usr/local/cuda-11.4/lib64:
#$
PATH=/usr/local/cuda-11.4/bin/../nvvm/bin:/usr/local/cuda-11.4/bin:/tmp/pip-build-env-zklleoev/overlay/bin:/tmp/pip-build-env-zklleoev/normal/bin:/usr/local/cuda-11.4/bin:/home/user/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
#$ INCLUDES="-I/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include"
#$ LIBRARIES=
"-L/usr/local/cuda-11.4/bin/../targets/x86_64-linux/lib/stubs"
"-L/usr/local/cuda-11.4/bin/../targets/x86_64-linux/lib"
#$ CUDAFE_FLAGS=
#$ PTXAS_FLAGS=
#$ rm tmp/a_dlink.reg.c
#$ gcc -D__NV_NO_HOST_COMPILER_CHECK=1 -D__CUDA_ARCH__=520 -E -x c++
-DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__
"-I/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include"
-D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=4
-D__CUDACC_VER_BUILD__=48 -D__CUDA_API_VER_MAJOR__=11
-D__CUDA_API_VER_MINOR__=4 -include "cuda_runtime.h" -m64
"CMakeCUDACompilerId.cu" -o "tmp/CMakeCUDACompilerId.cpp1.ii"
#$ cicc --c++14 --gnu_version=120200 --orig_src_file_name
"CMakeCUDACompilerId.cu" --allow_managed -arch compute_52 -m64
--no-version-ident -ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1
--include_file_name "CMakeCUDACompilerId.fatbin.c" -tused
--gen_module_id_file --module_id_file_name
"tmp/CMakeCUDACompilerId.module_id" --gen_c_file_name
"tmp/CMakeCUDACompilerId.cudafe1.c" --stub_file_name
"tmp/CMakeCUDACompilerId.cudafe1.stub.c" --gen_device_file_name
"tmp/CMakeCUDACompilerId.cudafe1.gpu" "tmp/CMakeCUDACompilerId.cpp1.ii" -o
"tmp/CMakeCUDACompilerId.ptx"
/usr/include/stdio.h(189): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(201): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(223): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(260): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(285): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(294): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(303): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(309): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(315): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(830): error: attribute "__malloc__" does not take
arguments
/usr/include/stdlib.h(579): error: attribute "__malloc__" does not take
arguments
/usr/include/stdlib.h(583): error: attribute "__malloc__" does not take
arguments
/usr/include/stdlib.h(812): error: attribute "__malloc__" does not take
arguments
/usr/include/c++/12/bits/stl_pair.h(634): error: argument list for class
template "std::pair" is missing
/usr/include/c++/12/bits/stl_pair.h(634): error: expected a ")"
/usr/include/c++/12/bits/stl_pair.h(634): error: template parameter "_T1"
may not be redeclared in this scope
/usr/include/c++/12/bits/stl_pair.h(634): error: expected a ";"
17 errors detected in the compilation of "CMakeCUDACompilerId.cu".
# --error 0x1 --
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.
Compiler: /usr/local/cuda-11.4/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp -v
The output was:
1
#$ NVCC_PREPEND_FLAGS="-allow-unsupported-compiler"
#$ _NVVM_BRANCH_=nvvm
#$ _SPACE_=
#$ _CUDART_=cudart
#$ _HERE_=/usr/local/cuda-11.4/bin
#$ _THERE_=/usr/local/cuda-11.4/bin
#$ _TARGET_SIZE_=
#$ _TARGET_DIR_=
#$ _TARGET_DIR_=targets/x86_64-linux
#$ TOP=/usr/local/cuda-11.4/bin/..
#$ NVVMIR_LIBRARY_DIR=/usr/local/cuda-11.4/bin/../nvvm/libdevice
#$
LD_LIBRARY_PATH=/usr/local/cuda-11.4/bin/../lib:/usr/local/cuda-11.4/lib64:
#$
PATH=/usr/local/cuda-11.4/bin/../nvvm/bin:/usr/local/cuda-11.4/bin:/tmp/pip-build-env-zklleoev/overlay/bin:/tmp/pip-build-env-zklleoev/normal/bin:/usr/local/cuda-11.4/bin:/home/user/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
#$ INCLUDES="-I/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include"
#$ LIBRARIES=
"-L/usr/local/cuda-11.4/bin/../targets/x86_64-linux/lib/stubs"
"-L/usr/local/cuda-11.4/bin/../targets/x86_64-linux/lib"
#$ CUDAFE_FLAGS=
#$ PTXAS_FLAGS=
#$ rm tmp/a_dlink.reg.c
#$ gcc -D__NV_NO_HOST_COMPILER_CHECK=1 -D__CUDA_ARCH__=520 -E -x c++
-DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__
"-I/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include"
-D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=4
-D__CUDACC_VER_BUILD__=48 -D__CUDA_API_VER_MAJOR__=11
-D__CUDA_API_VER_MINOR__=4 -include "cuda_runtime.h" -m64
"CMakeCUDACompilerId.cu" -o "tmp/CMakeCUDACompilerId.cpp1.ii"
#$ cicc --c++14 --gnu_version=120200 --orig_src_file_name
"CMakeCUDACompilerId.cu" --allow_managed -arch compute_52 -m64
--no-version-ident -ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1
--include_file_name "CMakeCUDACompilerId.fatbin.c" -tused
--gen_module_id_file --module_id_file_name
"tmp/CMakeCUDACompilerId.module_id" --gen_c_file_name
"tmp/CMakeCUDACompilerId.cudafe1.c" --stub_file_name
"tmp/CMakeCUDACompilerId.cudafe1.stub.c" --gen_device_file_name
"tmp/CMakeCUDACompilerId.cudafe1.gpu" "tmp/CMakeCUDACompilerId.cpp1.ii" -o
"tmp/CMakeCUDACompilerId.ptx"
/usr/include/stdio.h(189): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(201): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(223): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(260): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(285): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(294): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(303): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(309): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(315): error: attribute "__malloc__" does not take
arguments
/usr/include/stdio.h(830): error: attribute "__malloc__" does not take
arguments
/usr/include/stdlib.h(579): error: attribute "__malloc__" does not take
arguments
/usr/include/stdlib.h(583): error: attribute "__malloc__" does not take
arguments
/usr/include/stdlib.h(812): error: attribute "__malloc__" does not take
arguments
/usr/include/c++/12/bits/stl_pair.h(634): error: argument list for class
template "std::pair" is missing
/usr/include/c++/12/bits/stl_pair.h(634): error: expected a ")"
/usr/include/c++/12/bits/stl_pair.h(634): error: template parameter "_T1"
may not be redeclared in this scope
/usr/include/c++/12/bits/stl_pair.h(634): error: expected a ";"
17 errors detected in the compilation of "CMakeCUDACompilerId.cu".
# --error 0x1 --
Call Stack (most recent call first):
/usr/share/cmake-3.25/Modules/CMakeDetermineCompilerId.cmake:6 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.25/Modules/CMakeDetermineCompilerId.cmake:48 (__determine_compiler_id_test)
/usr/share/cmake-3.25/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
vendor/llama.cpp/ggml/src/ggml-cuda/CMakeLists.txt:43 (enable_language)
-- Configuring incomplete, errors occurred!
See also "/tmp/tmpsrjhdqci/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/tmpsrjhdqci/build/CMakeFiles/CMakeError.log".
*** CMake configuration failed
[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
It need gcc10, I should compile gcc10?
llama-cpp-python have exists version for cuda 11?
- Ngôn ngữ chính
- Python
- Star
- 10.6k
- Fork
- 1.5k
- Merge trung bình
- 3 giờ 57 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của abetlen/llama-cpp-python
-
Seven llama_sampler_init_* bindings admit keyword arguments that the ctypes function object silently dropsCó thể đã có người làm @Belal0066 đã nhận 17 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
abetlen/llama-cpp-python#2371 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
uv add llama-cpp-python wheels fails for versions above 0.3.30Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
abetlen/llama-cpp-python#2352 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: consolidate build-from-source and GPU backend guideCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
abetlen/llama-cpp-python#2314 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Llama.embed() calls LlamaBatch.add_sequence with old 3-arg signature; missing logits_arrayCó thể làm lại được @lxcxjxhx đã nhận 94 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
abetlen/llama-cpp-python#2211 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Llama() silently accepts and discards `embedding` kwarg; .embed() then raises confusinglyCó thể đã có người làm @Anai-Guo đã nhận 35 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
abetlen/llama-cpp-python#2210 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của abetlen/llama-cpp-python
Issue tương tự
-
Add `django-upgrade` to the CIĐang mởdependencies feature github_actions good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
wemake-services/wemake-django-template#3149 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[request] vsg/1.1.16Đang mởupstream update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
conan-io/conan-center-index#31142 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:core bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
request-theme
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 70/100
LizardByte/ThemerrDB#8877 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/install-update comp/gateway P0 sweeper:risk-compatibility type/bug
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 72/100
NousResearch/hermes-agent#135997 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày