のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

"torch"を"windows 10"の "visual studio 2017"でビルドしてみる(その1)

git clone https://github.com/torch/luajit-rocks.git
cd luajit-rocks
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=X:/torch/install -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
nmake
cmake -DCMAKE_INSTALL_PREFIX=X:/torch/install -G "NMake Makefiles" -P cmake_install.cmake -DCMAKE_BUILD_TYPE=Release


ここまでの、build log

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.8.6
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\>cd tools
C:\tools>ls
C:\tools>git clone https://github.com/torch/luajit-rocks.git
Cloning into 'luajit-rocks'...
remote: Enumerating objects: 2737, done.
remote: Total 2737 (delta 0), reused 0 (delta 0), pack-reused 2737
Receiving objects: 100% (2737/2737), 7.53 MiB | 2.06 MiB/s, done.
Resolving deltas: 100% (1759/1759), done.

C:\tools>cd luajit-rocks
C:\tools\luajit-rocks>mkdir build
C:\tools\luajit-rocks>cd build
C:\tools\luajit-rocks\build>cmake
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.


C:\tools\luajit-rocks\build>cmake .. -DCMAKE_INSTALL_PREFIX=C:/torch/install -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is MSVC 19.15.26730.0
-- The CXX compiler identification is MSVC 19.15.26730.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Looking for sin in m
-- Looking for sin in m - not found
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Performing Test LJ_TARGET_X64
-- Performing Test LJ_TARGET_X64 - Success
-- LuaJIT Target: x64
-- Performing Test LJ_ARCH_BITS_64
-- Performing Test LJ_ARCH_BITS_64 - Success
-- Performing Test LJ_HASJIT_1
-- Performing Test LJ_HASJIT_1 - Success
-- Performing Test LJ_HASFFI_1
-- Performing Test LJ_HASFFI_1 - Success
-- Performing Test LJ_DUALNUM_1
-- Performing Test LJ_DUALNUM_1 - Failed
-- Performing Test LJ_ARCH_HASFPU_1
-- Performing Test LJ_ARCH_HASFPU_1 - Success
-- Performing Test LJ_ABI_SOFTFP_1
-- Performing Test LJ_ABI_SOFTFP_1 - Failed
-- Performing Test LJ_NO_UNWIND_1
-- Performing Test LJ_NO_UNWIND_1 - Failed
-- Looking for sin in m
-- Looking for sin in m - not found
-- Configuring done
-- Generating done
-- Build files have been written to: C:/tools/luajit-rocks/build
C:\tools\luajit-rocks\build>nmake

Microsoft(R) Program Maintenance Utility Version 14.15.26730.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Scanning dependencies of target minilua
[  5%] Building C object luajit-2.0/CMakeFiles/minilua.dir/src/host/minilua.c.obj
minilua.c
[ 10%] Linking C executable minilua.exe
[ 10%] Built target minilua
[ 15%] Generating buildvm_arch.h
Scanning dependencies of target buildvm
[ 20%] Building C object luajit-2.0/CMakeFiles/buildvm.dir/src/host/buildvm.c.obj
buildvm.c
[ 25%] Building C object luajit-2.0/CMakeFiles/buildvm.dir/src/host/buildvm_asm.c.obj
buildvm_asm.c
[ 30%] Building C object luajit-2.0/CMakeFiles/buildvm.dir/src/host/buildvm_peobj.c.obj
buildvm_peobj.c
[ 35%] Building C object luajit-2.0/CMakeFiles/buildvm.dir/src/host/buildvm_lib.c.obj
buildvm_lib.c
[ 40%] Building C object luajit-2.0/CMakeFiles/buildvm.dir/src/host/buildvm_fold.c.obj
buildvm_fold.c
[ 45%] Linking C executable buildvm.exe
[ 45%] Built target buildvm
[ 50%] Generating lj_vm.obj
[ 55%] Generating lj_ffdef.h
[ 60%] Generating lj_bcdef.h
[ 65%] Generating lj_libdef.h
[ 70%] Generating lj_recdef.h
[ 75%] Generating lj_folddef.h
[ 80%] Generating vmdef.lua
Scanning dependencies of target libluajit
[ 85%] Building C object luajit-2.0/CMakeFiles/libluajit.dir/src/ljamalg.c.obj
ljamalg.c
[ 90%] Linking C shared library libluajit.dll
   ライブラリ libluajit.lib とオブジェクト libluajit.exp を作成中
