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

Compilation errors with GCC 6.2.0 and CUDA 8.0 #659

Open
archenroot opened this issue Jan 4, 2017 · 17 comments
Open

Compilation errors with GCC 6.2.0 and CUDA 8.0 #659

archenroot opened this issue Jan 4, 2017 · 17 comments

Comments

@archenroot
Copy link

I am getting lots of errors on Gentoo, not sure if my ebuild file for package compilation is faulty, or the current brachn of cutorch is unstable.

Here is full list:
tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ /usr/include/luajit-2.0/TH/THStorage.h:7:38: error: unknown type name ‘THHalfStorage’ /usr/include/luajit-2.0/TH/THStorage.h:7:38: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.h:36:73: error: unknown type name ‘THHalfStorage’ cd /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999_build/lib/THC && /usr/bin/x86_64-pc-linux-gnu-gcc -DCUDA_HAS_FP16=1 -DTHC_EXPORTS -DTH_GENERIC_USE_HALF=1 -I/usr/include/luajit-2.0 -I/usr/include/luajit-2.0/TH -I/opt/cuda/include -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/CUDA_SDK_ROOT_DIR-NOTFOUND/common/inc -I/TH -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999_build/lib/THC -DNDEBUG -DCUDA_HAS_FP16=1 -std=c99 -std=c99 -Werror=implicit-function-declaration -march=skylake -mabm -maes -madx -mrtm -mavx256-split-unaligned-load -mavx256-split-unaligned-store --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=6144 -O2 -pipe -fPIC -o CMakeFiles/THC.dir/THCThreadLocal.c.o -c /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCThreadLocal.c /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaByteStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:7: error: implicit declaration of function ‘THHalfTensor_newWithStorage1d’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:19:3: error: implicit declaration of function ‘THHalfTensor_free’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaCharStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaShortStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaIntStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaLongStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.h:34:76: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:7:31: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaHalfStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /usr/include/luajit-2.0/TH/THStorage.h:7:38: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaByteTensor_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:28:51: error: implicit declaration of function ‘THHalfTensor_nElement’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:32:27: error: implicit declaration of function ‘THHalfTensor_newSizeOf’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THByteTensor_copyHalf’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCStorage.h:8:39: error: conflicting types for ‘THCudaDoubleStorage_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:17:53: error: dereferencing pointer to incomplete type ‘struct THHalfStorage’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaCharTensor_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCStorageCopy.c:38:67: error: unknown type name ‘THHalfStorage’ /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THCharTensor_copyHalf’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaShortTensor_copyHalf’ /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THShortTensor_copyHalf’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaIntTensor_copyHalf’ /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THIntTensor_copyHalf’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaLongTensor_copyHalf’ /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THLongTensor_copyHalf’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_newContiguous’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_data’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_free’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_newWithSize’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyByte’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyChar’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyShort’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyInt’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyLong’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyFloat’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyDouble’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaHalfTensor_copyHalf’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:30:48: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:33:15: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyHalf’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_copyCuda’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:77:44: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:80:17: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:77:44: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:80:17: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:77:44: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:80:17: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:77:44: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:80:17: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:77:44: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:80:17: error: ‘srcf’ undeclared (first use in this function) /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:77:44: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:80:17: error: ‘srcf’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:83:19: error: implicit declaration of function ‘THFloatTensor_copyHalf’ [-Werror=implicit-function-declaration] /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: ‘THHalfTensor’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:77:44: error: expected expression before ‘)’ token /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:80:17: error: ‘srcf’ undeclared (first use in this function) /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:83:19: error: implicit declaration of function ‘THDoubleTensor_copyHalf’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:8:39: error: implicit declaration of function ‘THHalfTensor_isContiguous’ [-Werror=implicit-function-declaration] /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:128:54: error: dereferencing pointer to incomplete type ‘struct THHalfTensor’ /usr/include/luajit-2.0/TH/THTensor.h:7:39: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaTensor_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/THCTensor.h:9:40: error: conflicting types for ‘THCudaDoubleTensor_copyHalf’ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generic/THCTensorCopy.c:73:68: error: unknown type name ‘THHalfTensor’ cc1: some warnings being treated as errors

@archenroot
Copy link
Author

Any ideas?...

@gchanan
Copy link
Contributor

gchanan commented Jan 4, 2017

have you tried updating torch7? Those errors are referring to types that were added in the past couple days.

@archenroot
Copy link
Author

archenroot commented Jan 4, 2017

I am using https://github.com/torch/cutorch.git on every install attemt, so yes. i have always fresh clone in time.

I wasn't sure so I switched my profile down to 4.9.x gcc, but this errors are not relevant to gcc as I see, it failed as well.

You can build current branch?

@soumith
Copy link
Member

soumith commented Jan 4, 2017

@archenroot

luarocks install torch7
luarocks install nn
luarocks install cutorch
luarocks install cunn

in that exact order

@archenroot
Copy link
Author

archenroot commented Jan 4, 2017

I will fallback to luarocks installation later, would like to follow Gentoo ebuild way, which is noting wrong ...

Thing is that all other packages are failing on missing THC.h header file missing which is part of cutorch.

I am now trying to compile from source using Gentoo ebuild cutorch again and will wait for result...

@soumith
Copy link
Member

soumith commented Jan 4, 2017

okay, your cutorch install issue is that the torch7 install is outdated.

@archenroot
Copy link
Author

archenroot commented Jan 4, 2017

Ok, so I will unmerge and remerge all of them.

Q: Could be cutorch installed independently and is torch7 dependant on cutorch? This will also help me to stabilize Gentoo ebuild files for whole Torch stack. I think yes, as soon as for example the THC.h file is required by other packages as dependency.

Thanks.

@soumith
Copy link
Member

soumith commented Jan 4, 2017

cutorch is dependent on torch7

@archenroot
Copy link
Author

Aha, so we have an error in torch7 ebuild file where we define following dependencies (I think it is easy to read):
DEPEND=">=dev-lang/lua-5.1:=
dev-lang/luajit:2
virtual/blas
virtual/lapack
dev-lua/luafilesystem
dev-lua/penlight
dev-lua/lua-cjson
=dev-lua/torch-cwrap-9999
=dev-lua/torch-paths-9999
sys-devel/gcc[fortran]"
RDEPEND="${DEPEND}
!minimal? (
=sci-libs/torch-image-9999
=sci-libs/torch-sys-9999
=sci-libs/torch-nn-9999
=sci-libs/torch-xlua-9999
=sci-libs/torch-dok-9999
=sci-libs/torch-optim-9999
)
cuda? (
=sci-libs/torch-cutorch-9999
=sci-libs/torch-cunn-9999
)
cudnn? (
=sci-libs/torch-cudnn-9999
)
opencl? (
=sci-libs/torch-cltorch-9999
=sci-libs/torch-clnn-9999
)"

@archenroot
Copy link
Author

Ok, I disabled in ebuild USE of cuda, so only pure torch should be pulled in and trying again (later I will reorganize dependencies). Now Torch7 sucessfully compiled.

And I am trying now cutorch package...

Thx for hints guys!

@archenroot
Copy link
Author

I have minor question as I see something strange still:
=broadwell\",\"-O2\",\"-pipe\",\"-g\",\"-fno-delete-null-pointer-checks\",\"-std=gnu++98\",\"-fPIC\" -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61 -DCUDA_HAS_FP16=1 -DNVCC -I/opt/cuda/include -I/usr/include/luajit-2.0 -I/usr/include/luajit-2.0/TH -I/opt/cuda/include -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/CUDA_SDK_ROOT_DIR-NOTFOUND/common/inc -I/TH -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999_build/lib/THC

What took my attention is CUDA_SDK_ROOT_DIR-NOTFOUND, is it real problem or just some trash?

@pavanky
Copy link
Contributor

pavanky commented Jan 4, 2017

FYI there is no way to support CUDA 8 on gcc 6.x. The arch linux maintainer for CUDA started maintaining gcc-5 as a way to support CUDA 8. If Gentoo has gcc-5 in the repos, it may be worth trying to compile cutorch witch CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 luarocks make ...

@archenroot
Copy link
Author

archenroot commented Jan 4, 2017

@pavanky - yes, you are right of course, I overrided manually the limitation in CUDA 8 one header file to get working with GCC 6.2 :-) Usually when I face issue, I fall back to 5.*, otherwise stay with 6.2 if my application works.

@pavanky
Copy link
Contributor

pavanky commented Jan 4, 2017

@archenroot this is more than overriding the header. It had to do with g++-6 defaulting to C++-14. Check out the issue: https://bugs.archlinux.org/task/49272

@archenroot
Copy link
Author

@pavanky you are again right :-) I created specific environment profile in /etc/portage/env/gcc6-safe file with following content:
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS} -g -fno-delete-null-pointer-checks -std=gnu++98"

Then in Gentoo way I can attach the env profile to specific application via /etc/portage/package.env file with entry:
sci-libs/torch-cutorch gcc6-safe

So I am using old compatible way

@archenroot
Copy link
Author

sci-libs/torch-cutorch-9999 package now successfuly compiled, as suggested the problem was in wrong dependency, torch is not dependant on cutorch, but vice-versa.

I can now locate the missing file at:
/usr/include/luajit-2.0/THC/THC.h

Thanks for your support.

@archenroot
Copy link
Author

archenroot commented Jan 4, 2017

Maybe if someone could suggest this CUDA_SDK_ROOT_DIR-NOTFOUND in some include path, here example:
opt/cuda/bin/nvcc -M -D__CUDACC__ /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/generated/THCTensorMathReduceDouble.cu -o /tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999_build/lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceDouble.cu.o.NVCC-depend -ccbin /usr/bin/x86_64-pc-linux-gnu-gcc -m64 -DTH_GENERIC_USE_HALF=1 -DCUDA_HAS_FP16=1 -DTHC_EXPORTS -Xcompiler ,\"-march=broadwell\",\"-O2\",\"-pipe\",\"-g\",\"-fno-delete-null-pointer-checks\",\"-std=gnu++98\",\"-fPIC\" -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61 -DCUDA_HAS_FP16=1 -DNVCC -I/opt/cuda/include -I/usr/include/luajit-2.0 -I/usr/include/luajit-2.0/TH -I/opt/cuda/include -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC/CUDA_SDK_ROOT_DIR-NOTFOUND/common/inc -I/TH -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999/lib/THC -I/tmp/portage/sci-libs/torch-cutorch-9999/work/torch-cutorch-9999_build/lib/THC

it is not an issue, the package compiles, but I just don't understand it.

But otherwise thanks to community in resolution here 👍

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

4 participants