OpenCV 2.4.8 with CUDA 5.5.22 Compilation Error on Ubuntu
I'm having a problem building OpenCV 2.4.8 with GPU support on an Ubuntu machine with CUDA 5.5.22 installed. I'm stuck with the following error. I'm not sure what exactly is going wrong. Any help is much appreciated.
[ 43%] Built target pch_Generate_opencv_gpu
[ 43%] Building CXX object modules/gpu/CMakeFiles/opencv_gpu.dir/src/pyramids.cpp.o
<command-line>:0:0: fatal error: can’t read PCH file: No such file or directory compilation terminated.
Preprocessed source stored into /tmp/cc9ygAM8.out file, please attach this to your bugreport.
make[2]: ***[modules/gpu/CMakeFiles/opencv_gpu.dir/src/pyramids.cpp.o] Error 1
make[1]: ***[modules/gpu/CMakeFiles/opencv_gpu.dir/all] Error 2
make: *** [all] Error 2
disk full ?
Although I bumped into a "Disk Full" issue earlier, this was not the cause this time since the disk already had 1.7 GB available. It seems however that this problem is caused by an incorrect C++ compiler version. Although I configured the gcc alternatives and set gcc-4.6 instead of gcc-4.8, cmake was only detecting the 4.6 version for C compiler while using 4.8 for C++. After explicitly setting C++ to 4.6 and running
cmake
andmake
again, the problem seems to have been resolved!honestly, to my exp. the precompiled headers take most of the space. ( so, maybe disable them , if trading compile speed vs. disk space might solve it )
also my last 3.0 build on win produced 1.91 gb on disk. (without test or perf targets), so 1.7gb might still not be enough on your system.