gcc 4.5 / CUDA SDK thread

Cuda 3.1 can build the SDK samples using gcc 4.3 and 4.4. Unfortunately, at present arch linux uses gcc 4.5 as its default compiler. Some of the SDK samples build, however at present SobelFilter errors out:

[codebox]make -C src/SobelFilter/

make[1]: Entering directory `/home/carson/build/cuda-sdk/src/pkg/sdk/C/src/SobelFilter’

SobelFilter_kernels.cu(53): error: calling a host function from a device/global function is not allowed

SobelFilter_kernels.cu(53): error: calling a host function from a device/global function is not allowed

2 errors detected in the compilation of “/tmp/tmpxft_00004c19_00000000-6_SobelFilter_kernels.compute_10.cpp1.ii”.

make[1]: *** [obj/x86_64/release/SobelFilter_kernels.cu.o] Error 2

make[1]: Leaving directory `/home/carson/build/cuda-sdk/src/pkg/sdk/C/src/SobelFilter’

make: *** [src/SobelFilter/Makefile.ph_build] Error 2

[/codebox]

If anyone has successfully built the SDK using gcc 4.5, I’d be curious to know what sort of fixes are necessary.