[ 90%] Built target libluajit
Scanning dependencies of target luajit
[ 95%] Building C object luajit-2.0/CMakeFiles/luajit.dir/src/luajit.c.obj
luajit.c
[100%] Linking C executable luajit.exe
[100%] Built target luajit
C:\tools\luajit-rocks\build>cmake -DCMAKE_INSTALL_PREFIX=C:/torch/install -G "NMake Makefiles" -P cmake_install.cmake -DCMAKE_BUILD_TYPE=Release
-- Install configuration: "Release"
-- Installing: C:/torch/install/include/luaconf.h
-- Installing: C:/torch/install/include/lua.h
-- Installing: C:/torch/install/include/lauxlib.h
-- Installing: C:/torch/install/include/lualib.h
-- Installing: C:/torch/install/include/lua.hpp
-- Installing: C:/torch/install/include/luajit.h
-- Installing: C:/torch/install/./libluajit.lib
-- Installing: C:/torch/install/./libluajit.dll
-- Installing: C:/torch/install/./luajit.exe
-- Installing: C:/torch/install/lua/jit/bc.lua
-- Installing: C:/torch/install/lua/jit/v.lua
-- Installing: C:/torch/install/lua/jit/dump.lua
-- Installing: C:/torch/install/lua/jit/dis_x86.lua
-- Installing: C:/torch/install/lua/jit/dis_x64.lua
-- Installing: C:/torch/install/lua/jit/dis_arm.lua
-- Installing: C:/torch/install/lua/jit/dis_ppc.lua
-- Installing: C:/torch/install/lua/jit/dis_mips.lua
-- Installing: C:/torch/install/lua/jit/dis_mipsel.lua
-- Installing: C:/torch/install/lua/jit/bcsave.lua
-- Installing: C:/torch/install/lua/jit/vmdef.lua
-- Installing: C:/torch/install/./tools/7z.dll
-- Installing: C:/torch/install/./tools/libeay32.dll
-- Installing: C:/torch/install/./tools/libiconv2.dll
-- Installing: C:/torch/install/./tools/libintl3.dll
-- Installing: C:/torch/install/./tools/libssl32.dll
-- Installing: C:/torch/install/./tools/7z.exe
-- Installing: C:/torch/install/./tools/cp.exe
-- Installing: C:/torch/install/./tools/find.exe
-- Installing: C:/torch/install/./tools/ls.exe
-- Installing: C:/torch/install/./tools/md5sum.exe
-- Installing: C:/torch/install/./tools/mkdir.exe
-- Installing: C:/torch/install/./tools/mv.exe
-- Installing: C:/torch/install/./tools/pwd.exe
-- Installing: C:/torch/install/./tools/rmdir.exe
-- Installing: C:/torch/install/./tools/test.exe
-- Installing: C:/torch/install/./tools/uname.exe
-- Installing: C:/torch/install/./tools/wget.exe
-- Installing: C:/torch/install/lua/luarocks/add.lua
-- Installing: C:/torch/install/lua/luarocks/admin_remove.lua
-- Installing: C:/torch/install/lua/luarocks/build.lua
-- Installing: C:/torch/install/lua/luarocks/build/builtin.lua
-- Installing: C:/torch/install/lua/luarocks/build/cmake.lua
-- Installing: C:/torch/install/lua/luarocks/build/command.lua
-- Installing: C:/torch/install/lua/luarocks/build/make.lua
-- Installing: C:/torch/install/lua/luarocks/cache.lua
-- Installing: C:/torch/install/lua/luarocks/cfg.lua
-- Installing: C:/torch/install/lua/luarocks/command_line.lua
-- Installing: C:/torch/install/lua/luarocks/config_cmd.lua
-- Installing: C:/torch/install/lua/luarocks/deps.lua
-- Installing: C:/torch/install/lua/luarocks/dir.lua
-- Installing: C:/torch/install/lua/luarocks/doc.lua
-- Installing: C:/torch/install/lua/luarocks/download.lua
-- Installing: C:/torch/install/lua/luarocks/fetch.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/cvs.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/git.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/git_file.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/git_http.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/git_https.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/hg.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/hg_http.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/hg_https.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/hg_ssh.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/sscm.lua
-- Installing: C:/torch/install/lua/luarocks/fetch/svn.lua
-- Installing: C:/torch/install/lua/luarocks/fs.lua
-- Installing: C:/torch/install/lua/luarocks/fs/lua.lua
-- Installing: C:/torch/install/lua/luarocks/fs/unix.lua
-- Installing: C:/torch/install/lua/luarocks/fs/unix/tools.lua
-- Installing: C:/torch/install/lua/luarocks/fs/win32.lua
-- Installing: C:/torch/install/lua/luarocks/fs/win32/tools.lua
-- Installing: C:/torch/install/lua/luarocks/help.lua
-- Installing: C:/torch/install/lua/luarocks/index.lua
-- Installing: C:/torch/install/lua/luarocks/install.lua
-- Installing: C:/torch/install/lua/luarocks/lint.lua
-- Installing: C:/torch/install/lua/luarocks/list.lua
-- Installing: C:/torch/install/lua/luarocks/loader.lua
-- Installing: C:/torch/install/lua/luarocks/make.lua
-- Installing: C:/torch/install/lua/luarocks/make_manifest.lua
-- Installing: C:/torch/install/lua/luarocks/manif.lua
-- Installing: C:/torch/install/lua/luarocks/manif_core.lua
-- Installing: C:/torch/install/lua/luarocks/new_version.lua
-- Installing: C:/torch/install/lua/luarocks/pack.lua
-- Installing: C:/torch/install/lua/luarocks/path.lua
-- Installing: C:/torch/install/lua/luarocks/path_cmd.lua
-- Installing: C:/torch/install/lua/luarocks/persist.lua
-- Installing: C:/torch/install/lua/luarocks/purge.lua
-- Installing: C:/torch/install/lua/luarocks/refresh_cache.lua
-- Installing: C:/torch/install/lua/luarocks/remove.lua
-- Installing: C:/torch/install/lua/luarocks/repos.lua
-- Installing: C:/torch/install/lua/luarocks/require.lua
-- Installing: C:/torch/install/lua/luarocks/search.lua
-- Installing: C:/torch/install/lua/luarocks/show.lua
-- Installing: C:/torch/install/lua/luarocks/tools/patch.lua
-- Installing: C:/torch/install/lua/luarocks/tools/tar.lua
-- Installing: C:/torch/install/lua/luarocks/tools/zip.lua
-- Installing: C:/torch/install/lua/luarocks/type_check.lua
-- Installing: C:/torch/install/lua/luarocks/unpack.lua
-- Installing: C:/torch/install/lua/luarocks/upload.lua
-- Installing: C:/torch/install/lua/luarocks/upload/api.lua
-- Installing: C:/torch/install/lua/luarocks/upload/multipart.lua
-- Installing: C:/torch/install/lua/luarocks/util.lua
-- Installing: C:/torch/install/lua/luarocks/validate.lua
-- Installing: C:/torch/install/lua/luarocks/write_rockspec.lua
-- Installing: C:/torch/install/lua/luarocks/site_config.lua
-- Installing: C:/torch/install/luarocks/config.lua
-- Installing: C:/torch/install/./luarocks.bat
-- Installing: C:/torch/install/./luarocks-admin.bat

C:\tools\luajit-rocks\build>