hughperkins / cltorch

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

Mac OS X El Capitan: No LIBRARY DESTINATION for shared library target "THCl". #54

Closed pandemonica closed 8 years ago

pandemonica commented 8 years ago

I cannot make luarocks install cltorch work so I am building from source. First problem is with cmake, see below.

Another problem is that THClGeneral.h is missing a typedef unsigned int uint; in a critical place and I can fix that but then I can't compile, mostly because I'm not familiar with cmake.

Repeat-by:

git clone https://github.com/hughperkins/cltorch.git Cloning into 'cltorch'... remote: Counting objects: 4158, done. remote: Compressing objects: 100% (50/50), done. remote: Total 4158 (delta 29), reused 0 (delta 0), pack-reused 4106 Receiving objects: 100% (4158/4158), 910.20 KiB | 1.28 MiB/s, done. Resolving deltas: 100% (2830/2830), done. Checking connectivity... done. 1158 m$ws cd cltorch/ 1159 m$cltorch l total 72 drwxr-xr-x 62 monica staff 2108 Mar 2 21:19 ../ drwxr-xr-x 23 monica staff 782 Mar 2 21:19 src/ drwxr-xr-x 3 monica staff 102 Mar 2 21:19 rocks/ drwxr-xr-x 8 monica staff 272 Mar 2 21:19 doc/ -rw-r--r-- 1 monica staff 12903 Mar 2 21:19 README.md -rw-r--r-- 1 monica staff 2000 Mar 2 21:19 LICENSE -rw-r--r-- 1 monica staff 4056 Mar 2 21:19 CMakeLists.txt -rw-r--r-- 1 monica staff 2208 Mar 2 21:19 .travis.yml -rw-r--r-- 1 monica staff 214 Mar 2 21:19 .gitmodules -rw-r--r-- 1 monica staff 381 Mar 2 21:19 .gitignore drwxr-xr-x 13 monica staff 442 Mar 2 21:19 .git/ drwxr-xr-x 12 monica staff 408 Mar 2 21:19 ./ 1160 m$cltorch mkdir build 1161 m$cltorch cd build 1162 m$build which cmake /Applications/CMake.app/Contents/bin//cmake 1162.5 cmake --version cmake version 3.5.0-rc3 1163 m$build cmake ../src -- The C compiler identification is GNU 5.3.0 -- The CXX compiler identification is GNU 5.3.0 -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/local/bin/gcc-5 -- Check for working C compiler: /usr/local/bin/gcc-5 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/local/bin/g++-5 -- Check for working CXX compiler: /usr/local/bin/g++-5 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CLBLAS_INCLUDE_DIRS DEEPCL_LIBRARIES CMake Error at lib/CMakeLists.txt:62 (INSTALL): install TARGETS given no LIBRARY DESTINATION for shared library target "THCl".

CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred! See also "/Users/monica/ws/cltorch/build/CMakeFiles/CMakeOutput.log".

hughperkins commented 8 years ago

For the part about cmake_minimum_reuqired, addressed in f106093

hughperkins commented 8 years ago

I think you need ot build like this:

luarocks make rocks/cltorch-scm-1.rockspec