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

Make error #31

Closed
rremani opened this issue Dec 6, 2016 · 7 comments
Closed

Make error #31

rremani opened this issue Dec 6, 2016 · 7 comments

Comments

@rremani
Copy link

rremani commented Dec 6, 2016

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:
THPP_LIBRARY
linked by target "crnn" in directory /home/ce/Documents/crnn/src/cpp

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

@zimenglan-sysu-512
Copy link

@rremani have you solved this problem?

@rremani
Copy link
Author

rremani commented Dec 8, 2016

No , I am stuck at that very point.

@rremani
Copy link
Author

rremani commented Dec 8, 2016

In a detailed way,
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:
THPP_LIBRARY
linked by target "crnn" in directory /home/ce/Documents/crnn/src/cpp

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

First I installed torch7 from the site then installed fblualib from the commits given in the issue #1 that you posted.
My torch is installed in Home directory (/home/ce/torch) and fblualib(/tmp/fblualib-build.YTz6tN)in temp pasting both the paths, I feel I need to change the Cmakellists.txt of crnn.

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)

PROJECT(crnn)

FIND_PACKAGE(OpenMP)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${OpenMP_CXX_FLAGS} -Wall")

Change this line if your Torch7 is installed elsewhere

SET(TORCH_ROOT "$ENV{HOME}/torch/install")

SET(SEARCH_PATHS
"/usr/local/lib"
"${TORCH_ROOT}/lib")

dependencies

FIND_LIBRARY(THPP_LIBRARY thpp
PATHS ${SEARCH_PATHS})
FIND_LIBRARY(LUAT_LIBRARY luaT
PATHS ${SEARCH_PATHS})
FIND_LIBRARY(TH_LIBRARY TH
PATHS ${SEARCH_PATHS})
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")

INCLUDE_DIRECTORIES(${EXT_INCLUDE_DIRS})
ADD_LIBRARY(crnn SHARED init.cpp ctc.cpp)
TARGET_LINK_LIBRARIES(crnn ${EXT_LIBRARIES})

Do I need to change the path for Torch and where it is searching the libraries for the below lines.
SET(TORCH_ROOT "$ENV{HOME}/torch/install")
SET(SEARCH_PATHS
"/usr/local/lib"
"${TORCH_ROOT}/lib")

Thanks

@LavieC
Copy link

LavieC commented Jan 4, 2017

I have met some thing similar, like:

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/CRNN/crnn/src/cpp
THC_LIBRARY
    linked by target "crnn" in directory /home/CRNN/crnn/src/cpp
TH_LIBRARY
    linked by target "crnn" in directory /home/CRNN/crnn/src/cpp

Tried locating those library manually. I found that my THPP_LIB is actually in somewhere else rather than ../torchroot/lib,then I changed those search path from

SET(SEARCH_PATHS "${TORCH_ROOT}/lib")
FIND_LIBRARY(THPP_LIBRARY thpp
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(LUAT_LIBRARY luaT
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(TH_LIBRARY TH
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(THC_LIBRARY THC
  PATHS ${SEARCH_PATHS})

to

SET(SEARCH_PATHS "${TORCH_ROOT}/lib")
FIND_LIBRARY(THPP_LIBRARY thpp
  PATHS "usr/local/lib")
FIND_LIBRARY(LUAT_LIBRARY luaT
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(TH_LIBRARY TH
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(THC_LIBRARY THC
  PATHS ${SEARCH_PATHS})

And it all works !
P.S. I ran those in this docker image bethgelab/jupyter-torch.
Wish it helps~

@rremani
Copy link
Author

rremani commented Jan 20, 2017

Thanks @LavieC Lav , I finally was able to run the demo. The major problem was with the successful installation of fblualib which really irritated me. Now, I have created a docker file built on the docker file you provided me docker pull rremani/cuda_crnn_torch .
Thanks again!

@rremani rremani closed this as completed Jan 20, 2017
@qnkhuat
Copy link

qnkhuat commented Feb 6, 2018

@rremani can u help me install thpp ? I'm running ubuntu 16.04

@rremani
Copy link
Author

rremani commented Feb 6, 2018

@qnkhuat I can try to help you but it takes lot of time to figure out what the error is actually about. I would suggest you to use docker image rremani/cuda_crnn_torch which has everything installed.
Happy Learning!

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