hughperkins / cltorch

An OpenCL backend for torch.
Other
289 stars 26 forks source link

During install: fatal error: EasyCL.h: No such file or directory #4

Closed centime closed 9 years ago

centime commented 9 years ago

Hi, I installed torch according to this procedure : http://torch.ch/docs/getting-started.html Now I'm trying to install cltorch using:

 luarocks install cltorch

But it stops at this point:

Scanning dependencies of target cltorch_static
[  3%] Building CXX object CMakeFiles/cltorch_static.dir/init.cpp.o
Submodule path '../EasyCL': checked out 'a03261662d263f14ce8e8e6f4dce1f649b400bd0'
/tmp/luarocks_cltorch-scm-1-3377/cltorch/cltorch/init.cpp:3:20: fatal error: EasyCL.h: No such file or directory
compilation terminated.
CMakeFiles/cltorch_static.dir/build.make:59: recipe for target 'CMakeFiles/cltorch_static.dir/init.cpp.o' failed
make[2]: *** [CMakeFiles/cltorch_static.dir/init.cpp.o] Error 1
CMakeFiles/Makefile2:200: recipe for target 'CMakeFiles/cltorch_static.dir/all' failed
make[1]: *** [CMakeFiles/cltorch_static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Submodule path '../clMathLibraries/clBLAS': checked out 'bdaf1f9ef3d97168fdaff4c3ef588feeae72b171'
[  3%] Built target git_cltorch_rec
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.

Any idea where it could be coming from ?

Then I tried to install it from you repo with:

luarocks install https://raw.githubusercontent.com/hughperkins/cltorch/master/rocks/cltorch-scm-1.rockspec

And got this (not sure what git has to do with it, sorry):

-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/centime/torch/install
/tmp/luarocks_cltorch-scm-1-8854/cltorch/build
/tmp/luarocks_cltorch-scm-1-8854/cltorch
fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMAKE_INSTALL_PREFIX /home/centime/torch/install
CMake Error at /usr/share/cmake-3.2/Modules/ExternalProject.cmake:1850 (message):
  error: no download info for 'clBLAS-external' -- please specify
  existing/non-empty SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE,
  SVN_REPOSITORY, GIT_REPOSITORY, HG_REPOSITORY or DOWNLOAD_COMMAND
Call Stack (most recent call first):
  /usr/share/cmake-3.2/Modules/ExternalProject.cmake:2321 (_ep_add_download_command)
  CMakeModules/build_clBLAS.cmake:4 (ExternalProject_Add)
  CMakeLists.txt:32 (INCLUDE)

CMAKE_INSTALL_PREFIX /home/centime/torch/install
CMake Error at /usr/share/cmake-3.2/Modules/ExternalProject.cmake:1850 (message):
  error: no download info for 'EasyCL-external' -- please specify
  existing/non-empty SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE,
  SVN_REPOSITORY, GIT_REPOSITORY, HG_REPOSITORY or DOWNLOAD_COMMAND
Call Stack (most recent call first):
  /usr/share/cmake-3.2/Modules/ExternalProject.cmake:2321 (_ep_add_download_command)
  CMakeModules/build_EasyCL.cmake:4 (ExternalProject_Add)
  CMakeLists.txt:36 (INCLUDE)

CLBLAS_INCLUDE_DIRS /home/centime/torch/install/include
DEEPCL_LIBRARIES /home/centime/torch/install/lib/libEasyCL.so
git version 2.4.4
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_cltorch-scm-1-8854/cltorch/build/CMakeFiles/CMakeOutput.log".

Error: Build error: Failed building.

the file /tmp/luarocks_cltorch-scm-1-8854/cltorch/build/CMakeFiles/CMakeOutput.log does not exist, nor the directory /tmp/luarocks_cltorch-scm-1-8854.

Thank you.

hughperkins commented 9 years ago

Can you try the following please:

git clone --recursive https://github.com/hughperkins/cltorch.git
cl cltorch
luarocks make rocks/cltorch-scm-1.rockspec
centime commented 9 years ago

Thank you for your reaction. I'm sure you meant "cd" and not "cl", so that's what I did. I got the same result, but this time I'll put the full output:

$ luarocks make rocks/cltorch-scm-1.rockspec

cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="/home/centime/torch/install/bin/..    " -DCMAKE_INSTALL_PREFIX="/home/centime/torch/install/lib/luarocks/rocks/cltorch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN) install

-- The C compiler identification is GNU 5.1.0
-- The CXX compiler identification is GNU 5.1.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
-- Found Torch7 in /home/centime/torch/install
/home/centime/projets/arkham/cltorch/build
/home/centime/projets/arkham/cltorch
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Submodule path 'EasyCL': checked out 'a03261662d263f14ce8e8e6f4dce1f649b400bd0'
Submodule path 'clMathLibraries/clBLAS': checked out 'bdaf1f9ef3d97168fdaff4c3ef588feeae72b171'
CMAKE_INSTALL_PREFIX /home/centime/torch/install
CMAKE_INSTALL_PREFIX /home/centime/torch/install
CLBLAS_INCLUDE_DIRS /home/centime/torch/install/include
DEEPCL_LIBRARIES /home/centime/torch/install/lib/libEasyCL.so
git version 2.4.4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/centime/projets/arkham/cltorch/build
Scanning dependencies of target easycl_delete_stamp
Scanning dependencies of target git_cltorch_rec
[  0%] Built target easycl_delete_stamp
[  1%] Generating TensorMath.c
default 
default 
default 
default 
default 
default 
default 
default 
default 
default 
Scanning dependencies of target cltorch_static
[  3%] Building CXX object CMakeFiles/cltorch_static.dir/init.cpp.o
Submodule path '../EasyCL': checked out 'a03261662d263f14ce8e8e6f4dce1f649b400bd0'
/home/centime/projets/arkham/cltorch/init.cpp:3:20: fatal error: EasyCL.h: No such file or directory
compilation terminated.
CMakeFiles/cltorch_static.dir/build.make:59: recipe for target 'CMakeFiles/cltorch_static.dir/init.cpp.o' failed
make[2]: *** [CMakeFiles/cltorch_static.dir/init.cpp.o] Error 1
CMakeFiles/Makefile2:200: recipe for target 'CMakeFiles/cltorch_static.dir/all' failed
make[1]: *** [CMakeFiles/cltorch_static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Submodule path '../clMathLibraries/clBLAS': checked out 'bdaf1f9ef3d97168fdaff4c3ef588feeae72b171'
[  3%] Built target git_cltorch_rec
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
hughperkins commented 9 years ago

Try now?

centime commented 9 years ago

It passed the 3% cap !

But then, it failed a little later. The makefile :/

$ luarocks make rocks/cltorch-scm-1.rockspec
[....]
[ 26%] Performing install step for 'EasyCL-external'
[  2%] Built target CLEW
[ 11%] Built target gpuinfo
[100%] Built target EasyCL
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Up-to-date: /home/centime/torch/install/lib/libEasyCL.so
-- Up-to-date: /home/centime/torch/install/include/easycl
-- Up-to-date: /home/centime/torch/install/include/easycl/CLKernel.h
-- Up-to-date: /home/centime/torch/install/include/easycl/deviceinfo_helper.h
-- Up-to-date: /home/centime/torch/install/include/easycl/EasyCL.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLKernel_structs.h
-- Up-to-date: /home/centime/torch/install/include/easycl/deprecated.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLWrapper.h
-- Up-to-date: /home/centime/torch/install/include/easycl/clew.h
-- Up-to-date: /home/centime/torch/install/include/easycl/EasyCL_export.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLFloatWrapperConst.h
-- Up-to-date: /home/centime/torch/install/include/easycl/platforminfo_helper.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLIntWrapper.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLArrayInt.h
-- Up-to-date: /home/centime/torch/install/include/easycl/DeviceInfo.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLFloatWrapper.h
-- Up-to-date: /home/centime/torch/install/include/easycl/templates
-- Up-to-date: /home/centime/torch/install/include/easycl/templates/LuaTemplater.h
-- Up-to-date: /home/centime/torch/install/include/easycl/templates/TemplatedKernel.h
-- Up-to-date: /home/centime/torch/install/include/easycl/ICLArray.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLUCharWrapper.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/cogapp
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/cogapp/cogapp
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/cogapp/cogapp/__pycache__
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lmem.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lua.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lfunc.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lundump.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lopcodes.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lstring.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/ltable.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lapi.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lobject.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/llex.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/ldo.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/llimits.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/ltm.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lvm.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/ldebug.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lstate.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lzio.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lparser.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lualib.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lcode.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lauxlib.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/lgc.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/lua-5.1.5/src/luaconf.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/gtest
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/gtest/gtest
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/gtest/gtest/gtest.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/clew
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/clew/src
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/clew/include
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/clew/include/clew.h
-- Up-to-date: /home/centime/torch/install/include/easycl/thirdparty/clew/clewTest
-- Up-to-date: /home/centime/torch/install/include/easycl/util
-- Up-to-date: /home/centime/torch/install/include/easycl/util/StatefulTimer.h
-- Up-to-date: /home/centime/torch/install/include/easycl/util/easycl_stringhelper.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLArrayFloat.h
-- Up-to-date: /home/centime/torch/install/include/easycl/DevicesInfo.h
-- Up-to-date: /home/centime/torch/install/include/easycl/CLArray.h
[ 28%] Completed 'EasyCL-external'
[ 28%] Built target EasyCL-external
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
hughperkins commented 9 years ago

Can you do the following commands please?

git pull
git log -n 3 --oneline
git submodule update
rm -Rf build
luarocks make rocks/cltorch-scm-1.rockspec
hughperkins commented 9 years ago

(Hmmmm, edited to add rm -Rf build)

hughperkins commented 9 years ago

If it fails, please paste teh entire log file, from start to finish, including the output from the commands above.

centime commented 9 years ago

It failed, but I noticed it was looking for a fortran compiler... So I installed gcc-fortran. Then I cloned the repo again, and did a fresh make.I don't know if it was the fortran, your last update, or both, but it finally worked !

I hope I didn't bother you just because I overlooked this.. Anyway, thank you very much !

hughperkins commented 9 years ago

Ah cool :-)

I hope I didn't bother you just because I overlooked this.

No, I reproduced the issue earlier, before the 'Try now?' message. The headerfiles were being looked for in the install location, but hadnt been installed yet. I modified the install to look for them direclty in the sourcecode instead, which seems to work better :-)