[PR #645] fix for link error: libnccl.so.2 can not be found #685

Open
opened 2026-10-27 21:05:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/645
Author: @GuangguanWang
Created: 5/26/2026
Status: 🔄 Open

Base: main ← Head: main


📝 Commits (2)

  • 086f58b fix for link error: libnccl.so.2 can not be found
  • 40a8a8e Code format.sh error clean

📊 Changes

1 file changed (+25 additions, -29 deletions)

View changed files

📝 setup.py (+25 -29)

📄 Description

fix for link error: libnccl.so.2 can not be found.

link error happens when run bash build.sh in Python 3.10.12

[9/9] /usr/local/cuda/bin/nvcc /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/cuda_driver.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nccl.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nvshmem.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode_ll.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/intranode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/layout.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/python_api.o -o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/dlink.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -dlink -L/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nvshmem/lib -lnvshmem_device -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -gencode=arch=compute_90,code=sm_90
g++ -pthread -B /root/miniconda3/envs/deepepv2/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/envs/deepepv2/include -fPIC -O2 -isystem /root/miniconda3/envs/deepepv2/include -shared /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/cuda_driver.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nccl.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nvshmem.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode_ll.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/intranode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/layout.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/python_api.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/dlink.o -L/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nvshmem/lib -L/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-310/deep_ep/_C.cpython-310-x86_64-linux-gnu.so -lcuda -l:libnvshmem_host.so.3 -l:libnvshmem_device.a -Wl,-rpath,/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nvshmem/lib -l:libnccl.so.2 -Wl,-rpath,/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nccl/lib
/root/miniconda3/envs/deepepv2/compiler_compat/ld: cannot find -l:libnccl.so.2: No such file or directory
collect2: error: ld returned 1 exit status
error: command '/usr/bin/g++' failed with exit code 1

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepEP/pull/645 **Author:** [@GuangguanWang](https://github.com/GuangguanWang) **Created:** 5/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`086f58b`](https://github.com/deepseek-ai/DeepEP/commit/086f58bdc3172c35acbddee6da94688113c2f4b9) fix for link error: libnccl.so.2 can not be found - [`40a8a8e`](https://github.com/deepseek-ai/DeepEP/commit/40a8a8e8db7ec66b4deec9089867c88d18f46cdd) Code format.sh error clean ### 📊 Changes **1 file changed** (+25 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+25 -29) </details> ### 📄 Description fix for link error: libnccl.so.2 can not be found. link error happens when run `bash build.sh` in Python 3.10.12 ``` [9/9] /usr/local/cuda/bin/nvcc /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/cuda_driver.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nccl.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nvshmem.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode_ll.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/intranode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/layout.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/python_api.o -o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/dlink.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -dlink -L/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nvshmem/lib -lnvshmem_device -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -gencode=arch=compute_90,code=sm_90 g++ -pthread -B /root/miniconda3/envs/deepepv2/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/envs/deepepv2/include -fPIC -O2 -isystem /root/miniconda3/envs/deepepv2/include -shared /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/cuda_driver.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nccl.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/nvshmem.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/internode_ll.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/intranode.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/legacy/layout.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/python_api.o /mnt/deepep-v2/DeepEP/build/temp.linux-x86_64-cpython-310/csrc/kernels/backend/dlink.o -L/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nvshmem/lib -L/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-310/deep_ep/_C.cpython-310-x86_64-linux-gnu.so -lcuda -l:libnvshmem_host.so.3 -l:libnvshmem_device.a -Wl,-rpath,/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nvshmem/lib -l:libnccl.so.2 -Wl,-rpath,/root/miniconda3/envs/deepepv2/lib/python3.10/site-packages/nvidia/nccl/lib /root/miniconda3/envs/deepepv2/compiler_compat/ld: cannot find -l:libnccl.so.2: No such file or directory collect2: error: ld returned 1 exit status error: command '/usr/bin/g++' failed with exit code 1 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#685
No description provided.