I did a test on my system (Ubuntu 12.10 x64, gcc (Ubuntu/Linaro 4.4.7-2ubuntu1) 4.4.7, CUDA 4.2, and the required python modules as in http://code.google.com/p/cuda-convnet/wiki/Compiling. I was able to compile it and generate the _ConvNet.so library.
Did you edit the paths in the build.sh file to correspond to the correct ones on your system? Make sure the includes and libraries are on the respective directories.
The ones I had to change from his defaults were CUDA_SDK_PATH, which I installed elsewhere, and NUMPY_INCLUDE_PATH which I had to look in http://packages.ubuntu.com/quantal/amd64/python-numpy/filelist to see where arrayobject.h lived – /usr/lib/python2.7/dist-packages/numpy/core/include/numpy
You might want to do step 7 from the link below to install and use gcc 4.4, instead of the newer one. CUDA has issues sometimes with the newer gcc compilers: