Package Details: torch7-cutorch-git r1026.5e9d86c-3

Git Clone URL: (read-only)
Package Base: torch7-cutorch-git
Description: A CUDA backend for Torch7
Upstream URL:
Licenses: BSD
Conflicts: torch7-cutorch
Provides: torch7-cutorch
Submitter: petronny
Maintainer: petronny
Last Packager: petronny
Votes: 6
Popularity: 0.000142
First Submitted: 2016-08-28 13:17
Last Updated: 2018-11-08 11:57

Dependencies (4)

Sources (2)

Latest Comments

1 2 Next › Last »

ei-grad commented on 2018-11-07 23:29

Getting error with CUDA 10:

lib/THC/THCAtomics.cuh(97): error: cannot overload functions distinguished by return type alone

Patch is needed

diff --git a/lib/THC/THCAtomics.cuh b/lib/THC/THCAtomics.cuh
index 400875c..ccb7a1c 100644
--- a/lib/THC/THCAtomics.cuh
+++ b/lib/THC/THCAtomics.cuh
@@ -94,6 +94,7 @@ static inline __device__ void atomicAdd(long *address, long val) {

+#if !(__CUDA_ARCH__ >= 700 || !defined(__CUDA_ARCH__) )
 static inline  __device__ void atomicAdd(half *address, half val) {
   unsigned int * address_as_ui =
       (unsigned int *) ((char *)address - ((size_t)address & 2));
@@ -117,6 +118,7 @@ static inline  __device__ void atomicAdd(half *address, half val) {
    } while (assumed != old);

fuan_k commented on 2018-09-16 19:30

gcc-5 doesn't exist anymore in Arch. Cannot compile:

If I edit PKGBUILD for gcc version 8.2.0 (currently), it yields an error:

/opt/cuda/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported! #error -- unsupported GNU version! gcc versions later than 7 are not supported!

Do we really need gcc-5 in order to use cuda? It should at least be marked as a dependency.

Found a pre-built binary package on the manjaro repos for gcc 4.9 ( , and used that instead of gcc5, seems to have compiled fine. Had to trick the linker for gcc with ln -s /usr/lib/ /usr/lib/ because we're now at version 6 for libmpfr, and luckily it compiled.

To point to your custom gcc-4.9 edit this line in the PKGBUIL: cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_COMPILER=/path/to/gcc49/usr/bin/gcc-4.9 -DCMAKE_BUILD_TYPE=Release

Alternatively, one could use the gcc shipped with cuda in /opt/cuda/bin/gcc I guess...

eigengrau commented on 2017-09-25 14:12

I’m also seeing implicit function declaration errors when building this. The patch posted below resolved this. Maybe it would make sense to apply this here until it is taken up upstream.

zsrkmyn commented on 2017-09-23 18:04

`-fno-plt` is in the `CFLAGS` and `CXXFLAGS` by default in the latest makepkg.conf file, which should be removed, since gcc-5/g++-5 cannot recognize it.

for more details, please refer to [1].


torch7-cunn-git has the same problem as well.

edmeme commented on 2017-09-13 14:23

I had to do some juggling to get this building on my system. I got the same errors as @ansine, which were caused because lua52 headers were accidentaly used at some step in the compilation. I solved this by prepending to CPATH=/usr/include/lua5.1/ to cmake in PKGBUILD.

@petronny is right about removing -fno-plt on makepkg.conf, but I wonder how to do it in a way its contained in the PKGBUILD, maybe rewriting CFLAGS in build() is enough.

Furthermore, I believe cmake flag -DCMAKE_C_COMPILER is obsolete, you should use environment variables instead.

Finaly glibc 2.26-3 was attempting to use __Float128 within nvcc, as it was unable to determine correctly GCC's version, the only fix I could find is patching a header of glibc itself.

All the changes I made are in

petronny commented on 2017-08-26 12:56

@xico remove it in /etc/makepkg.conf will work

xico commented on 2017-08-22 12:15

Compilation fails with gcc5 due to the recent adding of `-fno-plt` in makepkg.conf.

Actual error message is:

CMake Error at /usr/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "/usr/bin/gcc-5" is not able to compile a simple test

Akari commented on 2017-07-23 10:52

I made a pull request upstream to fix the error that me, Clyybber and ansine were getting. Until it's merged, please add this patch:

Pull request link:

petronny commented on 2017-05-24 10:32

@Clyybber @ansine
Everything works fine here, so I can't solve your problem.

If you still get stuck there, you can fetch the latest compiled package from

Clyybber commented on 2017-05-15 18:03

I get the same error as asine. It fails to build