NVIDIA / NVIDIA/cutlass

[QST] make error caused by glibc 2.32 in ubuntu 18.04 "//usr/local/lib/libpthread.so.0: undefined reference to"

Open
#1,490 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

? - Needs Triage inactive-30d inactive-90d question
Dominant language
C++
Stars
10.5k
Forks
2.1k
Avg merge
3d 11h
Merged PRs (30d)
7

Description

After perform the order of "cmake .. -DCUTLASS_NVCC_ARCHS=80" & "cmake .. -DCUTLASS_NVCC_ARCHS=80" , I got the following:
-- CMake Version: 3.20.5
-- CUTLASS 3.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA 11.4.48
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-11.4/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- CUDART: /usr/local/cuda-11.4/lib64/libcudart.so
-- CUDA Driver: /usr/local/cuda-11.4/lib64/stubs/libcuda.so
-- NVRTC: /usr/local/cuda-11.4/lib64/libnvrtc.so
-- Default Install Location: install
-- Found Python3: /home/zmybuaa/anaconda3/bin/python3.10 (found suitable version "3.10.4", minimum required is "3.5") found components: Interpreter
-- CUDA Compilation Architectures: 80
-- Enable caching of reference results in conv unit tests
-- Enable rigorous conv problem sizes in conv unit tests
-- Using NVCC flags: --expt-relaxed-constexpr;-DCUTLASS_TEST_LEVEL=0;-DCUTLASS_TEST_ENABLE_CACHED_RESULTS=1;-DCUTLASS_CONV_UNIT_TEST_RIGOROUS_SIZE_ENABLED=1;-DCUTLASS_DEBUG_TRACE_LEVEL=0;-Xcompiler=-Wconversion;-Xcompiler=-fno-strict-aliasing
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- CUTLASS Revision: Unable to detect, Git returned code 128.
-- The C compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python3: /home/zmybuaa/anaconda3/bin/python3.10 (found version "3.10.4") found components: Interpreter
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring cublas ...
-- cuBLAS Disabled.
-- Configuring cuBLAS ... done.
-- Completed generation of library instances. See /home/zmybuaa/cutlass-main/build/tools/library/library_instance_generation.log for more information.
-- Found Python3: /home/zmybuaa/anaconda3/bin/python3.10 (found suitable version "3.10.4", minimum required is "3.5") found components: Interpreter
-- Enable device reference verification in conv unit tests
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zmybuaa/cutlass-main/build

However, when I perform the order "make cutlass_profiler -j12", I got this problem, I got this:

[100%] Building CUDA object tools/profiler/CMakeFiles/cutlass_profiler.dir/src/symm_operation_profiler.cu.o
[100%] Building CUDA object tools/profiler/CMakeFiles/cutlass_profiler.dir/src/sparse_gemm_operation_profiler.cu.o
[100%] Linking CXX executable cutlass_profiler
//usr/local/lib/libpthread.so.0: undefined reference to __pthread_attr_destroy@GLIBC_PRIVATE' //usr/local/lib/librt.so.1: undefined reference to pthread_sigmask@GLIBC_2.32'
//usr/local/lib/librt.so.1: undefined reference to __pthread_attr_setsigmask_internal@GLIBC_PRIVATE' //usr/local/lib/libpthread.so.0: undefined reference to __pthread_attr_copy@GLIBC_PRIVATE'
//usr/local/lib/libpthread.so.0: undefined reference to __twalk_r@GLIBC_PRIVATE' //usr/local/lib/libpthread.so.0: undefined reference to __libc_single_threaded@GLIBC_2.32'
//usr/local/lib/libpthread.so.0: undefined reference to __pthread_cond_destroy@GLIBC_PRIVATE' //usr/local/lib/libpthread.so.0: undefined reference to __libc_fcntl64@GLIBC_PRIVATE'
//usr/local/lib/libpthread.so.0: undefined reference to __write_nocancel@GLIBC_PRIVATE' //usr/local/lib/libpthread.so.0: undefined reference to __open64_nocancel@GLIBC_PRIVATE'
//usr/local/lib/libpthread.so.0: undefined reference to `__pthread_cond_init@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
tools/profiler/CMakeFiles/cutlass_profiler.dir/build.make:646: recipe for target 'tools/profiler/cutlass_profiler' failed
make[3]: *** [tools/profiler/cutlass_profiler] Error 1
CMakeFiles/Makefile2:24767: recipe for target 'tools/profiler/CMakeFiles/cutlass_profiler.dir/all' failed
make[2]: *** [tools/profiler/CMakeFiles/cutlass_profiler.dir/all] Error 2
CMakeFiles/Makefile2:24774: recipe for target 'tools/profiler/CMakeFiles/cutlass_profiler.dir/rule' failed
make[1]: *** [tools/profiler/CMakeFiles/cutlass_profiler.dir/rule] Error 2
Makefile:10171: recipe for target 'cutlass_profiler' failed
make: *** [cutlass_profiler] Error 2

My GLIBC version is 2.32, how can i solve this problem and make success?
Many thanks!!!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the CMake configuration with -DCUTLASS_NVCC_ARCHS=80, then run make cutlass_profiler -j12 and inspect the linker inputs associated with /usr/local/lib/libpthread.so.0 and /usr/local/lib/librt.so.1. Check the generated tools/profiler/CMakeFiles/cutlass_profiler.dir/build.make around the failing link step. Done means cutlass_profiler links successfully on the reported Ubuntu and glibc setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.