Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error THC_LIBRARY notfound #2

Closed
ll36771 opened this issue Mar 14, 2016 · 14 comments
Closed

CMake Error THC_LIBRARY notfound #2

ll36771 opened this issue Mar 14, 2016 · 14 comments

Comments

@ll36771
Copy link

ll36771 commented Mar 14, 2016

There is an erro when i execute sh build_cpp.sh .THC_LIBRARY NOTFOUND?
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 /root/crnn/src/cpp

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

I would like to know what is thc_library?where could i get thc_library?

@ll36771
Copy link
Author

ll36771 commented Mar 14, 2016

@bgshih

@bgshih
Copy link
Owner

bgshih commented Mar 16, 2016

Is your Torch7 installation at ${HOME}/torch ? If not, you may need to change src/cpp/CMakeLists.txt manually.

@ll36771
Copy link
Author

ll36771 commented Mar 16, 2016

Thanks a lot.The problem have been solved.
When i train a new model,i encountered a new problem?
[03/16/16 16:16:46] Loading datasets...
[03/16/16 16:16:46] Start training...
/root/torch/install/bin/luajit: bad argument #3 to '?' (torch.*Tensor expected, got nil)
stack traceback:
[C]: at 0x7feef0dc9290
[C]: in function '__newindex'
./utilities.lua:33: in function 'str2label'
./DatasetLmdb.lua:81: in function 'allImageLabel'
./training.lua:84: in function 'trainModel'
main_train.lua:51: in main chunk
[C]: in function 'dofile'
/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
Oh,I don't use the cudnn!
@bgshih

@ll36771
Copy link
Author

ll36771 commented Mar 16, 2016

Is there anything wrong with my dataset or something else?

@bgshih
Copy link
Owner

bgshih commented Mar 17, 2016

The function receives a nil argument. I would suggest debugging it with fb.debugger.

@bgshih bgshih closed this as completed Mar 29, 2016
@wew2012
Copy link

wew2012 commented Jul 24, 2016

I met the same problem. Could you tell me how did you solve THC_LIBRARY NOTFOUND error?

@bgshih
Copy link
Owner

bgshih commented Jul 25, 2016

@wew2012 Did you install Torch7 in the home directory (by default it is)? Also, where is your libTHC.so? You can find it by locate libTHC.so.

@wew2012
Copy link

wew2012 commented Jul 25, 2016

@bgshih Yes, I install Torch7 in ${home}/torch. But there isn't a gpu in my computer. Does it matter?

@bgshih
Copy link
Owner

bgshih commented Jul 25, 2016

@wew2012 I haven't tested it under CPU-only environment. Maybe you can try removing the THC dependencies by removing https://github.com/bgshih/crnn/blob/master/src/cpp/CMakeLists.txt#L20-L21

@bgshih
Copy link
Owner

bgshih commented Jul 25, 2016

@wew2012 CRNN should be able to run on CPU, but some modifications are required. Currently, it won't run without a GPU.

@wew2012
Copy link

wew2012 commented Jul 25, 2016

@bgshih Actually, I tried to compile without THC. However, it didn't pass. Is any modifications needed besides the modifications of files in crnn/src/cpp? If not too much modifications needed, I want to have a try.

@bgshih
Copy link
Owner

bgshih commented Jul 25, 2016

@wew2012 It could require a non-trivial amount of work to make CRNN GPU-free. If you are going to try, I suggest starting from model/crnn_demo/config.lua, the cudnn should be replaced by nn. Then you might have to solve some other issues.

@wew2012
Copy link

wew2012 commented Jul 25, 2016

@bgshih All right, I think I'd better give up.

@PythonImageDeveloper
Copy link

PythonImageDeveloper commented Feb 9, 2018

Hi ll36771 , my system ubuntu 16.04
in this directory : cd crnn/src/ ,
when i use sh build_cpp.sh , i faced with this error :

mm@mm:~/TextBoxes_plusplus/crnn/src$ sh build_cpp.sh
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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:
LUAT_LIBRARY
linked by target "crnn" in directory /home/mm/TextBoxes_plusplus/crnn/src/cpp
THC_LIBRARY
linked by target "crnn" in directory /home/mm/TextBoxes_plusplus/crnn/src/cpp
THPP_LIBRARY
linked by target "crnn" in directory /home/mm/TextBoxes_plusplus/crnn/src/cpp
TH_LIBRARY
linked by target "crnn" in directory /home/mm/TextBoxes_plusplus/crnn/src/cpp

-- Configuring incomplete, errors occurred!
See also "/home/mm/TextBoxes_plusplus/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

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

No branches or pull requests

4 participants