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

CUDA build errors with Fedora 27 #1600

Closed
totaam opened this issue Jul 25, 2017 · 2 comments
Closed

CUDA build errors with Fedora 27 #1600

totaam opened this issue Jul 25, 2017 · 2 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 25, 2017

The rawhide buildbot is spewing out:

found gcc version: 7.1.1
found CUDA compiler: /usr/local/cuda-8.0/bin/nvcc version 8.0.44
found CUDA compiler: /usr/local/cuda/bin/nvcc version 8.0.44
CUDA compiling ARGB_to_NV12     (no file)
 '/usr/local/cuda/bin/nvcc' '-fatbin' '-c' 'xpra/codecs/cuda_common/ARGB_to_NV12.cu' '-o' 'xpra/codecs/cuda_common/ARGB_to_NV12.fatbin' '-std=c++11' '-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_53,code=sm_53' '-gencode=arch=compute_60,code=sm_60' '-gencode=arch=compute_61,code=sm_61' '-gencode=arch=compute_62,code=sm_62'
Error: failed to compile CUDA kernel ARGB_to_NV12

/usr/include/bits/floatn.h(61): error: invalid argument to attribute "__mode__"

/usr/include/bits/floatn.h(73): error: identifier "__float128" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_00004589_00000000-21_ARGB_to_NV12.compute_62.cpp1.ii".

error: Bad exit status from /var/tmp/rpm-tmp.1ToY7b (%build)
    Bad exit status from /var/tmp/rpm-tmp.1ToY7b (%build)

Hopefully a new CUDA SDK will come out and fix this?

@totaam
Copy link
Collaborator Author

totaam commented Oct 1, 2017

Workaround found here [https://github.com/facebookarchive/caffe2/issues/1194#issuecomment-330668216] is to manually patch the system headers file /usr/include/bits/floatn.h (yukky but this works):

diff --git a/floatn.h b/floatn.h
index f93a9f8..96db3c3 100644
--- a/floatn.h
+++ b/floatn.h
@@ -34,6 +34,11 @@
 # define __HAVE_FLOAT128 0
 #endif
 
+#if CUDART_VERSION
+#undef __HAVE_FLOAT128
+#define __HAVE_FLOAT128 0
+#endif
+
 /* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
    from the default float, double and long double types in this glibc.  */
 #if __HAVE_FLOAT128

This will have to do for now, the proper fix needs to come from nvidia.

We now have beta builds for Fedora 27.

@totaam totaam closed this as completed Oct 1, 2017
@totaam
Copy link
Collaborator Author

totaam commented Apr 28, 2018

Fedora 28 hits a new problem: #1800

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

1 participant