The question is about a specific combination of versions but is relevant more generally.
I\'ve just dist-upgraded from Kubuntu 12.04 to 14.04. Now, when I
I had a similar issue with CUDA Toolkit 7.5 and gcc 5.2.1.
I did modify the host_config.h file in /usr/local/cuda/include/:
host_config.h
/usr/local/cuda/include/
Just remove the lines where it check the gcc version. It did solve my problem.
Credits goes to Darren Garvey (https://groups.google.com/forum/#!topic/torch7/WaNmWZqMnzw)