Open zyh4482 opened 3 weeks ago
The reason I set -D CUDA_rt_LIBRARY=/usr/lib/x86_64-linux-gnu/librt.so
is because cmake
does not recognize the librt
for me either.
I did a small test for cuda following @daidedou under this issue
It reports similar error message:
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Check for working C compiler: /home/zyh/software/miniforge3/bin/cc
-- Check for working C compiler: /home/zyh/software/miniforge3/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/zyh/software/miniforge3/bin/c++
-- Check for working CXX compiler: /home/zyh/software/miniforge3/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 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
CMake Warning at /usr/share/cmake-3.16/Modules/FindCUDA.cmake:900 (message):
Expecting to find librt for libcudart_static, but didn't find it.
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at CMakeLists.txt:10 (MESSAGE):
CUDA_PATH Environment variable is not set.
It seems my cuda path is not set correctly. But after many rounds of tests, I still don't know why the error occurs. The environment variables should have been set as required...
Following is my environment setting.
I've successfully installed required packages and libraries as previously mentioned here: #31
The msgpack and jansson libraries and headers can be found under
/usr/include
and/usr/lib/x86_64-linux-gnu
But I met the first problem as shown below:
The first problem is quite strange. I have set permanent environment variable for
nvcc
. But it cannot detect the correct compiler path. Neither did soft symlinks usingsudo ln -s
play the magic.Therefore, I manually set the required variables myself as below:
Then, I restart the
git clone
step and execute cmake commands. Thecmake
seems to complete:But I met the second problem when doing
make
:I don't understand why the compiler keeps unaware of the right directories for CUDA, Jansson, Msgpack etc... After passing the right directory, it still cannot recognize the path.
The following is part of my
.bashrc
:I made many tests but still get this error. Would you mind helping me with this issue?
Thank you very much!