Ask Your Question
0

OpenCV 2.4.8 with CUDA 5.5.22 Compilation Error on Ubuntu

asked 2014-02-28 00:08:05 -0600

A gravatar image

updated 2014-02-28 00:31:22 -0600

berak gravatar image

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
edit retag flag offensive close merge delete

Comments

disk full ?

berak gravatar imageberak ( 2014-02-28 00:31:51 -0600 )edit

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 and make again, the problem seems to have been resolved!

A gravatar imageA ( 2014-02-28 15:34:42 -0600 )edit
1

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.

berak gravatar imageberak ( 2014-02-28 15:57:08 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2014-03-13 16:29:08 -0600

A gravatar image

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 and make again, the problem seems to have been resolved!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-28 00:08:05 -0600

Seen: 1,139 times

Last updated: Mar 13 '14