2014-12-03 1 views
8

나는 here 지침을 따르고 Mua와 함께 처음부터 Lua 및 Luarocks를 설정합니다. 모든 것이 잘 작동했고 LuaSocket처럼 컴파일해야하는 것을 포함하여 암석을 설치할 수있었습니다.mingw 빌드 오류가있는 Windows에서 Luarocks와 함께 Torch7 설치

나는 Torch7 페이지의 지침에 따라 lourocks를 통해 Torch를 설치했습니다. 그러나 그것은 건물에 실패합니다. 나는 왜 그런지 이해하지 못한다.

다음은 콘솔 출력입니다. 내 최고의 추측은 그것이 내가 Mingw을 사용하기를 원한다고 생각할 때 Building for: Visual Studio 9 2008과 관련이 있다는 것입니다.

PS C:\WINDOWS\system32> luarocks --server=https://raw.githubusercontent.com/torch/rocks/master install torch 
Installing https://raw.githubusercontent.com/torch/rocks/master/torch-scm-1.rockspec... 
Using https://raw.githubusercontent.com/torch/rocks/master/torch-scm-1.rockspec... switching to 'build' mode 

Missing dependencies for torch: 
paths >= 1.0 
cwrap >= 1.0 

Using https://raw.githubusercontent.com/torch/rocks/master/paths-scm-1.rockspec... switching to 'build' mode 
Cloning into 'paths'... 
remote: Counting objects: 10, done. 
remote: Compressing objects: 100% (9/9), done. 
remote: Total 10 (delta 0), reused 6 (delta 0)R 
Receiving objects: 100% (10/10), 12.24 KiB | 0 bytes/s, done. 
Checking connectivity... done. 
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUALIB=lua51.dll -DLUA_INCDIR="C:/Pro 
gram Files (x86)/Lua/5.1/include/" -DLUA_LIBDIR="C:/Program Files (x86)/Lua/5.1/" -DLUADIR="C:\Program Files (x86)\LuaRo 
cks\systree/lib/luarocks/rocks/paths/scm-1/lua" -DLIBDIR="C:\Program Files (x86)\LuaRocks\systree/lib/luarocks/rocks/pat 
hs/scm-1/lib" -DCMAKE_INSTALL_PREFIX="C:\Program Files (x86)\LuaRocks\systree/lib/luarocks/rocks/paths/scm-1" && mingw32 
-make 

-- Building for: Visual Studio 9 2008 
-- The C compiler identification is MSVC 15.0.30729.1 
-- The CXX compiler identification is MSVC 15.0.30729.1 
-- Check for working C compiler using: Visual Studio 9 2008 
-- Check for working C compiler using: Visual Studio 9 2008 -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Check for working CXX compiler using: Visual Studio 9 2008 
-- Check for working CXX compiler using: Visual Studio 9 2008 -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
-- Configuring done 
-- Generating done 
CMake Warning: 
    Manually-specified variables were not used by the project: 

    CMAKE_BUILD_TYPE 


-- Build files have been written to: C:/Users/Daniel/AppData/Local/Temp/luarocks_paths-scm-1-1059/paths/build 
mingw32-make: *** No targets specified and no makefile found. Stop. 

Error: Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/paths-scm-1.rockspec - Build e 
rror: Failed building. 
+0

아직도이 답변을 찾고 있지만 일부 관련 정보는이 답변에서 찾을 수 있습니다. http://stackoverflow.com/a/28058692/2698948 – Houshalter

답변

4

명령은 대부분 올바른 보이지만, 나는 cmake 명령이 VS. 대신에와 Mingw를 사용하는 -G "MSYS Makefiles" 옵션이 필요하다고 생각 또한 최신 토치 버전을 가져올 필요가 있습니다 (several changes 포함). mingw와 관련된 일부 컴파일 문제를 해결합니다.

LuaRocks의 변경 사항을 테스트하지 않았고 추가 옵션을 전달하는 방법을 모르지만 원하는 명령을 수동으로 실행하여 원하는 결과를 얻을 수 있어야합니다 (명령에서 컴파일 됨). 선).

1

cmake 비주얼 스튜디오 9 2008를 사용하는 것처럼 보이지만 그것은 "잘못"mingw32-make.exe 대신에 아마의 ... NMAKE.EXE를 사용합니다. luarocks 명령을 실행하기 전에 동일한 콘솔에서 "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" (Visual Studio 경로에 맞게 조정) 명령을 실행할 수 있습니다. 자, cmakenmake을 사용해야합니다.