how to compile on last gcc?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cmake, python
- 領域
- build-system
調査の方向性
CUDA 11.4 と GCC 12.2.0 を使用して llama-cpp-python をビルドすると、CMake の CUDA コンパイラ識別中にエラーが発生します。プロジェクトのビルドスクリプトにある CMake 設定、特に nvcc に渡される flags を確認してください。この問題は CUDA 11.4 と新しい GCC バージョンとの互換性に関係しています。プロジェクトにサポート対象のコンパイラバージョンが記載されているか、必要な workaround flag があるかを確認してください。テストでは、CMake 引数または環境変数を変更して、ビルドが成功するかどうかを確認します。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Python
- スター
- 10.6k
- フォーク
- 1.5k
- 平均マージ
- 3時間 57分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
abetlen/llama-cpp-python のほかの issue
-
Seven llama_sampler_init_* bindings admit keyword arguments that the ctypes function object silently drops対応中かも @Belal0066 が 16 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
abetlen/llama-cpp-python#2371 ·
メンテナーはふだん 1 日以内に返信
-
uv add llama-cpp-python wheels fails for versions above 0.3.30対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/llama-cpp-python#2352 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Docs: consolidate build-from-source and GPU backend guide対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
abetlen/llama-cpp-python#2314 ·
メンテナーはふだん 1 日以内に返信
-
Llama.embed() calls LlamaBatch.add_sequence with old 3-arg signature; missing logits_array再び着手できるかも @lxcxjxhx が 93 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/llama-cpp-python#2211 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Llama() silently accepts and discards `embedding` kwarg; .embed() then raises confusingly対応中かも @Anai-Guo が 33 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
abetlen/llama-cpp-python#2210 ·
メンテナーはふだん 1 日以内に返信
abetlen/llama-cpp-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Graphify-Labs/graphify#4241 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
DeviceTrackerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
XiaoMi/ha_xiaomi_home#1821 ·
メンテナーはふだん 1 日以内に返信
-
Maven path-index: "Ambiguous or noncanonical artifact path" error does not report the offending pathオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pulp/pulp_maven#524 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信