Help with error: kernel launches from templates are not allowed in system files

I am on ubuntu 10.04. I am trying to compile PCL(point cloud library from ROS).
It happens for both cuda 4.0/4.1

I have googled and someone mentioned that moving thrust away from /usr/local/cuda/include could work around.
I moved, and it didn’t work for me.

/home/rq/work/trunk/common/include/pcl/cloud_properties.h:76: warning: ‘pcl::CloudProperties::sensor_origin’ contains empty classes which may cause base classes to be placed at different locations in a future version of GCC
/usr/local/cuda/include/thrust/detail/backend/cuda/detail/launch_closure.inl(72): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/launch_closure.inl(101): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/fast_scan.inl(512): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/fast_scan.inl(521): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/fast_scan.inl(530): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/fast_scan.inl(595): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/fast_scan.inl(607): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/fast_scan.inl(616): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/safe_scan.inl(331): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/safe_scan.inl(346): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/safe_scan.inl(360): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/safe_scan.inl(414): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/safe_scan.inl(430): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/detail/safe_scan.inl(448): error: kernel launches from templates are not allowed in system files

/usr/local/cuda/include/thrust/detail/backend/cuda/reduce_by_key.inl(565): error: kernel launches from templates are not allowed in system files