We recently upgraded to cuda 3.0 beta and a user reported the following compiling error:
$ nvcc test.cu
Class type: struct std::__true_type
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/…/…/…/…/include/c++/4.3.2/iostream(77): internal error: turn_class_definition_into_declaration: class def needed
1 catastrophic error detected in the compilation of “/tmp/tmpxft_00006f15_00000000-4_test.cpp1.ii”.
Compilation aborted.
nvcc error : ‘cudafe’ died due to signal 6
#include <cuda/cuda.h>
#include <iostream>
#include <string>
using namespace std;
main()
{
cout << "Hello World!\n";
// Following line causes the problem... commenting it fixes everything!
string OutputFilename;
cout << "Goodbye World!\n";
return EXIT_SUCCESS;
}
I tested it with cuda 2.2 and it works fine. The user reported it works fine with cuda 2.3 as well.
We are using cuda 3.0 beta in fedora 10, gcc 4.3.2-7. Is there anyway to fix it?
thanks