Skip to content

Instantly share code, notes, and snippets.

@Atcold
Last active April 27, 2016 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Atcold/0001a1ea401798d4e737 to your computer and use it in GitHub Desktop.
Save Atcold/0001a1ea401798d4e737 to your computer and use it in GitHub Desktop.
luarocks install torch
ubuntu@tegra-ubuntu:~$ sudo luarocks install torch
Installing https://raw.github.com/torch/rocks/master/torch-scm-1.rockspec...
Using https://raw.github.com/torch/rocks/master/torch-scm-1.rockspec... switching to 'build' mode
Cloning into 'torch7'...
remote: Counting objects: 130, done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 130 (delta 2), reused 91 (delta 1)
Receiving objects: 100% (130/130), 156.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (2/2), done.
Checking connectivity... done.
Warning: unmatched variable LUALIB
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUA=/usr/local/bin/luajit -DLUALIB= -DLUA_BINDIR="/usr/local/bin" -DLUA_INCDIR="/usr/local/include" -DLUA_LIBDIR="/usr/local/lib" -DLUADIR="/usr/local/lib/luarocks/rocks/torch/scm-1/lua" -DLIBDIR="/usr/local/lib/luarocks/rocks/torch/scm-1/lib" -DCMAKE_INSTALL_PREFIX="/usr/local/lib/luarocks/rocks/torch/scm-1" && make
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Compiling with OpenMP support
-- Compiling with OpenMP support
-- No OMAP3 processor on this on this machine.
-- No OMAP4 processor on this on this machine.
-- Neon found with compiler flag : -mfpu=neon -D__NEON__
-- Looking for mmap
-- Looking for mmap - found
-- Performing Test C_HAS_SSE1_1
-- Performing Test C_HAS_SSE1_1 - Failed
-- Performing Test C_HAS_SSE1_2
-- Performing Test C_HAS_SSE1_2 - Failed
-- Performing Test C_HAS_SSE1_3
-- Performing Test C_HAS_SSE1_3 - Failed
-- Performing Test C_HAS_SSE2_1
-- Performing Test C_HAS_SSE2_1 - Failed
-- Performing Test C_HAS_SSE2_2
-- Performing Test C_HAS_SSE2_2 - Failed
-- Performing Test C_HAS_SSE2_3
-- Performing Test C_HAS_SSE2_3 - Failed
-- Performing Test C_HAS_SSE3_1
-- Performing Test C_HAS_SSE3_1 - Failed
-- Performing Test C_HAS_SSE3_2
-- Performing Test C_HAS_SSE3_2 - Failed
-- Performing Test C_HAS_SSE3_3
-- Performing Test C_HAS_SSE3_3 - Failed
-- Performing Test C_HAS_SSE4_1_1
-- Performing Test C_HAS_SSE4_1_1 - Failed
-- Performing Test C_HAS_SSE4_1_2
-- Performing Test C_HAS_SSE4_1_2 - Failed
-- Performing Test C_HAS_SSE4_1_3
-- Performing Test C_HAS_SSE4_1_3 - Failed
-- Performing Test C_HAS_SSE4_1_4
-- Performing Test C_HAS_SSE4_1_4 - Failed
-- Performing Test C_HAS_SSE4_2_1
-- Performing Test C_HAS_SSE4_2_1 - Failed
-- Performing Test C_HAS_SSE4_2_2
-- Performing Test C_HAS_SSE4_2_2 - Failed
-- Performing Test C_HAS_SSE4_2_3
-- Performing Test C_HAS_SSE4_2_3 - Failed
-- Performing Test C_HAS_SSE4_2_4
-- Performing Test C_HAS_SSE4_2_4 - Failed
-- Performing Test CXX_HAS_SSE1_1
-- Performing Test CXX_HAS_SSE1_1 - Failed
-- Performing Test CXX_HAS_SSE1_2
-- Performing Test CXX_HAS_SSE1_2 - Failed
-- Performing Test CXX_HAS_SSE1_3
-- Performing Test CXX_HAS_SSE1_3 - Failed
-- Performing Test CXX_HAS_SSE2_1
-- Performing Test CXX_HAS_SSE2_1 - Failed
-- Performing Test CXX_HAS_SSE2_2
-- Performing Test CXX_HAS_SSE2_2 - Failed
-- Performing Test CXX_HAS_SSE2_3
-- Performing Test CXX_HAS_SSE2_3 - Failed
-- Performing Test CXX_HAS_SSE3_1
-- Performing Test CXX_HAS_SSE3_1 - Failed
-- Performing Test CXX_HAS_SSE3_2
-- Performing Test CXX_HAS_SSE3_2 - Failed
-- Performing Test CXX_HAS_SSE3_3
-- Performing Test CXX_HAS_SSE3_3 - Failed
-- Performing Test CXX_HAS_SSE4_1_1
-- Performing Test CXX_HAS_SSE4_1_1 - Failed
-- Performing Test CXX_HAS_SSE4_1_2
-- Performing Test CXX_HAS_SSE4_1_2 - Failed
-- Performing Test CXX_HAS_SSE4_1_3
-- Performing Test CXX_HAS_SSE4_1_3 - Failed
-- Performing Test CXX_HAS_SSE4_1_4
-- Performing Test CXX_HAS_SSE4_1_4 - Failed
-- Performing Test CXX_HAS_SSE4_2_1
-- Performing Test CXX_HAS_SSE4_2_1 - Failed
-- Performing Test CXX_HAS_SSE4_2_2
-- Performing Test CXX_HAS_SSE4_2_2 - Failed
-- Performing Test CXX_HAS_SSE4_2_3
-- Performing Test CXX_HAS_SSE4_2_3 - Failed
-- Performing Test CXX_HAS_SSE4_2_4
-- Performing Test CXX_HAS_SSE4_2_4 - Failed
-- 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
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_sequential - mkl_core - m]
-- Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m]
-- Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl - guide - pthread - m]
-- Library mkl: not found
-- MKL library not found
-- Checking for [openblas - gfortran]
-- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND
-- Checking for [openblas - gfortran - pthread]
-- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND
-- Checking for [goto2 - gfortran]
-- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND
-- Checking for [goto2 - gfortran - pthread]
-- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND
-- Checking for [acml - gfortran]
-- Library acml: BLAS_acml_LIBRARY-NOTFOUND
-- Checking for [Accelerate]
-- Library Accelerate: BLAS_Accelerate_LIBRARY-NOTFOUND
-- Checking for [vecLib]
-- Library vecLib: BLAS_vecLib_LIBRARY-NOTFOUND
-- Checking for [ptf77blas - atlas - gfortran]
-- Library ptf77blas: BLAS_ptf77blas_LIBRARY-NOTFOUND
-- Checking for [blas]
-- Library blas: BLAS_blas_LIBRARY-NOTFOUND
-- Cannot find a library with BLAS API. Not using BLAS.
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_sequential - mkl_core - m]
-- Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m]
-- Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl - guide - pthread - m]
-- Library mkl: not found
-- MKL library not found
-- Checking for [openblas - gfortran]
-- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND
-- Checking for [openblas - gfortran - pthread]
-- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND
-- Checking for [goto2 - gfortran]
-- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND
-- Checking for [goto2 - gfortran - pthread]
-- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND
-- Checking for [acml - gfortran]
-- Library acml: BLAS_acml_LIBRARY-NOTFOUND
-- Checking for [Accelerate]
-- Library Accelerate: BLAS_Accelerate_LIBRARY-NOTFOUND
-- Checking for [vecLib]
-- Library vecLib: BLAS_vecLib_LIBRARY-NOTFOUND
-- Checking for [ptf77blas - atlas - gfortran]
-- Library ptf77blas: BLAS_ptf77blas_LIBRARY-NOTFOUND
-- Checking for [blas]
-- Library blas: BLAS_blas_LIBRARY-NOTFOUND
-- Cannot find a library with BLAS API. Not using BLAS.
-- LAPACK requires BLAS
-- Cannot find a library with LAPACK API. Not using LAPACK.
-- Performing Test C_HAS_inline
-- Performing Test C_HAS_inline - Success
-- C inline is supported (inline)
-- Performing Test C_HAS_THREAD
-- Performing Test C_HAS_THREAD - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_torch-scm-1-3962/torch7/build
Scanning dependencies of target TH
[ 3%] Building C object lib/TH/CMakeFiles/TH.dir/THGeneral.c.o
[ 7%] Building C object lib/TH/CMakeFiles/TH.dir/THAllocator.c.o
[ 11%] Building C object lib/TH/CMakeFiles/TH.dir/THStorage.c.o
[ 14%] Building C object lib/TH/CMakeFiles/TH.dir/THTensor.c.o
In file included from generic/THTensorRandom.c:1:0,
from /tmp/luarocks_torch-scm-1-3962/torch7/lib/TH/THTensor.c:15:
/tmp/luarocks_torch-scm-1-3962/torch7/lib/TH/generic/THTensorRandom.c: In function ‘THDoubleTensor_random’:
/tmp/luarocks_torch-scm-1-3962/torch7/lib/TH/generic/THTensorRandom.c:20:3: warning: left shift count >= width of type [enabled by default]
TH_TENSOR_APPLY(real, self, *self_data = (float)(THRandom_random(_generator) % ((1UL << DBL_MANT_DIG)+1)););
^
[ 18%] Building C object lib/TH/CMakeFiles/TH.dir/THBlas.c.o
[ 22%] Building C object lib/TH/CMakeFiles/TH.dir/THLapack.c.o
[ 25%] Building C object lib/TH/CMakeFiles/TH.dir/THLogAdd.c.o
[ 29%] Building C object lib/TH/CMakeFiles/TH.dir/THRandom.c.o
[ 33%] Building C object lib/TH/CMakeFiles/TH.dir/THFile.c.o
[ 37%] Building C object lib/TH/CMakeFiles/TH.dir/THDiskFile.c.o
[ 40%] Building C object lib/TH/CMakeFiles/TH.dir/THMemoryFile.c.o
Linking C shared library libTH.so
[ 40%] Built target TH
Scanning dependencies of target luaT
[ 44%] Building C object lib/luaT/CMakeFiles/luaT.dir/luaT.c.o
Linking C shared library libluaT.so
[ 44%] Built target luaT
[ 48%] Generating random.c
[ 51%] Generating TensorMath.c
Scanning dependencies of target torch
[ 55%] Building C object CMakeFiles/torch.dir/DiskFile.c.o
[ 59%] Building C object CMakeFiles/torch.dir/File.c.o
[ 62%] Building C object CMakeFiles/torch.dir/MemoryFile.c.o
[ 66%] Building C object CMakeFiles/torch.dir/PipeFile.c.o
[ 70%] Building C object CMakeFiles/torch.dir/Storage.c.o
[ 74%] Building C object CMakeFiles/torch.dir/Tensor.c.o
[ 77%] Building C object CMakeFiles/torch.dir/Timer.c.o
[ 81%] Building C object CMakeFiles/torch.dir/utils.c.o
[ 85%] Building C object CMakeFiles/torch.dir/init.c.o
[ 88%] Building C object CMakeFiles/torch.dir/TensorOperator.c.o
[ 92%] Building C object CMakeFiles/torch.dir/TensorMath.c.o
[ 96%] Building C object CMakeFiles/torch.dir/random.c.o
[100%] Building C object CMakeFiles/torch.dir/Generator.c.o
Linking C shared module libtorch.so
[100%] Built target torch
cd build && make install
[ 40%] Built target TH
[ 44%] Built target luaT
[100%] Built target torch
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/share/cmake/torch/TorchExports.cmake
-- Installing: /usr/local/share/cmake/torch/TorchExports-release.cmake
-- Installing: /usr/local/share/cmake/torch/TorchConfig.cmake
-- Installing: /usr/local/share/cmake/torch/TorchWrap.cmake
-- Installing: /usr/local/share/cmake/torch/TorchPathsInit.cmake
-- Installing: /usr/local/share/cmake/torch/TorchPackage.cmake
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lib/libtorch.so
-- Set runtime path of "/usr/local/lib/luarocks/rocks/torch/scm-1/lib/libtorch.so" to "$ORIGIN/../lib:/usr/local/lib"
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/init.lua
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/File.lua
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/Tensor.lua
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/CmdLine.lua
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/FFI.lua
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/Tester.lua
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/test.lua
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/random.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/file.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/timer.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/cmdline.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/pipefile.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/serialization.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/utility.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/tester.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/maths.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/tensor.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/storage.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/memoryfile.md
-- Installing: /usr/local/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/diskfile.md
-- Installing: /usr/local/lib/libTH.so
-- Set runtime path of "/usr/local/lib/libTH.so" to "$ORIGIN/../lib"
-- Installing: /usr/local/include/TH/TH.h
-- Installing: /usr/local/include/TH/THAllocator.h
-- Installing: /usr/local/include/TH/THBlas.h
-- Installing: /usr/local/include/TH/THDiskFile.h
-- Installing: /usr/local/include/TH/THFile.h
-- Installing: /usr/local/include/TH/THFilePrivate.h
-- Installing: /usr/local/include/TH/THGeneral.h
-- Installing: /usr/local/include/TH/THGenerateAllTypes.h
-- Installing: /usr/local/include/TH/THGenerateFloatTypes.h
-- Installing: /usr/local/include/TH/THGenerateIntTypes.h
-- Installing: /usr/local/include/TH/THLapack.h
-- Installing: /usr/local/include/TH/THLogAdd.h
-- Installing: /usr/local/include/TH/THMemoryFile.h
-- Installing: /usr/local/include/TH/THRandom.h
-- Installing: /usr/local/include/TH/THStorage.h
-- Installing: /usr/local/include/TH/THTensor.h
-- Installing: /usr/local/include/TH/THTensorApply.h
-- Installing: /usr/local/include/TH/THTensorDimApply.h
-- Installing: /usr/local/include/TH/THTensorMacros.h
-- Installing: /usr/local/include/TH/THVector.h
-- Installing: /usr/local/include/TH/generic/THBlas.c
-- Installing: /usr/local/include/TH/generic/THBlas.h
-- Installing: /usr/local/include/TH/generic/THLapack.c
-- Installing: /usr/local/include/TH/generic/THLapack.h
-- Installing: /usr/local/include/TH/generic/THStorage.c
-- Installing: /usr/local/include/TH/generic/THStorage.h
-- Installing: /usr/local/include/TH/generic/THStorageCopy.c
-- Installing: /usr/local/include/TH/generic/THStorageCopy.h
-- Installing: /usr/local/include/TH/generic/THTensor.c
-- Installing: /usr/local/include/TH/generic/THTensor.h
-- Installing: /usr/local/include/TH/generic/THTensorConv.c
-- Installing: /usr/local/include/TH/generic/THTensorConv.h
-- Installing: /usr/local/include/TH/generic/THTensorCopy.c
-- Installing: /usr/local/include/TH/generic/THTensorCopy.h
-- Installing: /usr/local/include/TH/generic/THTensorLapack.c
-- Installing: /usr/local/include/TH/generic/THTensorLapack.h
-- Installing: /usr/local/include/TH/generic/THTensorMath.c
-- Installing: /usr/local/include/TH/generic/THTensorMath.h
-- Installing: /usr/local/include/TH/generic/THTensorRandom.c
-- Installing: /usr/local/include/TH/generic/THTensorRandom.h
-- Installing: /usr/local/include/TH/generic/THVector.c
-- Installing: /usr/local/share/cmake/torch/THConfig.cmake
-- Installing: /usr/local/lib/libluaT.so
-- Set runtime path of "/usr/local/lib/libluaT.so" to "$ORIGIN/../lib"
-- Installing: /usr/local/include/luaT.h
-- Installing: /usr/local/share/cmake/torch/luaTConfig.cmake
Updating manifest for /usr/local/lib/luarocks/rocks
torch scm-1 is now built and installed in /usr/local/ (license: BSD)
ubuntu@tegra-ubuntu:~$
@denghuiru
Copy link

Hi, I have a problem about using luarocks, when i use the command luarocks install torch, It always show that 👍
fatal: unable to connect to github.com:
github.com: Name or service not known
Please help me about how to solve this problems, thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment