hiili / WindowsTorch

Windows binary build of the Torch machine learning framework
63 stars 23 forks source link

How to install rocks by luarocks #5

Open YiyanYang0728 opened 4 years ago

YiyanYang0728 commented 4 years ago

Dear Sir,

Hello! Thank you for your great work helping me installing Torch on Windows. I have installed it in C:\torch. But when I tried to intall cutorch using "luarocks intall cutorch", it failed, like below (I have intalled cmake.exe on my computer, but I could see it's still a cmake problem...) : " C:\torch\bin>luarocks install cutorch Installing https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... Using https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... switching to 'build' mode Cloning into 'cutorch'... remote: Enumerating objects: 229, done. remote: Counting objects: 100% (229/229), done. remote: Compressing objects: 100% (184/184), done. Receiving objects: 100% (229/229), 172.00 KiB | 3), pack-reused 0 eceiving objects: 99% (227/229), 172.00 KiB | 237.00 KiB/s Receiving objects: 100% (229/229), 241.83 KiB | 211.00 KiB/s, done. Resolving deltas: 100% (62/62), done. cmake -E make_directory build && cd build && cmake .. -DLUALIB=libluajit.lib -DLUA_INCDIR=C:/torch/include -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="C:/torch/bin/.." -DCMAKE_INSTALL_PREFIX="C:/torch/luarocks/cutorch/scm-1" && nmake install

C:\Users\LUCAST~1\AppData\Local\Temp\luarocks_cutorch-scm-1-7706\cutorch>if -E == -E (cmake.exe -E make_directory build ) else (cmake.exe -G "NMake Makefiles" -DCMAKE_LINK_FLAGS:implib=libluajit.lib -DLUALIB=libluajit -E make_directory build )

C:\Users\LUCAST~1\AppData\Local\Temp\luarocks_cutorch-scm-1-7706\cutorch\build>if .. == -E (cmake.exe .. -DLUALIB=libluajit.lib -DLUA_INCDIR=C:/torch/include -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="C:/torch/bin/.." -DCMAKE_INSTALL_PREFIX="C:/torch/luarocks/cutorch/scm-1" ) else (cmake.exe -G "NMake Makefiles" -DCMAKE_LINK_FLAGS:implib=libluajit.lib -DLUALIB=libluajit .. -DLUALIB=libluajit.lib -DLUA_INCDIR=C:/torch/include -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="C:/torch/bin/.." -DCMAKE_INSTALL_PREFIX="C:/torch/luarocks/cutorch/scm-1" ) CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it.

-- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error in CMakeLists.txt: The CMAKE_C_COMPILER:

cl

is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat).

Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error in CMakeLists.txt: The CMAKE_CXX_COMPILER:

cl

is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat).

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "C:/Users/LucasTsubasaYang/AppData/Local/Temp/luarocks_cutorch-scm-1-7706/cutorch/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/LucasTsubasaYang/AppData/Local/Temp/luarocks_cutorch-scm-1-7706/cutorch/build/CMakeFiles/CMakeError.log".

Error: Build error: Failed building. " Looking forward to hearing from you.

Thank you.

yulilicao commented 2 years ago

Have you solved it? I have encountered the same problem, if it is solved, can you tell me what to do?