我刚刚cmake -D CMAKE_BUILD_TYPE=RELEASE ..
从运行OpenCV/build
,并得到了我的输出:
-- OpenCV modules:
-- To be built: core imgproc flann highgui features2d calib3d ml video
objdetect contrib nonfree gpu legacy photo python
stitching ts videostab
-- Disabled: -
-- Disabled by dependency: -
-- Unavailable: androidcamera java world
问题是,编译gpu
失败,可能是因为我的机器没有?(这是一个 EC2 实例)。
make
失败并出现一个奇怪的错误:
Scanning dependencies of target opencv_test_gpu
[ 72%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_gpumat.cpp.o
[ 72%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/utility.cpp.o
[ 73%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_filters.cpp.o
[ 73%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_copy_make_border.cpp.o
[ 73%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/main.cpp.o
[ 73%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_threshold.cpp.o
[ 73%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_video.cpp.o
[ 73%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_core.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make[2]: *** [modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_core.cpp.o] Error 4
make[1]: *** [modules/gpu/CMakeFiles/opencv_test_gpu.dir/all] Error 2
make: *** [all] Error 2
我尝试过使用该标志-DOPENCV_MODULES_DISABLED_USER="gpu"
,但这会产生奇怪的输出,其中gpu
列出为to be built
and disabled
。
-- OpenCV modules:
-- To be built: core imgproc flann highgui features2d calib3d ml video objdetect contrib nonfree gpu legacy photo python stitching ts videostab
-- Disabled: gpu
-- Disabled by dependency: -
-- Unavailable: androidcamera java world
没有 怎么编译gpu
?