Skip to content

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

Open
GuangguanWang wants to merge 2 commits into
deepseek-ai:mainfrom
GuangguanWang:main
Open

fix for link error: libnccl.so.2 can not be found#645
GuangguanWang wants to merge 2 commits into
deepseek-ai:mainfrom
GuangguanWang:main

Conversation

@GuangguanWang

@GuangguanWang GuangguanWang commented May 26, 2026

Copy link
Copy Markdown
Contributor

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

Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant