Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

CMake error while running install.sh #205

Open
OrkunYilmaz opened this issue Nov 4, 2018 · 7 comments
Open

CMake error while running install.sh #205

OrkunYilmaz opened this issue Nov 4, 2018 · 7 comments

Comments

@OrkunYilmaz
Copy link

So when I am running install.sh I am getting this error:

-- Performing Test HAS_LUAL_SETFUNCS - Failed
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:
CUDA_cublas_device_LIBRARY (ADVANCED)
linked by target "THC" in directory /home/orkun/torch/extra/cutorch/lib/THC

-- Configuring incomplete, errors occurred!
See also "/home/orkun/torch/extra/cutorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/orkun/torch/extra/cutorch/build/CMakeFiles/CMakeError.log".

Error: Build error: Failed building.

How can I solve this issue?

Thanks in advance

@matthewclark4
Copy link

have encountered same issue if anyone can help?

@digitician
Copy link

Same here.

Ubuntu 18.10
nvidia-driver-410
cuda-10-0

Building on 16 cores
-- Found Torch7 in /home/user/projects/torch/install
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found. Compiling without MAGMA support
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;6.1+PTX
-- got cuda version 10.0
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_61,code=compute_61;-DCUDA_HAS_FP16=1
-- THC_SO_VERSION: 0
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:
CUDA_cublas_device_LIBRARY (ADVANCED)
    linked by target "THC" in directory /home/user/projects/torch/extra/cutorch/lib/THC

-- Configuring incomplete, errors occurred!

CMakeError.log:

Change Dir: /home/user/projects/torch/extra/cutorch/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f6acd/fast"
/usr/bin/make -f CMakeFiles/cmTC_f6acd.dir/build.make CMakeFiles/cmTC_f6acd.dir/build
make[1]: Entering directory '/home/user/projects/torch/extra/cutorch/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f6acd.dir/src.c.o
/usr/bin/cc  -I/home/user/projects/torch/install/include  -std=c99 -Werror=implicit-function-declaration  -DHAS_LUAL_SETFUNCS   -o CMakeFiles/cmTC_f6acd.dir/src.c.o   -c /home/user/projects/torch/extra/cutorch/build/CMakeFiles/CMakeTmp/src.c
/home/user/projects/torch/extra/cutorch/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/home/user/projects/torch/extra/cutorch/build/CMakeFiles/CMakeTmp/src.c:5:20: error: ‘luaL_setfuncs’ undeclared (first use in this function); did you mean ‘lua_setfenv’?
   long i = sizeof(&luaL_setfuncs);
                    ^~~~~~~~~~~~~
                    lua_setfenv
/home/user/projects/torch/extra/cutorch/build/CMakeFiles/CMakeTmp/src.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_f6acd.dir/build.make:66: CMakeFiles/cmTC_f6acd.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/user/projects/torch/extra/cutorch/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_f6acd/fast] Error 2

Source file was:

#include <lauxlib.h>
int main()
{
  long i = sizeof(&luaL_setfuncs);
  return 0;
}

@walkerp07
Copy link

Same here:
-- Performing Test HAS_LUAL_SETFUNCS - Failed
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:
CUDA_cublas_device_LIBRARY (ADVANCED)
linked by target "THC" in directory /home/darkstar/torch/extra/cutorch/lib/THC

-- Configuring incomplete, errors occurred!
See also "/home/darkstar/torch/extra/cutorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/darkstar/torch/extra/cutorch/build/CMakeFiles/CMakeError.log".

@vishnurangarajan
Copy link

I am facing the same issue. I am using Cuda 10.0 and when trying to build torch I get this issue. Has anyone solved it ?

@nykabhishek
Copy link

I'm facing the same issue. Any solutions or workarounds?

@nykabhishek
Copy link

nykabhishek commented Mar 14, 2019

@digitician @walkerp07 @vishnurangarajan Apparently torch doesn't build on Cuda 10.0. I tried building it on Ubuntu 16.04, Cuda 9.1 and didn't face any issues. The below thread was helpful.
http://forum.opennmt.net/t/install-torch-7-with-cuda-9-1/1216/15

@granthoff1107
Copy link

Theres a resolution for this here: https://github.com/nagadomi/distro.git

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants