FS#31702 - [cuda-toolkit] C++ code doesn't compile
Attached to Project:
Community Packages
Opened by Dmitriy M (foxcub) - Thursday, 27 September 2012, 02:11 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 27 September 2012, 20:12 GMT
Opened by Dmitriy M (foxcub) - Thursday, 27 September 2012, 02:11 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 27 September 2012, 20:12 GMT
|
Details
Running nvcc on C++ code gives errors akin to
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/ext/atomicity.h(48): error: identifier "__atomic_fetch_add" is undefined The problem seems to be with GCC 4.7. If one installs GCC 4.6, and symlinks its gcc and g++ into /opt/cuda-toolkit/bin, C++ code compiles fine. |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Thursday, 27 September 2012, 20:12 GMT
Reason for closing: Upstream
Thursday, 27 September 2012, 20:12 GMT
Reason for closing: Upstream
Comment by
Sven-Hendrik Haase (Svenstaro) -
Thursday, 27 September 2012, 20:12 GMT
This is an upstream problem. The solution is easy to find using
Google. You need to add 2 precompiler directives.