Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build on Archlinux with gcc 6.1 #413

Open
cloudhan opened this issue May 19, 2016 · 28 comments
Open

Failed to build on Archlinux with gcc 6.1 #413

cloudhan opened this issue May 19, 2016 · 28 comments

Comments

@cloudhan
Copy link

gcc 6 defaults to -std=c++14 which cause compilation issue with nvcc.
A related upstream bug report, seems some compilation option should be added to build scripts of cutorch, cunn, cudnn and cunnx.

Found CUDA on your machine. Installing CUDA packages
Warning: unmatched variable LUALIB
cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/cloud/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/cloud/torch/install/lib/luarocks/rocks/cutorch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN) install

-- Found Torch7 in /home/cloud/torch/install
-- MAGMA not found. Compiling without MAGMA support
-- Automatic GPU detection failed. Building for all known architectures.
-- Compiling for CUDA architecture: 2.0 2.1(2.0) 3.0 3.5 5.0 5.2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cloud/torch/extra/cutorch/build
[  2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o
[  5%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o
[  7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o
[ 10%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<<error-type>>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00004e36_00000000-19_THCBlas.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCBlas.cu.o.cmake:266 (message):
  Error generating file
  /home/cloud/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:362: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorageCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensor.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorRandom.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorMath.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorConv.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorLapack.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensor.h


/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<<error-type>>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00004e4a_00000000-19_THCReduceApplyUtils.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:266 (message):
  Error generating file
  /home/cloud/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:220: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorageCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCStorage.cu


/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<<error-type>>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00004e5e_00000000-19_THCHalf.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCHalf.cu.o.cmake:266 (message):
  Error generating file
  /home/cloud/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:2183: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<<error-type>>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00004e67_00000000-19_THCStorage.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCStorage.cu.o.cmake:266 (message):
  Error generating file
  /home/cloud/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:1200: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1
CMakeFiles/Makefile2:172: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
@soumith
Copy link
Member

soumith commented May 19, 2016

unfortunately, there's nothing we as cutorch developers can do about this. NVIDIA's CUDA toolkit doesn't yet support GCC-5, let alone GCC-6

@cloudhan
Copy link
Author

Adding the following line to CMakeLists.txt seems fix the compilation issue, (at least it compiles now

SET(CMAKE_CXX_FLAGS "-std=c++98 ${CMAKE_CXX_FLAGS}")

but it generate tons of warning

cc1: warning: command line option ‘-std=c++98’ is valid for C++/ObjC++ but not for C

and

...
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorConv.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorConv.h
...

@sirus20x6
Copy link

I can't find the location of CMakeLists.txt

@sirus20x6
Copy link

is there a way to use luarocks to install but with an edited cmakelists or do i have to use git

@GrimKriegor
Copy link

GrimKriegor commented May 31, 2016

@sirus20x6 I believe you can do:
$ luarocks make <path to rockspec file>

@sirus20x6
Copy link

@GrimKriegor Thanks for that. so I added SET(CMAKE_CXX_FLAGS "-std=c++98 ${CMAKE_CXX_FLAGS}") right below the line
SET(CMAKE_C_FLAGS "-std=c99 -Werror=implicit-function-declaration ${CMAKE_C_FLAGS}")

and the same error comes up. so @cloudhan 's work around doesnt seem to work for me

@GrimKriegor
Copy link

@sirus20x6 Try it on top of the file.

@sirus20x6
Copy link

@GrimKriegor tried it on the first line and I get the same thing

@cloudhan
Copy link
Author

@sirus20x6 make sure it is cutorch that fires those errors, cunn, cudnn and cunnx also have the same issue, walkarrounds are all the same. If you saw tons of warning, then it should have been built correctly.

FYI, I'm not using torch now.

@sirus20x6
Copy link

`sirus cutorch :) $sudo luarocks build ./rocks/cutorch-scm-1.rockspec
[sudo] password for root:
Cloning into 'cutorch'...
remote: Counting objects: 107, done.
remote: Compressing objects: 100% (104/104), done.
remote: Total 107 (delta 8), reused 34 (delta 1), pack-reused 0
Receiving objects: 100% (107/107), 157.01 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
Warning: unmatched variable LUALIB
cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/usr/local/bin/.." -DCMAKE_INSTALL_PREFIX="/usr/local/lib/luarocks/rocks/cutorch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN) install

-- The C compiler identification is GNU 6.1.1
-- The CXX compiler identification is GNU 6.1.1
-- 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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /usr/local
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /opt/cuda (found suitable version "7.5", minimum required is "6.5")
-- MAGMA not found. Compiling without MAGMA support
-- Automatic GPU detection failed. Building for all known architectures.
-- Compiling for CUDA architecture: 2.0 2.1(2.0) 3.0 3.5 5.0 5.2
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_cutorch-scm-1-9748/cutorch/build
[ 7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o
[ 7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o
[ 7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o
[ 10%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o
[ 12%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o
[ 15%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o
[ 17%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o
[ 20%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorageCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorageCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorageCopy.cu

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f05_00000000-19_THCBlas.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCBlas.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:70: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f1a_00000000-19_THCStorageCopy.compute_52.cpp1.ii".
Compilation terminated.
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorageCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorCopy.h

CMake Error at THC_generated_THCStorageCopy.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorRandom.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorMath.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorConv.h

lib/THC/CMakeFiles/THC.dir/build.make:84: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o] Error 1
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorLapack.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensor.cu

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorageCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorRandom.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorMath.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorConv.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorLapack.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorageCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorRandom.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorMath.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorConv.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorLapack.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensorCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensorCopy.cu

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorageCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorRandom.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorMath.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorConv.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THTensorLapack.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensor.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCTensorCopy.h

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f39_00000000-19_THCReduceApplyUtils.compute_52.cpp1.ii".
Compilation terminated.
/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

lib/THC/CMakeFiles/THC.dir/build.make:63: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f35_00000000-19_THCTensor.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCTensor.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:91: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o] Error 1
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f45_00000000-19_THCTensorCopy.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCTensorCopy.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:98: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o] Error 1
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f51_00000000-19_THCTensorMath.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:105: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o] Error 1
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THStorageCopy.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorage.h

CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
Removing non-existent dependency file: generic/THCStorage.cu

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f66_00000000-19_THCHalf.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCHalf.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:231: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00007f6e_00000000-19_THCStorage.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at THC_generated_THCStorage.cu.o.cmake:266 (message):
Error generating file
/tmp/luarocks_cutorch-scm-1-9748/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:77: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1
CMakeFiles/Makefile2:172: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
sirus cutorch :( $
`

@cloudhan well this is what I got

@cloudhan
Copy link
Author

cloudhan commented May 31, 2016

sirus cutorch :) $sudo luarocks build ./rocks/cutorch-scm-1.rockspec
[sudo] password for root:
Cloning into 'cutorch'...
Cloning into 'cutorch'...
remote: Counting objects: 107, done.
remote: Compressing objects: 100% (104/104), done.
remote: Total 107 (delta 8), reused 34 (delta 1), pack-reused 0
Receiving objects: 100% (107/107), 157.01 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.

@sirus20x6 I think this automatic git clone is the source, that is you always get a fresh copy of the code including the CMakeLists.txt. You need figure out how to make it build on you existing copy of code insteal of cloning a new one.
Try this luarocks make command

@sirus20x6
Copy link

@cloudhan thank you that worked! hopefully that will get me across the finish line on this. cpu mode on docker is just too slow to use.

@Sebb767
Copy link

Sebb767 commented Jun 2, 2016

I had the exact same problem. Turns out its as simple as

cd /tmp
git clone https://github.com/torch/cutorch
cd cutorch
export CMAKE_CXX_FLAGS="-std=c++98"
luarocks install rocks/cutorch-scm-1.rockspec

I'm using Arch Linux w/ gcc 6.1.1.

EDIT: Tried again, for some strange reason this only works when you install from your local copy.

@srwareham
Copy link

@Sebb767's advice resolved my issue trying to install Torch7 using the default install script on arch with gcc 6.1.1. You'll want to run the steps he advises, and then go back to the Torch7 install script directory. You then will need to type

export CMAKE_CXX_FLAGS="-std=c++98"
./install.sh

And voila! it works. Thanks!

@GildedHonour
Copy link

@Sebb767

$ sudo luarocks install rocks/cutorch-scm-1.rockspec
Using rocks/cutorch-scm-1.rockspec... switching to 'build' mode

Missing dependencies for cutorch:
torch >= 7.0


Error: Could not satisfy dependency: torch >= 7.0

@GildedHonour
Copy link

Also

cc1: warning: command line option ‘-std=c++98’ is valid for C++/ObjC++ but not for C

@GildedHonour
Copy link

Half of it has been installed well, another part not:

cudnn scm-1 is now built and installed in /home/alex/apps/torch/install/ (license: BSD)

Warning: unmatched variable LUALIB
cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/alex/apps/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/alex/apps/torch/install/lib/luarocks/rocks/cunnx/scm-1" && make

-- The C compiler identification is GNU 6.1.1
-- The CXX compiler identification is GNU 6.1.1
-- 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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/alex/apps/torch/install
-- Found CUDA: /opt/cuda (found suitable version "7.5", minimum required is "6.5") 
-- Found gcc >=5 and CUDA <= 7.5, adding workaround C++ flags
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;5.2+PTX
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alex/apps/torch/extra/cunnx/build
[ 50%] Building NVCC (Device) object CMakeFiles/cunnx.dir/cunnx_generated_init.cu.o
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"

/usr/include/c++/6.1.1/exception(63): error: expected a ";"

/usr/include/c++/6.1.1/exception(69): error: expected a ";"

/usr/include/c++/6.1.1/exception(77): error: expected a ";"

/usr/include/c++/6.1.1/exception(85): error: expected a ";"

/usr/include/c++/6.1.1/exception(95): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

/usr/include/c++/6.1.1/bits/exception_ptr.h(64): error: expected a "{"

/usr/include/c++/6.1.1/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"

/usr/include/c++/6.1.1/bits/exception_ptr.h(81): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(83): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(84): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(86): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(88): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(89): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(92): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(94): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: incomplete type is not allowed

/usr/include/c++/6.1.1/bits/exception_ptr.h(97): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(118): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(128): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(145): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(146): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(149): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(154): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(155): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(158): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(159): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(162): error: use of a local type to declare a function

/usr/include/c++/6.1.1/bits/exception_ptr.h(163): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(171): error: expected a ";"

/usr/include/c++/6.1.1/bits/exception_ptr.h(197): error: expected a ";"

/usr/include/c++/6.1.1/bits/move.h(47): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(71): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope

/usr/include/c++/6.1.1/type_traits(71): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(73): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name

/usr/include/c++/6.1.1/type_traits(74): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(79): error: "value_type" has already been declared in the current scope

/usr/include/c++/6.1.1/type_traits(79): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(84): error: identifier "constexpr" is undefined

/usr/include/c++/6.1.1/type_traits(84): error: "_Tp" is not a function or static data member

/usr/include/c++/6.1.1/type_traits(93): error: expected a declaration

/usr/include/c++/6.1.1/type_traits(93): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(235): error: identifier "char16_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: identifier "char32_t" is undefined

/usr/include/c++/6.1.1/type_traits(239): error: class "std::__is_integral_helper<<error-type>>" has already been defined

/usr/include/c++/6.1.1/type_traits(337): error: identifier "__float128" is undefined

/usr/include/c++/6.1.1/type_traits(453): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(457): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(465): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(469): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(477): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(481): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(489): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(493): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(501): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(505): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(513): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(517): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(525): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(529): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(537): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(541): error: expected a ">"

/usr/include/c++/6.1.1/type_traits(551): error: namespace "std" has no member "nullptr_t"

/usr/include/c++/6.1.1/type_traits(572): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(578): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(585): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(592): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(602): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(628): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(738): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(752): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(767): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(777): error: expected a ")"

/usr/include/c++/6.1.1/type_traits(788): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(788): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(788): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(788): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(794): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(795): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(825): error: identifier "noexcept" is undefined

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: function call is not allowed in a constant expression

/usr/include/c++/6.1.1/type_traits(825): error: this operator is not allowed in a template argument expression

/usr/include/c++/6.1.1/type_traits(836): error: an explicit template argument list is not allowed on this declaration

/usr/include/c++/6.1.1/type_traits(836): error: expected a type specifier

/usr/include/c++/6.1.1/type_traits(836): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(836): error: expected a ";"

/usr/include/c++/6.1.1/type_traits(842): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(843): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

/usr/include/c++/6.1.1/type_traits(868): error: function returning function is not allowed

/usr/include/c++/6.1.1/type_traits(879): error: an explicit template argument list is not allowed on this declaration

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00000ae0_00000000-16_init.compute_52.cpp1.ii".
Compilation terminated.
CMake Error at cunnx_generated_init.cu.o.cmake:267 (message):
  Error generating file
  /home/alex/apps/torch/extra/cunnx/build/CMakeFiles/cunnx.dir//./cunnx_generated_init.cu.o


make[2]: *** [CMakeFiles/cunnx.dir/build.make:65: CMakeFiles/cunnx.dir/cunnx_generated_init.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:67: CMakeFiles/cunnx.dir/all] Error 2
make: *** [Makefile:128: all] Error 2

Error: Build error: Failed building.


Do you want to automatically prepend the Torch install location
to PATH and LD_LIBRARY_PATH in your /home/alex/.bashrc? (yes/no)
[yes] >>> 

@cpra
Copy link

cpra commented Aug 10, 2016

@GildedHonour this works for me:

cd /tmp
git clone https://github.com/torch/cutorch
cd cutorch

In CMakeLists.txt add the following:

SET(CMAKE_CXX_FLAGS "-std=c++98 ${CMAKE_CXX_FLAGS}")

And finally:

luarocks make rocks/cutorch-scm-1.rockspec

@GildedHonour
Copy link

@cpra for me not, the same errors.

@cpra
Copy link

cpra commented Aug 11, 2016

@GildedHonour strange, the version I posed works for me, I tried it several times (@Sebb767 s version does not for some reason). It also fixed the build errors I got when installing cunn. I have the same cuda version as you and an up-to-date system (gcc 6.1.1). Some ideas:

  • Make sure that SET(CMAKE_CXX_FLAGS "-std=c++98 ${CMAKE_CXX_FLAGS}") is somewhere at the top of CMakeLists.txt.
  • Make sure that you use luarocks make, not luarocks install

@GildedHonour
Copy link

@cpra that doesn't help. also

cc1: warning: command line option ‘-std=c++98’ is valid for C++/ObjC++ but not for C

@cdluminate
Copy link
Contributor

cdluminate commented Sep 6, 2016

@soumith CUDA 7.5 and CUDA 8.0 both work fine with GCC-5, and for CUDA 7.5 a hack on header file /usr/include/host_config.h is needed.

CUDA 8.0 + GCC-6 is really a pain.

@aep
Copy link

aep commented Oct 2, 2016

this worked for me (dunno how to fix cmake)

$ cat /opt/cuda/bin/nvcc
#!/bin/sh
echo "$@" >&2
args="$(echo "$@" | sed -e 's;-ccbin [^ ]* ;;') -ccbin /usr/sbin/gcc-5"
/opt/cuda/bin/nvcc_ $args

@akhilsbehl
Copy link

akhilsbehl commented Oct 4, 2016

@aep This did not work for me. But essentially, the problem you identify is correct.

Archlinux has CUDA 8 that does not like gcc-6. Because of this Arch automatically installs gcc-5 as a dep for CUDA. See wiki and bugreport. I thought that aep's solution should have worked for me but it gave weird errors with CMake.

I also tried setting CC and CXX variables with CMake but that failed too.

I did manage to compile by temporarily symlinking /usr/bin/gcc to /usr/bin/gcc-5 and /usr/bin/g++ to /usr/bin/g++-5. Everything works well. But it will be useful if someone can explain the right way to employ this workaround.

@npanpaliya
Copy link

Adding SET(CMAKE_CXX_FLAGS "-std=c++98 ${CMAKE_CXX_FLAGS}") in CMakeLists.txt of cutorch, cunn, cunnx worked for me. But yes, with the warning mentioned by @GildedHonour .
cc1: warning: command line option ‘-std=c++98’ is valid for C++/ObjC++ but not for C

@archenroot
Copy link

archenroot commented Dec 3, 2016

Just adding my experience from Gentoo on:
CUDA 8.0, CUNN 8.0(5.1), GCC 6.2.0-r1

I had to apply older standard processing:
sci-libs/torch-cutorch gcc6-safe
sci-libs/torch-cunn gcc6-safe

ares ~ # cat /etc/portage/env/gcc6-safe 
CFLAGS="${CFLAGS}"
CXXFLAGS="${CXXFLAGS} -g -fno-delete-null-pointer-checks -std=gnu++98"

Discussed elsewhere:
#torch/cunn#391

@expenses
Copy link

@aep
@akhilsbehl

Moving nvcc to /opt/bin/nvcc_ and putting that scrip in its place didn't work for me at first, and gave me an unspecified error like:

 CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
 Error generating
/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o

But then I realised I had forgot to run sudo chmod +x /opt/cuda/bin/nvcc!
After that, everything build fine.

@ghost
Copy link

ghost commented Jul 24, 2017

For third time of getting error 'no space left' I finally got it:
do not cd /tmp before git clone, tmp has limited size

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

No branches or pull requests