crnn icon indicating copy to clipboard operation
crnn copied to clipboard

make error

Open liuwenran opened this issue 7 years ago • 15 comments

/home/bbnc/text/crnn/src/cpp/ctc.cpp:153:73: error: invalid initialization of reference of type ‘const thpp::Tensor&’ from expression of type ‘thpp::TensorBase<double, thpp::Storage, thpp::Tensor >::Ptr {aka thpp::TensorPtr<thpp::Tensor >}’ const thpp::Tensor<T>& input = fblualib::luaGetTensorChecked<T>(L, 1); ^ make[2]: *** [CMakeFiles/crnn.dir/ctc.cpp.o] Error 1 make[1]: *** [CMakeFiles/crnn.dir/all] Error 2 make: *** [all] Error 2 cp: cannot stat ‘*.so’: No such file or directory

when I run ./build_cpp.sh , I meet this error, is there anyone know how to solve?

liuwenran avatar Nov 03 '16 15:11 liuwenran

Same here...can anyone help us

rremani avatar Dec 06 '16 10:12 rremani

see this https://github.com/bgshih/crnn/issues/1 @rremani

liuwenran avatar Dec 07 '16 01:12 liuwenran

Hi, Thanks for replying. I get this error: 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

rremani avatar Dec 07 '16 10:12 rremani

HI @liuwenran , Thanks for the issue link you provided. The main problem was with installing fblualib which was very irritating. The other problem was with creating build for crnn where the problem lies in the providing the right directory to find torch, it was also suggested by @bgshih too. locate command helped me find the installed fblualib files.

I have created a new docker file for crnn docker pull rremani/cuda_crnn_torch , can be helpful for anyone facing this error. They can use Thanks again!

rremani avatar Jan 20 '17 10:01 rremani

Hey @rremani how can i use your dockerfile it has no description. Is Everything installed in your dockerfile or do i need to manually install all the libraries (Thrift, folly, fblualib, thpp) in your docker image ? Thanks in Advance,

HidayatRahman avatar Sep 18 '17 10:09 HidayatRahman

Hi @Hidayat786, I have installed everything, you won't face any problem. You can also probably use official crnn docker mentioned by @bgshih.

rremani avatar Sep 18 '17 11:09 rremani

Thanks for reply @rremani the official CRNN docker doesn't contian these libraries. I can see a dockerfile in CRNN directory in which it manually installs the repositories. Anyhow how can i use your dockerfile just need to pull and it contains every thing right ?

HidayatRahman avatar Sep 18 '17 11:09 HidayatRahman

Also @rremani you got two versions docker pull rremani/cuda_crnn_torch_v2 and docker pull rremani/cuda_crnn_torch_v3 which one is the correct one ?

Thanks in Advance

HidayatRahman avatar Sep 18 '17 11:09 HidayatRahman

@rremani Thank you Soo much for providing a complete solution however i am getting error in running the demo.lua function CUDA driver version is insufficient for CUDA runtime version at /usr/local/torch/extra/cutorch/lib/THC/THCGeneral.c:108. Should i update the Cuda Version of My Computer ?

HidayatRahman avatar Sep 18 '17 14:09 HidayatRahman

@Hidayat786 you can pull rremani/cuda_crnn_torch(https://hub.docker.com/r/rremani/cuda_crnn_torch/) , I have made it public. It is the stable version as far as I remember. Regarding CUDA you need not require cuda on your system, it is installed in the docker container. On your system you need nvidia-driver. To run the docker container you need 'nvidia-docker' so it can communicate with the GPU of your system. exp command: 'nvidia-docker run -ti rremani/cuda_crnn_torch /bin/bash'

rremani avatar Sep 19 '17 06:09 rremani

@rremani Thank you So much for your help i have already downloaded your docker image and i am running them as you said there is no issue in the code and all the libraries are built. I am really thankful to you for your contribution of making the docker image public and also i would like to thanks @bgshih for making the repo public.

HidayatRahman avatar Sep 19 '17 06:09 HidayatRahman

@Hidayat786 Happy that it helps you in your work!

rremani avatar Sep 19 '17 07:09 rremani

@rremani did you test your docker image on Ubuntu 16.04?

AmirmasoudGhasemi avatar May 22 '18 18:05 AmirmasoudGhasemi

@AmirmasoudGhasemi I haven't tested it.

rremani avatar May 24 '18 10:05 rremani

@rremani Thanks a lot!

Shualite avatar Jul 11 '19 11:07 Shualite