./install.sh failed on manjarolinux (arch_based)

158 views
Skip to first unread message

Jean-Patrick Pommier

unread,
Jun 24, 2016, 2:55:47 AM6/24/16
to torch7

Hello,

When trying to install torch on manjaro, after having checked dependencies, ./install.sh yields an error:

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
-- 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/jeanpat/torch/extra/cutorch/build
[  7%] 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_THCHalf.cu.o
[  7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o
[ 10%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.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"


cuDNN 3 is installed. The gpu is an nvidia GT 740M.

Any idea to fix that issue?

Thanks.

Jean-Patrick Pommier

unread,
Jun 24, 2016, 3:33:10 AM6/24/16
to torch7
Installing cudnn 5 didn't fix the problem. Still the same error message ending by:

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

zinyang

unread,
Jun 25, 2016, 6:29:23 AM6/25/16
to torch7
it's probably your gcc version (6) . try this before running install.sh
export CC=/usr/bin/gcc-4.9
export CXX=/usr/bin/g++-4.9

Jean-Patrick Pommier

unread,
Jun 26, 2016, 9:07:11 AM6/26/16
to torch7
gcc 4.9 is build from AUR, then :

$ export CC=/usr/bin/gcc-4.9
[jeanpat@dip4fish torch]$ export CXX=/usr/bin/g++-4.9
[jeanpat@dip4fish torch]$ gcc --version
gcc
(GCC) 6.1.1 20160602
Copyright © 2016 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie.  Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER.

However when invoquing gcc from a terminal,  gcc 6.1 is called and not gcc 4.9 thus the script ./install.sh fails to build torch7.

Jean-Patrick Pommier

unread,
Jun 29, 2016, 4:03:22 AM6/29/16
to torch7
The following hack allows to build torch7 to the end:


Now, I don't know yet if gpu if supported.
Reply all
Reply to author
Forward
0 new messages