crnn icon indicating copy to clipboard operation
crnn copied to clipboard

THC_LIBRARY not found

Open wew2012 opened this issue 7 years ago • 5 comments

My Torch7 installation is at ${HOME}/torch. After I install the fblualib , I try to make crnn. But the following mistake occurs. I have no idea what is THC_LIBRARY. Can anyone help me?

mkdir: cannot create directory ‘build’: File exists CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: THC_LIBRARY linked by target "crnn" in directory /home/fd/Worspace/crnn/src/cpp

-- Configuring incomplete, errors occurred! See also "/home/fd/Worspace/crnn/src/cpp/build/CMakeFiles/CMakeOutput.log". make: *** No targets specified and no makefile found. Stop. cp: cannot stat '*.so': No such file or directory

Then, I go to crnn/src/cpp/build floder, and execute cmake ...

-- The C compiler identification is GNU 5.3.1 -- The CXX compiler identification is GNU 5.3.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/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: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Try OpenMP C flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success -- Try OpenMP CXX flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success -- Found OpenMP: -fopenmp
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: THC_LIBRARY linked by target "crnn" in directory /home/fd/Worspace/crnn/src/cpp

-- Configuring incomplete, errors occurred! See also "/home/fd/Worspace/crnn/src/cpp/build/CMakeFiles/CMakeOutput.log".

wew2012 avatar Jul 24 '16 02:07 wew2012

@wew2012 Do you solve this problem? I meet the same errors.

qiuxin2012 avatar Aug 25 '16 15:08 qiuxin2012

see this

mineshmathew avatar Sep 29 '16 12:09 mineshmathew

@qiuxin2012 No. I think THC_LIBRARY is a library about cuda. However, there is no gpu or cuda on my computer. Then, it is very hard to solve this problem on my computer.

wew2012 avatar Sep 29 '16 12:09 wew2012

same problem

qnkhuat avatar Feb 03 '18 15:02 qnkhuat

edit the cpp/CMakeLists.txt to disable THC_LIBRARY

#FIND_LIBRARY(THC_LIBRARY THC

PATHS ${SEARCH_PATHS})

SET(EXT_LIBRARIES ${THPP_LIBRARY} ${LUAT_LIBRARY} ${TH_LIBRARY}) # ${THC_LIBRARY}) SET(EXT_INCLUDE_DIRS "${TORCH_ROOT}/include" "${TORCH_ROOT}/include/TH")

Then you will be fine.

wjtan99 avatar May 01 '18 16:05 wjtan99