compilation error: textures and emulation mode


I’m building a library that makes use of various textures to bind pitched device memory. To test the library using valgrind, etc. i wanted to build everything in emulation mode. When doing this (with cmake 2.8 and its included FindCUDA) i get a lot of messages like

/tmp/tmpxft_000001dd_00000000-1_fl_cuhuberl1.cudafe1.stub.c:51: error: ‘__cuda_emu::__texture_fl’ has not been declared

In release mode everything works just fine.

Best, Manuel

Hi, Manuel

Can you give me a couple more bits of information.

  1. What version of the CUDA toolkit are you using?
  2. What OS are you using?
  3. What compiler are you using?
  4. What is the command line used to generate the code? Set CUDA_VERBOSE_BUILD to 1 and build again looking for a line that looks like “Generating <name of target file”

With #4 you might be able to experiment with various arguments directly without having to modify your CMake code.