Problems with CUDA 2.2 on Ubuntu 9.04 Compile errors with device emulation

I have recently installed cuda 2.2 with driver 185.18.08 on my jaunty laptop. The driver itself is buggy (crashes X on suspend) and I am waiting for a new release. But the bigger problem is that I receive compile errors when compiling my cuda code with debug and deviceemu while the release builds fine. My cuda file contains some class definitions, which is admittedly C++ but in cuda 2.1 everything worked ok. Now when I compile with deviceemu the compiler complains about undefined references to the class’ constructor and destructor. Was there any major change in the way nvcc passes the rest of the code to the g++ compiler?

Another question I have is when will cuda finally start to support gcc 4.3?

I also found that using something like cout in the .cu file (not in kernel code but alongside it) now produces compile errors about exception handling not being supported (again in debug mode only). It wouldn’t worry me if it wasn’t working in cuda 2.1 as well, but it was. Obviously cuda 2.2 made restrictions harsher instead of loosening them up.

Do you get the same errors if you compile for device?

No, the build only fails when compiled for debug.

I checked previous posts about similar problemsand found out about the nvcc option --host-compilation c++, but it doesn’t solve the “exception handling not supported” problem. The error goes away if I comment out the header and all references to cout but then a new error appears (about the missing class constructor which is defined in the same .cu file). The release build does not give any errors. Any ideas? Or do we really have to stick with older cuda versions?

I have the exact same problem

I’ve gotten around the exception problems by avoiding c++ streams but now I’m stuck at the constructor error as well